Beispiel #1
0
        /// <summary>
        /// Creates and displays new database module.
        /// Sets help information rtf and binds events.
        /// </summary>
        /// <returns><strong>True</strong>, if successful,
        /// otherwise <strong>false</strong>.</returns>
        private bool CreateDatabaseView()
        {
            Modules.Database.DatabaseModule objfrmLogDataSheet =
                new Modules.Database.DatabaseModule();

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

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