Beispiel #1
0
        }  //  static public void OpenMainWindow( object, EventArgs )

        //
        //  static public void CloseMainForm()
        //
        //  CloseMainForm() is the sanity-checking preferred way of programmatically closing the main form
        //  window when opened by a call to OpenMainWindow().
        //

        static public void CloseMainForm()
        {
            if (MainForm == null)
            {
                return;
            }

            MainForm.Dispose();

            MainForm = null;

            sysTrayMenu.MenuItems[OPEN_LOG_MENU_ITEM].Enabled = true;
        }  //  static public void CloseMainForm()
Beispiel #2
0
        }  //  static public void StopListening()

        //
        //  static public void OpenMainWindow( object, EventArgs )
        //
        //  A convenient sanity-checking method for opening the main window.
        //

        static public void OpenMainWindow(object SelectedMenuItem, EventArgs e)
        {
            MainForm = new frmGAVPI();

            if (MainForm == null)
            {
                return;
            }

            //  Let's disable the system tray menu item that allows a user to open the main window (since it
            //  will already be open.

            sysTrayMenu.MenuItems[OPEN_LOG_MENU_ITEM].Enabled = false;

            MainForm.ShowDialog();

            CloseMainForm();
        }  //  static public void OpenMainWindow( object, EventArgs )
Beispiel #3
0
        //
        //  static public void OpenMainWindow( object, EventArgs )
        //
        //  A convenient sanity-checking method for opening the main window.
        //
        public static void OpenMainWindow( object SelectedMenuItem, EventArgs e )
        {
            MainForm = new frmGAVPI();

            if( MainForm == null ) return;

            //  Let's disable the system tray menu item that allows a user to open the main window (since it
            //  will already be open.

            sysTrayMenu.MenuItems[ OPEN_LOG_MENU_ITEM ].Enabled = false;

            MainForm.ShowDialog();

            CloseMainForm();
        }
Beispiel #4
0
        //
        //  static public void CloseMainForm()
        //
        //  CloseMainForm() is the sanity-checking preferred way of programmatically closing the main form
        //  window when opened by a call to OpenMainWindow().
        //
        public static void CloseMainForm()
        {
            if( MainForm == null ) return;

            MainForm.Dispose();

            MainForm = null;

            sysTrayMenu.MenuItems[ OPEN_LOG_MENU_ITEM ].Enabled = true;
        }