Пример #1
0
        /// <summary>
        /// Show the new class front page window. Manage it so multiple examples are not shown. If
        /// the config window exists, show that instead.
        /// </summary>
        public void ShowClassFrontPage()
        {
            if (this.classConfigWindow != null)
            {
                this.classConfigWindow.Focus();
                return;
            }

            if (this.classFrontPageWindow == null)
            {
                this.classFrontPageWindow = new ClassFrontPage();
                ClassFunctionalViewModel classFunctionalViewModel =
                    new ClassFunctionalViewModel(
                        this.unitsIoController,
                        this.unitsXmlIoController,
                        this.firstExamples,
                        this.indexName);

                SetupWindow(
                    this.classFrontPageWindow,
                    classFunctionalViewModel,
                    this.CloseClassFrontPageWindow,
                    this.EditClassFrontPageClosed);
            }

            this.classFrontPageWindow.Focus();
        }
Пример #2
0
 /// <summary>
 /// Form closed, set to null.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 public void EditClassFrontPageClosed(object sender, EventArgs e)
 {
     this.classFrontPageWindow = null;
 }