rename UniversalEditor.UserInterface.MainWindow to EditorWindow to avoid naming conflict with MBS.Framework.MainWindow
This commit is contained in:
parent
e661b6ff62
commit
e6be610a9d
@ -56,7 +56,7 @@ namespace UniversalEditor.UserInterface
|
||||
{
|
||||
if (e.Key == KeyboardKey.Tab && (e.ModifierKeys & KeyboardModifierKey.Control) == KeyboardModifierKey.Control)
|
||||
{
|
||||
MainWindow mw = (CurrentWindow as MainWindow);
|
||||
EditorWindow mw = (CurrentWindow as EditorWindow);
|
||||
if (mw != null)
|
||||
{
|
||||
mw.SetWindowListVisible(true, false);
|
||||
@ -73,7 +73,7 @@ namespace UniversalEditor.UserInterface
|
||||
{
|
||||
if (e.Key == KeyboardKey.LControlKey || e.Key == KeyboardKey.RControlKey)
|
||||
{
|
||||
MainWindow mw = (CurrentWindow as MainWindow);
|
||||
EditorWindow mw = (CurrentWindow as EditorWindow);
|
||||
if (mw != null)
|
||||
{
|
||||
mw.SetWindowListVisible(false, false);
|
||||
@ -599,7 +599,7 @@ namespace UniversalEditor.UserInterface
|
||||
|
||||
for (int i = 0; i < ((UIApplication)Application.Instance).Windows.Count; i++)
|
||||
{
|
||||
MainWindow mw = (((UIApplication)Application.Instance).Windows[i] as MainWindow);
|
||||
EditorWindow mw = (((UIApplication)Application.Instance).Windows[i] as EditorWindow);
|
||||
if (mw == null) continue;
|
||||
|
||||
if (!mw.Close())
|
||||
@ -611,7 +611,7 @@ namespace UniversalEditor.UserInterface
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates an empty <see cref="MainWindow" />. Usually this is just a
|
||||
/// Creates an empty <see cref="EditorWindow" />. Usually this is just a
|
||||
/// call to <see cref="OpenWindow" />, but it can be customized to present
|
||||
/// a blank document editor for your application's default document format.
|
||||
/// </summary>
|
||||
@ -1224,7 +1224,7 @@ namespace UniversalEditor.UserInterface
|
||||
/// </summary>
|
||||
public void OpenWindow()
|
||||
{
|
||||
MainWindow mw = new MainWindow();
|
||||
EditorWindow mw = new EditorWindow();
|
||||
mw.Show();
|
||||
}
|
||||
/// <summary>
|
||||
@ -1233,7 +1233,7 @@ namespace UniversalEditor.UserInterface
|
||||
/// <param name="fileNames">The file name(s) of the document(s) to load.</param>
|
||||
public void OpenWindow(params string[] fileNames)
|
||||
{
|
||||
MainWindow mw = new MainWindow();
|
||||
EditorWindow mw = new EditorWindow();
|
||||
mw.Show();
|
||||
|
||||
mw.OpenFile(fileNames);
|
||||
@ -1244,7 +1244,7 @@ namespace UniversalEditor.UserInterface
|
||||
/// <param name="documents">The document model(s) of the document(s) to load.</param>
|
||||
public void OpenWindow(params Document[] documents)
|
||||
{
|
||||
MainWindow mw = new MainWindow();
|
||||
EditorWindow mw = new EditorWindow();
|
||||
mw.Show();
|
||||
|
||||
mw.OpenFile(documents);
|
||||
|
||||
@ -23,11 +23,11 @@ namespace UniversalEditor.UserInterface
|
||||
{
|
||||
public class EditorChangedEventArgs : EventArgs
|
||||
{
|
||||
public MainWindow Window { get; } = null;
|
||||
public EditorWindow Window { get; } = null;
|
||||
public Editor PreviousEditor { get; } = null;
|
||||
public Editor CurrentEditor { get; } = null;
|
||||
|
||||
public EditorChangedEventArgs(MainWindow window, Editor previousEditor, Editor currentEditor)
|
||||
public EditorChangedEventArgs(EditorWindow window, Editor previousEditor, Editor currentEditor)
|
||||
{
|
||||
Window = window;
|
||||
PreviousEditor = previousEditor;
|
||||
|
||||
@ -25,11 +25,11 @@ namespace UniversalEditor.UserInterface
|
||||
{
|
||||
public class EditorChangingEventArgs : CancelEventArgs
|
||||
{
|
||||
public MainWindow Window { get; } = null;
|
||||
public EditorWindow Window { get; } = null;
|
||||
public Editor PreviousEditor { get; } = null;
|
||||
public Editor CurrentEditor { get; } = null;
|
||||
|
||||
public EditorChangingEventArgs(MainWindow window, Editor previousEditor, Editor currentEditor)
|
||||
public EditorChangingEventArgs(EditorWindow window, Editor previousEditor, Editor currentEditor)
|
||||
{
|
||||
Window = window;
|
||||
PreviousEditor = previousEditor;
|
||||
|
||||
@ -40,7 +40,7 @@ namespace UniversalEditor.UserInterface
|
||||
{
|
||||
get
|
||||
{
|
||||
ListViewControl lv = ((MainWindow)(Application.Instance as UIApplication).CurrentWindow).DocumentExplorerPanel.ListView;
|
||||
ListViewControl lv = ((EditorWindow)(Application.Instance as UIApplication).CurrentWindow).DocumentExplorerPanel.ListView;
|
||||
if (lv.SelectedRows.Count > 0)
|
||||
{
|
||||
return lv.SelectedRows[0].GetExtraData<EditorDocumentExplorerNode>("node");
|
||||
@ -52,7 +52,7 @@ namespace UniversalEditor.UserInterface
|
||||
TreeModelRow row = FindRow(value);
|
||||
if (row != null)
|
||||
{
|
||||
ListViewControl lv = ((MainWindow)(Application.Instance as UIApplication).CurrentWindow).DocumentExplorerPanel.ListView;
|
||||
ListViewControl lv = ((EditorWindow)(Application.Instance as UIApplication).CurrentWindow).DocumentExplorerPanel.ListView;
|
||||
lv.SelectedRows.Clear();
|
||||
lv.SelectedRows.Add(row);
|
||||
|
||||
@ -63,7 +63,7 @@ namespace UniversalEditor.UserInterface
|
||||
|
||||
private TreeModelRow FindRow(EditorDocumentExplorerNode node, TreeModelRow parent = null)
|
||||
{
|
||||
ListViewControl lv = ((MainWindow)(Application.Instance as UIApplication).CurrentWindow).DocumentExplorerPanel.ListView;
|
||||
ListViewControl lv = ((EditorWindow)(Application.Instance as UIApplication).CurrentWindow).DocumentExplorerPanel.ListView;
|
||||
|
||||
TreeModelRow.TreeModelRowCollection coll = lv.Model.Rows;
|
||||
if (parent != null)
|
||||
|
||||
@ -41,9 +41,9 @@ namespace UniversalEditor.UserInterface
|
||||
{
|
||||
_SelectedObject = value;
|
||||
|
||||
if (Parent?.ParentWindow is MainWindow)
|
||||
if (Parent?.ParentWindow is EditorWindow)
|
||||
{
|
||||
((PropertyListPanel)(Parent.ParentWindow as MainWindow).FindPanel(PropertyListPanel.ID)).SelectedObject = value;
|
||||
((PropertyListPanel)(Parent.ParentWindow as EditorWindow).FindPanel(PropertyListPanel.ID)).SelectedObject = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,43 +1,36 @@
|
||||
using System;
|
||||
|
||||
using UniversalEditor.Accessors;
|
||||
using UniversalEditor.ObjectModels.Project;
|
||||
using UniversalEditor.ObjectModels.Solution;
|
||||
using UniversalEditor.ObjectModels.Text.Plain;
|
||||
|
||||
using UniversalEditor.UserInterface.Dialogs;
|
||||
using UniversalEditor.UserInterface.Panels;
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using MBS.Framework;
|
||||
using MBS.Framework.Drawing;
|
||||
using MBS.Framework.UserInterface;
|
||||
using MBS.Framework.UserInterface.Controls;
|
||||
using MBS.Framework.UserInterface.Controls.Docking;
|
||||
using MBS.Framework.UserInterface.Controls.Ribbon;
|
||||
using MBS.Framework.UserInterface.Dialogs;
|
||||
using MBS.Framework.UserInterface.DragDrop;
|
||||
using MBS.Framework.UserInterface.Input.Keyboard;
|
||||
using MBS.Framework.UserInterface.Input.Mouse;
|
||||
|
||||
using MBS.Framework.UserInterface.Drawing;
|
||||
using MBS.Framework.Drawing;
|
||||
|
||||
// TODO: We need to work on UWT signaling to native objects...
|
||||
using MBS.Framework.UserInterface.Layouts;
|
||||
using MBS.Framework.UserInterface.Controls.Ribbon;
|
||||
using UniversalEditor.Printing;
|
||||
using MBS.Framework.UserInterface.Printing;
|
||||
using UniversalEditor.UserInterface.Pages;
|
||||
using UniversalEditor.ObjectModels.Binary;
|
||||
|
||||
using UniversalEditor.Accessors;
|
||||
using UniversalEditor.DataFormats.Binary;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using MBS.Framework.UserInterface.Controls.ListView;
|
||||
using MBS.Framework;
|
||||
using UniversalEditor.UserInterface.Controls;
|
||||
using UniversalEditor.ObjectModels.Binary;
|
||||
using UniversalEditor.ObjectModels.Project;
|
||||
using UniversalEditor.ObjectModels.PropertyList;
|
||||
using MBS.Framework.Collections;
|
||||
using UniversalEditor.ObjectModels.Solution;
|
||||
using UniversalEditor.Printing;
|
||||
using UniversalEditor.UserInterface.Controls;
|
||||
using UniversalEditor.UserInterface.Dialogs;
|
||||
using UniversalEditor.UserInterface.Pages;
|
||||
using UniversalEditor.UserInterface.Panels;
|
||||
|
||||
namespace UniversalEditor.UserInterface
|
||||
{
|
||||
public class MainWindow : MBS.Framework.UserInterface.MainWindow, IHostApplicationWindow
|
||||
public class EditorWindow : MainWindow, IHostApplicationWindow
|
||||
{
|
||||
private DockingContainerControl dckContainer = null;
|
||||
|
||||
@ -147,7 +140,7 @@ namespace UniversalEditor.UserInterface
|
||||
((UIApplication)Application.Instance).ExecuteCommand(cmd.ID);
|
||||
}
|
||||
|
||||
public MainWindow()
|
||||
public EditorWindow()
|
||||
{
|
||||
Layout = new BoxLayout(Orientation.Vertical);
|
||||
this.IconName = "universal-editor";
|
||||
@ -1822,9 +1815,9 @@ namespace UniversalEditor.UserInterface
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets the <see cref="Page" />s (center-docked <see cref="DockingWindow" />s) contained within all <see cref="DockingContainer" />s in this
|
||||
/// <see cref="MainWindow" />.
|
||||
/// <see cref="EditorWindow" />.
|
||||
/// </summary>
|
||||
/// <returns>The <see cref="Page" />s contained within all <see cref="DockingContainer" />s in this <see cref="MainWindow" />.</returns>
|
||||
/// <returns>The <see cref="Page" />s contained within all <see cref="DockingContainer" />s in this <see cref="EditorWindow" />.</returns>
|
||||
public Page[] GetPages()
|
||||
{
|
||||
return GetPages(dckContainer);
|
||||
@ -114,7 +114,7 @@ namespace UniversalEditor.UserInterface.Pages
|
||||
RefreshEditor();
|
||||
}
|
||||
|
||||
public override string Title => MainWindow.GetDocumentTitle(Document);
|
||||
public override string Title => EditorWindow.GetDocumentTitle(Document);
|
||||
|
||||
private void RefreshEditor()
|
||||
{
|
||||
@ -123,7 +123,7 @@ namespace UniversalEditor.UserInterface.Pages
|
||||
// pnlLoading.Enabled = true;
|
||||
// pnlLoading.Visible = true;
|
||||
|
||||
string title = MainWindow.GetDocumentTitle(Document);
|
||||
string title = EditorWindow.GetDocumentTitle(Document);
|
||||
|
||||
ObjectModel om = null;
|
||||
EditorReference[] reditors = new EditorReference[0];
|
||||
|
||||
@ -92,7 +92,7 @@ namespace UniversalEditor.UserInterface.Panels
|
||||
string fileName = e.Row.GetExtraData<string>("FileName");
|
||||
if (fileName != null)
|
||||
{
|
||||
(ParentWindow as MainWindow).OpenFile(fileName);
|
||||
(ParentWindow as EditorWindow).OpenFile(fileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -155,7 +155,7 @@ namespace UniversalEditor.UserInterface.Panels
|
||||
|
||||
Objects.Clear();
|
||||
|
||||
Editor editor = ((MainWindow)ParentWindow).GetCurrentEditor();
|
||||
Editor editor = ((EditorWindow)ParentWindow).GetCurrentEditor();
|
||||
if (editor == null) return;
|
||||
|
||||
foreach (PropertyPanelObject obj in editor.PropertiesPanel.Objects)
|
||||
|
||||
@ -393,13 +393,13 @@ namespace UniversalEditor.UserInterface.Panels
|
||||
|
||||
private void mnuContextSolutionAddNewProject_Click(object sender, EventArgs e)
|
||||
{
|
||||
MainWindow mw = (((EditorApplication)Application.Instance).LastWindow as MainWindow);
|
||||
EditorWindow mw = (((EditorApplication)Application.Instance).LastWindow as EditorWindow);
|
||||
if (mw == null) return;
|
||||
mw.NewProject(true);
|
||||
}
|
||||
private void mnuContextSolutionAddExistingProject_Click(object sender, EventArgs e)
|
||||
{
|
||||
MainWindow mw = (((EditorApplication)Application.Instance).LastWindow as MainWindow);
|
||||
EditorWindow mw = (((EditorApplication)Application.Instance).LastWindow as EditorWindow);
|
||||
if (mw == null) return;
|
||||
|
||||
ProjectObjectModel proj = mw.ShowOpenProjectDialog();
|
||||
|
||||
@ -65,7 +65,7 @@ namespace UniversalEditor.UserInterface.Panels
|
||||
|
||||
void LvToolbox_RowActivated(object sender, ListViewRowActivatedEventArgs e)
|
||||
{
|
||||
MainWindow mw = (MainWindow)ParentWindow;
|
||||
EditorWindow mw = (EditorWindow)ParentWindow;
|
||||
|
||||
Editor ed = mw.GetCurrentEditor();
|
||||
if (ed != null)
|
||||
|
||||
@ -28,6 +28,8 @@
|
||||
<TargetFrameworkProfile />
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>..\..\UniversalEditor.snk</AssemblyOriginatorKeyFile>
|
||||
<ReleaseVersion>4.0.2022.01</ReleaseVersion>
|
||||
<SynchReleaseVersion>false</SynchReleaseVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@ -69,7 +71,7 @@
|
||||
<Compile Include="Toolbox.cs" />
|
||||
<Compile Include="UnsavedDocumentOption.cs" />
|
||||
<Compile Include="StockCommandType.cs" />
|
||||
<Compile Include="MainWindow.cs" />
|
||||
<Compile Include="EditorWindow.cs" />
|
||||
<Compile Include="Panels\ErrorListPanel.cs" />
|
||||
<Compile Include="Panel.cs" />
|
||||
<Compile Include="LocalConfiguration.cs" />
|
||||
|
||||
@ -102,7 +102,7 @@ namespace UniversalEditor.Plugins.Multimedia.UserInterface.Plugins.Transport
|
||||
|
||||
private void Transport_End(object sender, EventArgs e)
|
||||
{
|
||||
Editor ed = (((UIApplication)Application.Instance).CurrentWindow as UniversalEditor.UserInterface.MainWindow)?.GetCurrentEditor();
|
||||
Editor ed = (((UIApplication)Application.Instance).CurrentWindow as UniversalEditor.UserInterface.EditorWindow)?.GetCurrentEditor();
|
||||
Type t = ed?.GetType();
|
||||
System.Reflection.PropertyInfo piTransport = t?.GetProperty("Transport", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public);
|
||||
MBS.Audio.ITransport transport = (piTransport?.GetValue(ed, null) as MBS.Audio.ITransport);
|
||||
@ -117,7 +117,7 @@ namespace UniversalEditor.Plugins.Multimedia.UserInterface.Plugins.Transport
|
||||
|
||||
private void Transport_Forward(object sender, EventArgs e)
|
||||
{
|
||||
Editor ed = (((UIApplication)Application.Instance).CurrentWindow as UniversalEditor.UserInterface.MainWindow)?.GetCurrentEditor();
|
||||
Editor ed = (((UIApplication)Application.Instance).CurrentWindow as UniversalEditor.UserInterface.EditorWindow)?.GetCurrentEditor();
|
||||
Type t = ed?.GetType();
|
||||
System.Reflection.PropertyInfo piTransport = t?.GetProperty("Transport", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public);
|
||||
MBS.Audio.ITransport transport = (piTransport?.GetValue(ed, null) as MBS.Audio.ITransport);
|
||||
@ -132,7 +132,7 @@ namespace UniversalEditor.Plugins.Multimedia.UserInterface.Plugins.Transport
|
||||
|
||||
private void Transport_Play(object sender, EventArgs e)
|
||||
{
|
||||
Editor ed = (((UIApplication)Application.Instance).CurrentWindow as UniversalEditor.UserInterface.MainWindow)?.GetCurrentEditor();
|
||||
Editor ed = (((UIApplication)Application.Instance).CurrentWindow as UniversalEditor.UserInterface.EditorWindow)?.GetCurrentEditor();
|
||||
Type t = ed?.GetType();
|
||||
System.Reflection.PropertyInfo piTransport = t?.GetProperty("Transport", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public);
|
||||
MBS.Audio.ITransport transport = (piTransport?.GetValue(ed, null) as MBS.Audio.ITransport);
|
||||
@ -148,7 +148,7 @@ namespace UniversalEditor.Plugins.Multimedia.UserInterface.Plugins.Transport
|
||||
|
||||
private void Transport_Back(object sender, EventArgs e)
|
||||
{
|
||||
Editor ed = (((UIApplication)Application.Instance).CurrentWindow as UniversalEditor.UserInterface.MainWindow)?.GetCurrentEditor();
|
||||
Editor ed = (((UIApplication)Application.Instance).CurrentWindow as UniversalEditor.UserInterface.EditorWindow)?.GetCurrentEditor();
|
||||
Type t = ed?.GetType();
|
||||
System.Reflection.PropertyInfo piTransport = t?.GetProperty("Transport", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public);
|
||||
MBS.Audio.ITransport transport = (piTransport?.GetValue(ed, null) as MBS.Audio.ITransport);
|
||||
@ -164,7 +164,7 @@ namespace UniversalEditor.Plugins.Multimedia.UserInterface.Plugins.Transport
|
||||
|
||||
private void Transport_Rewind(object sender, EventArgs e)
|
||||
{
|
||||
Editor ed = (((UIApplication)Application.Instance).CurrentWindow as UniversalEditor.UserInterface.MainWindow)?.GetCurrentEditor();
|
||||
Editor ed = (((UIApplication)Application.Instance).CurrentWindow as UniversalEditor.UserInterface.EditorWindow)?.GetCurrentEditor();
|
||||
Type t = ed?.GetType();
|
||||
System.Reflection.PropertyInfo piTransport = t?.GetProperty("Transport", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public);
|
||||
MBS.Audio.ITransport transport = (piTransport?.GetValue(ed, null) as MBS.Audio.ITransport);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user