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

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

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