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

            if (this.classConfigWindow == null)
            {
                ClassConfigViewModel classConfig =
                    new ClassConfigViewModel(
                        this.unitsIoController,
                        this.unitsXmlIoController,
                        this.indexName);

                this.classConfigWindow = new ClassConfigWindow();
                SetupWindow(
                    this.classConfigWindow = new ClassConfigWindow(),
                    classConfig,
                    this.CloseClassConfigWindow,
                    this.EditClassConfigWindowClosed);
                this.classConfigWindow.DataContext = classConfig;
            }

            this.classConfigWindow.Focus();
        }
Exemple #2
0
 /// <summary>
 /// Form closed, set to null.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 public void EditClassConfigWindowClosed(object sender, EventArgs e)
 {
     this.classConfigWindow = null;
 }