Example #1
0
        /// <summary>
        /// Creates and displays new saliency module.
        /// Sets help information rtf and binds events.
        /// </summary>
        /// <returns><strong>True</strong>, if successful,
        /// otherwise <strong>false</strong>.</returns>
        private bool CreateSaliencyView()
        {
            Ogama.Modules.Saliency.SaliencyModule objfrmSaliency =
                new Ogama.Modules.Saliency.SaliencyModule();

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

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