public AppWindowDocument_Workflow(IServiceProvider services) { _documentPane = new LayoutDocument(); _documentPane.Content = new AfxWorkflowView(new AfxWorkflow()); _documentPane.Title = "New Workflow"; _documentSvcs = services; }
/// <summary> /// New Instance of the Halo Map Location /// </summary> /// <param name="cacheLocation"></param> /// <param name="tab"></param> /// <param name="tagSorting"> </param> public HaloMap(string cacheLocation, LayoutDocument tab, Settings.TagSort tagSorting) { InitializeComponent(); AddHandler(CloseableTabItem.CloseTabEvent, new RoutedEventHandler(CloseTab)); // Setup Context Menus InitalizeContextMenus(); _tab = tab; _tagSorting = tagSorting; _cacheLocation = cacheLocation; // Update dockpanel location UpdateDockPanelLocation(); // Show UI Pending Stuff doingAction.Visibility = Visibility.Visible; tabScripts.Visibility = Visibility.Collapsed; // Read Settings cbShowEmptyTags.IsChecked = App.AssemblyStorage.AssemblySettings.HalomapShowEmptyClasses; cbShowBookmarkedTagsOnly.IsChecked = App.AssemblyStorage.AssemblySettings.HalomapOnlyShowBookmarkedTags; cbTabOpenMode.SelectedIndex = (int) App.AssemblyStorage.AssemblySettings.HalomapTagOpenMode; App.AssemblyStorage.AssemblySettings.PropertyChanged += SettingsChanged; var initalLoadBackgroundWorker = new BackgroundWorker(); initalLoadBackgroundWorker.DoWork += initalLoadBackgroundWorker_DoWork; initalLoadBackgroundWorker.RunWorkerCompleted += BackgroundWorker_RunWorkerCompleted; initalLoadBackgroundWorker.RunWorkerAsync(); }
public HaloScreenshot(string tempImageLocation, LayoutDocument tabItem) { InitializeComponent(); // Convert DDS to BitmapImage _bitmapImage = DDSConversion.Deswizzle(tempImageLocation); // DateTime Creation DateTime date = DateTime.Now; _datetime_long = date.ToString("yyyy-MM-dd,hh-mm-ss"); _datetime_shrt = date.ToString("hh:mm.ss"); // Set Tab Header tabItem.Title = "Screenshot {" + _datetime_shrt + "}"; // Set Image Name lblImageName.Text = _datetime_long + ".png"; // Set Image imageScreenshot.Source = _bitmapImage; // Should I save the image? if (!App.AssemblyStorage.AssemblySettings.XdkAutoSave) return; if (!Directory.Exists(App.AssemblyStorage.AssemblySettings.XdkScreenshotPath)) Directory.CreateDirectory(App.AssemblyStorage.AssemblySettings.XdkScreenshotPath); string filePath = App.AssemblyStorage.AssemblySettings.XdkScreenshotPath + "\\" + _datetime_long + ".png"; SaveImage(filePath); }
public void AfterInsertDocument(LayoutRoot layout, LayoutDocument anchorableShown) { var parent = anchorableShown.Parent as LayoutDocumentPane; if (parent == null) parent = anchorableShown.FindParent<LayoutDocumentPane>(); if (parent != null) { } }
private void TaskVM_requestTaskCreation(object sender, EventArgs<TaskCreationViewModel> e) { TaskCreationPage t = new TaskCreationPage(e.Data); LayoutDocument d = new LayoutDocument(); d.Title = "Создание задачи"; d.Content = t; parentArea.Children.Add(d); d.IsActive = true; }
private void open_Click(object sender, RoutedEventArgs e) { Frame _frame = new Frame(); _frame.Content = Page1.getIndexPage(); LayoutDocument layoutDoc = new LayoutDocument() { Title="测试而已"}; layoutDoc.Content = _frame; if (!isActive(layoutDoc)) { mainShowSpace.Children.Add(layoutDoc); } }
private void TaskVM_requestSelectionInfoShow(object sender, EventArgs<SelectionInfoViewModel> e) { SelectionInfoPage t = new SelectionInfoPage(e.Data); LayoutDocument d = new LayoutDocument(); d.Title = e.Data.TaskName + "/" + e.Data.SelectionName + "/Информация"; d.Content = t; parentArea.Children.Add(d); d.IsActive = true; }
private void TaskVM_requestSelectionCreation(object sender, EventArgs<SelectionCreationViewModel> e) { CreateSelectionPage t = new CreateSelectionPage(e.Data); LayoutDocument d = new LayoutDocument(); d.Title = e.Data.ParentTask + "/Создание выборки"; d.Content = t; parentArea.Children.Add(d); d.IsActive = true; }
private void PartstypeEditorBtn_Click(object sender, RoutedEventArgs e) { Frame _frame = new Frame(); _frame.Content = new PartstypeEditor(); LayoutDocument layoutDoc = new LayoutDocument() { Title = "配件详情管理" }; layoutDoc.Content = _frame; layoutDoc.IsActive = true; if (!isActive(layoutDoc)) { mainShowSpace.Children.Add(layoutDoc); } }
private void dockManager_Loaded(object sender, RoutedEventArgs e) { LayoutDocument document = new LayoutDocument(); document.CanClose = true; document.CanFloat = true; //document.DockAsDocument(); document.Title = "test"; WindowsFormsHost host = new WindowsFormsHost(); host.Child = new RoomListPanel(); documentsPane.Children.Add(document); }
void OpenDocument(string fileName) { SqDocument doc = new SqDocument(fileName); Xceed.Wpf.AvalonDock.Layout.LayoutDocument layoutDoc = new Xceed.Wpf.AvalonDock.Layout.LayoutDocument(); layoutDoc.Content = doc; layoutDoc.Closed += layoutDoc_Closed; m_CodeDocumentPane.InsertChildAt(0, layoutDoc); doc.Loaded += (s, e) => { layoutDoc.Title = System.IO.Path.GetFileName(doc.DocumentFileName); }; m_DockingManager.ActiveContent = doc; }
public HaloInfo(string infoLocation, LayoutDocument tab) { InitializeComponent(); _blfLocation = infoLocation; var fi = new FileInfo(_blfLocation); _tab = tab; tab.Title = fi.Name; lblBLFname.Text = fi.Name; var thrd = new Thread(LoadMapInfo); thrd.SetApartmentState(ApartmentState.STA); thrd.Start(); }
public HaloImage(string imageLocation, LayoutDocument tab) { InitializeComponent(); _blfLocation = imageLocation; var fi = new FileInfo(_blfLocation); tab.Title = fi.Name; _tab = tab; lblBLFname.Text = fi.Name; var thrd = new Thread(loadBLF); thrd.Start(); }
private Boolean isActive(LayoutDocument layoutDoc) { Boolean flg = false; foreach (var i in mainShowSpace.Children) { ((LayoutDocument)i).IsActive = false; if (layoutDoc.Title== ((LayoutDocument)i).Title) { if (!((LayoutDocument)i).IsActive) { ((LayoutDocument)i).IsActive = true; } flg = true; } } return flg; }
private void AddSlave(SlaveViewModel slave) { var view = new SlaveView() { DataContext = slave }; var layoutDocument = new LayoutDocument() { Content = view, Title = "Slave" }; layoutDocument.Closing += SlaveClosing; layoutDocument.Closed += SlaveClosed; //Add it to the UI SlaveDocumentPane.Children.Add(layoutDocument); //Select it SlaveDocumentPane.SelectedContentIndex = SlaveDocumentPane.ChildrenCount - 1; }
public bool BeforeInsertDocument(LayoutRoot layout, LayoutDocument anchorableToShow, ILayoutContainer destinationContainer) { throw new NotImplementedException(); }
public void AfterInsertDocument(LayoutRoot layout, LayoutDocument anchorableShown) { throw new NotImplementedException(); }
public bool BeforeInsertDocument(LayoutRoot layout, LayoutDocument anchorableToShow, ILayoutContainer destinationContainer) { return m_WrappedStrategy.BeforeInsertDocument(layout, anchorableToShow, destinationContainer); }
public void AfterInsertDocument(LayoutRoot layout, LayoutDocument anchorableShown) { m_WrappedStrategy.AfterInsertDocument(layout, anchorableShown); }
public bool BeforeInsertDocument(LayoutRoot layout, LayoutDocument anchorableToShow, ILayoutContainer destinationContainer) { return false; }
internal override void Attach(LayoutContent model) { _document = model as LayoutDocument; base.Attach(model); }
public DocumentInfo(string fullPath, string title, LayoutDocument tab, TextEditor editor) { ID = GenerateNextID(); FullPath = fullPath; Title = title; Tab = tab; Editor = editor; }
/// <summary> /// Add a new Patch Control /// </summary> /// <param name="patchLocation">Path to the Patch file</param> public void AddPatchTabModule(string patchLocation = null) { var newPatchTab = new LayoutDocument { Title = "Patcher", Content = (patchLocation != null) ? new PatchControl(patchLocation) : new PatchControl() }; documentManager.Children.Add(newPatchTab); documentManager.SelectedContentIndex = documentManager.IndexOfChild(newPatchTab); }
internal override void Detach() { _document = null; base.Detach(); }
private void AddTwoDocuments_click(object sender, RoutedEventArgs e) { var firstDocumentPane = dockManager.Layout.Descendents().OfType<LayoutDocumentPane>().FirstOrDefault(); if (firstDocumentPane != null) { LayoutDocument doc = new LayoutDocument(); doc.Title = "Test1"; firstDocumentPane.Children.Add(doc); LayoutDocument doc2 = new LayoutDocument(); doc2.Title = "Test2"; firstDocumentPane.Children.Add(doc2); } var leftAnchorGroup = dockManager.Layout.LeftSide.Children.FirstOrDefault(); if (leftAnchorGroup == null) { leftAnchorGroup = new LayoutAnchorGroup(); dockManager.Layout.LeftSide.Children.Add(leftAnchorGroup); } leftAnchorGroup.Children.Add(new LayoutAnchorable() { Title = "New Anchorable" }); }
public void OpenDocumentWindow(BaseStudioControl content, bool canClose = true) { if (content == null) throw new ArgumentNullException(nameof(content)); var document = _documents.TryGetValue(content.Key); if (document == null) { content.Changed += OnBaseStudioControlChanged; document = new LayoutDocument { ContentId = content.Key, Content = content, CanClose = canClose }; document.SetBindings(LayoutContent.TitleProperty, content, "Title"); _documents.Add(content.Key, document); TabGroups.First().Children.Add(document); OnBaseStudioControlChanged(content); } DockingManager.ActiveContent = document.Content; }
public void OpenDocumentWindow(string key, string title, object content, bool canClose = true) { if (key == null) throw new ArgumentNullException(nameof(key)); if (title == null) throw new ArgumentNullException(nameof(title)); if (content == null) throw new ArgumentNullException(nameof(content)); var document = _documents.TryGetValue(key); if (document == null) { document = new LayoutDocument { ContentId = key.ToString(), Title = title, Content = content, CanClose = canClose }; _documents.Add(key, document); TabGroups.First().Children.Add(document); } DockingManager.ActiveContent = document.Content; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 7 "..\..\MainWindow.xaml" ((SpectrumScanner.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); #line default #line hidden return; case 2: this.mainDockingManager = ((Xceed.Wpf.AvalonDock.DockingManager)(target)); return; case 3: this.layoutRoot = ((Xceed.Wpf.AvalonDock.Layout.LayoutRoot)(target)); return; case 4: this.layoutPanel = ((Xceed.Wpf.AvalonDock.Layout.LayoutPanel)(target)); return; case 5: this.layoutAnchorableGroup = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorablePaneGroup)(target)); return; case 6: this.leftPane = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorablePane)(target)); return; case 7: this.taskList = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable)(target)); return; case 8: #line 67 "..\..\MainWindow.xaml" ((System.Windows.Controls.ListBoxItem)(target)).Selected += new System.Windows.RoutedEventHandler(this.ListBoxItem_Selected_1); #line default #line hidden return; case 9: #line 68 "..\..\MainWindow.xaml" ((System.Windows.Controls.ListBoxItem)(target)).Selected += new System.Windows.RoutedEventHandler(this.ListBoxItem_Selected_2); #line default #line hidden return; case 10: #line 69 "..\..\MainWindow.xaml" ((System.Windows.Controls.ListBoxItem)(target)).Selected += new System.Windows.RoutedEventHandler(this.ListBoxItem_Selected_3); #line default #line hidden return; case 11: #line 70 "..\..\MainWindow.xaml" ((System.Windows.Controls.ListBoxItem)(target)).Selected += new System.Windows.RoutedEventHandler(this.ListBoxItem_Selected_4); #line default #line hidden return; case 12: this.DocumentGroup = ((Xceed.Wpf.AvalonDock.Layout.LayoutDocumentPaneGroup)(target)); return; case 13: this.DocumentPane = ((Xceed.Wpf.AvalonDock.Layout.LayoutDocumentPane)(target)); return; case 14: this.layoutDocument = ((Xceed.Wpf.AvalonDock.Layout.LayoutDocument)(target)); return; case 15: this.myGrid = ((System.Windows.Controls.Grid)(target)); return; case 16: this.border1 = ((System.Windows.Controls.Border)(target)); return; case 17: this.border2 = ((System.Windows.Controls.Border)(target)); return; case 18: this.border3 = ((System.Windows.Controls.Border)(target)); return; case 19: this.border4 = ((System.Windows.Controls.Border)(target)); return; case 20: this.RightAnchorableGroup = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorablePaneGroup)(target)); return; case 21: this.RightPane = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorablePane)(target)); return; case 22: this.leftGroup = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorGroup)(target)); return; case 23: this.rightGroup = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorGroup)(target)); return; case 24: this.topGroup = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorGroup)(target)); return; case 25: this.bottomGroup = ((Xceed.Wpf.AvalonDock.Layout.LayoutAnchorGroup)(target)); return; } this._contentLoaded = true; }
public void AfterInsertDocument(LayoutRoot layout, LayoutDocument anchorableShown) { }
private DocumentInfo CreateTab(string fullPath, string title) { TextEditor editor = new TextEditor(); editor.FontFamily = new FontFamily("Consolas"); editor.SyntaxHighlighting = HighlightingManager.Instance.GetDefinition("C#"); editor.ShowLineNumbers = true; if (!string.IsNullOrWhiteSpace(fullPath)) { editor.Load(fullPath); } LayoutDocument document = new LayoutDocument(); document.Title = title; document.Content = editor; document.Closing += document_Closing; _window.DocumentPane.InsertChildAt(_window.DocumentPane.ChildrenCount, document); document.IsSelected = true; DocumentInfo info = new DocumentInfo(fullPath, title, document, editor); _documents[info.ID] = info; document.ContentId = info.ID.ToString(); return info; }
public void AddTabModule(TabGenre tabG, bool singleInstance = true) { var tab = new LayoutDocument(); switch (tabG) { case TabGenre.StartPage: tab.Title = "Start Page"; tab.Content = new StartPage(); break; case TabGenre.Welcome: tab.Title = "Welcome"; tab.Content = new WelcomePage(); break; case TabGenre.Settings: tab.Title = "Settings"; tab.Content = new SettingsPage(); break; case TabGenre.PluginGenerator: tab.Title = "Plugin Generator"; tab.Content = new HaloPluginGenerator(); break; case TabGenre.PluginConverter: tab.Title = "Plugin Converter"; tab.Content = new HaloPluginConverter(); break; case TabGenre.ImgurHistory: tab.Title = "Imgur History"; tab.Content = new ImgurHistoryPage(); break; case TabGenre.MemoryManager: tab.Title = "Memory Manager"; tab.Content = new MemoryManager(); break; case TabGenre.VoxelConverter: tab.Title = "Voxel Converter"; tab.Content = new VoxelConverter(); break; case TabGenre.PostGenerator: tab.Title = "Post Generator"; tab.Content = new PostGenerator(); break; } if (singleInstance) foreach (LayoutContent tabb in documentManager.Children.Where(tabb => tabb.Title == tab.Title)) { documentManager.SelectedContentIndex = documentManager.IndexOfChild(tabb); return; } documentManager.Children.Add(tab); documentManager.SelectedContentIndex = documentManager.IndexOfChild(tab); }