public MateriaMainWindow() { //initialize OpenTK GL Abstraction Layer first tk = new TKGL(); InitializeComponent(); Instance = this; recent = new RecentSettings(); recent.Load(); graphs = new List <UIGraph>(); documents = new List <LayoutDocument>(); LoadLayout(); mnuGraphSettings.IsEnabled = false; GraphDocuments.PropertyChanged += GraphDocuments_PropertyChanged; UndoRedoManager.OnUndo += UndoRedoManager_OnUndo; UndoRedoManager.OnRedo += UndoRedoManager_OnRedo; UndoRedoManager.OnRedoAdded += UndoRedoManager_OnRedoAdded; UndoRedoManager.OnUndoAdded += UndoRedoManager_OnUndoAdded; mnuRedo.IsEnabled = false; mnuUndo.IsEnabled = false; //set node context Materia.Nodes.Node.Context = TaskScheduler.FromCurrentSynchronizationContext(); }
public MateriaMainWindow() { //initialize OpenTK GL Abstraction Layer first tk = new TKGL(); InitializeComponent(); Instance = this; Docker.Loaded += Docker_Loaded; recent = new RecentSettings(); recent.Load(); graphs = new List <UIGraph>(); documents = new List <LayoutDocument>(); //set default preview3DWasVisibleOnLoad = true; preview2DWasVisibleOnLoad = true; //will handle changing the above LoadLayout(); mnuGraphSettings.IsEnabled = false; GraphDocuments.PropertyChanged += GraphDocuments_PropertyChanged; UndoRedoManager.OnUndo += UndoRedoManager_OnUndo; UndoRedoManager.OnRedo += UndoRedoManager_OnRedo; UndoRedoManager.OnRedoAdded += UndoRedoManager_OnRedoAdded; UndoRedoManager.OnUndoAdded += UndoRedoManager_OnUndoAdded; mnuRedo.IsEnabled = false; mnuUndo.IsEnabled = false; WindowsMenu.Visibility = Visibility.Collapsed; EditMenu.Visibility = Visibility.Collapsed; SaveMenuItem.IsEnabled = false; SaveAsMenuItem.IsEnabled = false; ExportMenuItem.IsEnabled = false; Materia.Nodes.Node.SyncContext = DispatcherSynchronizationContext.Current; //set node context Materia.Nodes.Node.Context = TaskScheduler.FromCurrentSynchronizationContext(); lastSelectedIndex = -1; }