示例#1
0
        protected void MenuMode(WinformAbstract frm , bool value)
        {
            ///
            /// The btn's in the tool strip and the Menustrip is enabled / disabled based on the value.
            /// Bool : True/ False based on the state required by the form
            /// frm : the child form
            ///

            frm.btnnew.Enabled = value;
            frm.btnmodify.Enabled = value;
            frm.btndelete.Enabled = value;
            frm.btnPrint.Enabled = value;

            frm.btnsave.Enabled = (!value);
            frm.btncancel.Enabled = (!value);

            frm.NewToolStripMenuItem.Enabled = value;
            frm.ModifyToolStripMenuItem.Enabled = value;
            frm.DeleteToolStripMenuItem.Enabled = value;
            frm.PrintToolStripMenuItem.Enabled = value;
            MenuState= value;
        }
示例#2
0
 public void updateStatus(WinformAbstract frm, string Status)
 {
     frm.StatusStripLabel.Text = Status;
 }