Example #1
0
        /// <summary>
        /// Creates and displays new areas of interest module.
        /// Sets help information rtf and binds events.
        /// </summary>
        /// <returns><strong>True</strong>, if successful,
        /// otherwise <strong>false</strong>.</returns>
        private bool CreateAOIView()
        {
            Ogama.Modules.AOI.AOIModule objfrmAOI =
                new Ogama.Modules.AOI.AOIModule();

            if (objfrmAOI == null)
            {
                MessageBox.Show(
                    "Couldn't create view",
                    Application.ProductName,
                    MessageBoxButtons.OK,
                    MessageBoxIcon.Exclamation);
                return(false);
            }
            else
            {
                objfrmAOI.MdiParent      = this;
                objfrmAOI.HelpRTF        = Application.StartupPath + @"\Help\AOI.rtf";
                objfrmAOI.FormClosing   += new FormClosingEventHandler(this.module_FormClosing);
                objfrmAOI.Activated     += new EventHandler(this.module_Activated);
                objfrmAOI.HelpRequested += new HelpEventHandler(this.module_HelpButtonClicked);
                objfrmAOI.Show();
                return(true);
            }
        }
Example #2
0
    /// <summary>
    /// Creates and displays new areas of interest module. 
    /// Sets help information rtf and binds events.
    /// </summary>
    /// <returns><strong>True</strong>, if successful,
    /// otherwise <strong>false</strong>.</returns>
    private bool CreateAOIView()
    {
      Ogama.Modules.AOI.AOIModule objfrmAOI =
        new Ogama.Modules.AOI.AOIModule();

      if (objfrmAOI == null)
      {
        MessageBox.Show(
          "Couldn't create view",
            Application.ProductName,
            MessageBoxButtons.OK,
            MessageBoxIcon.Exclamation);
        return false;
      }
      else
      {
        objfrmAOI.MdiParent = this;
        objfrmAOI.HelpRTF = Application.StartupPath + @"\Help\AOI.rtf";
        objfrmAOI.FormClosing += new FormClosingEventHandler(this.module_FormClosing);
        objfrmAOI.Activated += new EventHandler(this.module_Activated);
        objfrmAOI.HelpRequested += new HelpEventHandler(this.module_HelpButtonClicked);
        objfrmAOI.Show();
        return true;
      }
    }