Exemplo n.º 1
0
 private void OperatorDockPanelActiveDocumentChanged(object sender, EventArgs e)
 {
     if (this.operatorDockPanel.ActiveDocument != null)
     {
         this.m_currentOpenPNsPage.SetActiveMode(false);
         this.m_currentOpenPNsPage = this.operatorDockPanel.ActiveDocument as PetriNetsPageForm;
         this.m_currentOpenPNsPage.SetActiveMode(true);
         RootApp.UI.UI.ShowDebugText("Open " + this.m_currentOpenPNsPage.Text + ".");
     }
     else
     {
         this.m_currentOpenPNsPage.SetActiveMode(false);
         this.m_currentOpenPNsPage = null;
         RootApp.UI.UI.ShowDebugText("All page has been closed !");
     }
 }
Exemplo n.º 2
0
        public void CreateNewPage()
        {
            PetriNetsPageForm newPage = new PetriNetsPageForm();

            newPage.Parent = this;
            if (this.m_newPageCount != 0)
            {
                newPage.ModifiedPageName("New Page" + this.m_newPageCount.ToString());
            }

            newPage.Disposed += new EventHandler(CurrentOpenPnsPage_Dispose);

            if (this.m_currentOpenPNsPage != null)
            {
                this.m_currentOpenPNsPage.SetActiveMode(false);
            }
            this.m_currentOpenPNsPage = newPage;
            this.m_currentOpenPNsPage.ShowWindow(this.operatorDockPanel, DockState.Document);

            this.m_petriNetsPageDictionary.Add(this.m_currentOpenPNsPage.Text, this.m_currentOpenPNsPage);
            this.m_newPageCount++;

            RootApp.UI.UI.ShowDebugText("Create new page named " + this.m_currentOpenPNsPage.Text + ".");
        }