Exemplo n.º 1
0
        private void FormMain_FormClosing(object sender, FormClosingEventArgs e)
        {
            m_panelWork.Stop();
            m_panelConfig.Stop();

            m_handler.Activate(false); m_handler.Stop();
        }
Exemplo n.º 2
0
        public FormMain()
        {
            string strNameFileINI = string.Empty;

            createHCmdArg(Environment.GetCommandLineArgs(), ref strNameFileINI);

            InitializeComponent();

            m_formWait = FormWait.This;

            m_handler = new HHandlerQueue(strNameFileINI);
            m_handler.Start();
            m_handler.Activate(true);

            m_panelWork   = new PanelWork(); m_panelWork.EvtDataAskedHost += new DelegateObjectFunc(OnEvtDataAskedFormMain_PanelWork); m_panelWork.Start();
            m_panelConfig = new PanelConfig(); m_panelConfig.EvtDataAskedHost += new DelegateObjectFunc(OnEvtDataAskedFormMain_PanelConfig); m_panelConfig.Start();

            работаToolStripMenuItem.CheckOnClick           =
                конфигурацияToolStripMenuItem.CheckOnClick =
                    true;

            работаToolStripMenuItem.CheckStateChanged       += new EventHandler(работаToolStripMenuItem_CheckStateChanged);
            конфигурацияToolStripMenuItem.CheckStateChanged += new EventHandler(конфигурацияToolStripMenuItem_CheckStateChanged);

            m_TabCtrl.EventHTabCtrlExClose += new HTabCtrlEx.DelegateHTabCtrlEx(onCloseTabPage);
        }
Exemplo n.º 3
0
        private void FormMain_FormClosing(object sender, FormClosingEventArgs e)
        {
            m_notifyIcon.Visible = false;
            m_panelWork.Stop();
            m_panelConfig.Stop();
            m_panelCS.Close();

            m_handler.Activate(false); m_handler.Stop();
        }
Exemplo n.º 4
0
        public FormMain()
        {
            string strNameFileINI = string.Empty;

            createHCmdArg(Environment.GetCommandLineArgs(), ref strNameFileINI);

            InitializeComponent();

            m_formWait = FormWait.This;

            _statePanelWork = PanelWork.STATE.Unknown;

            //// настраиваемые параметры манагера состояний объектов
            //HHandlerQueue.MSEC_TIMERFUNC_UPDATE = 1006;
            //HHandlerQueue.MSEC_CONFIRM_WAIT = 6666;
            m_handler = new HHandlerQueue(strNameFileINI);
            m_handler.EventInteraction += new DelegateObjectFunc(onEventInteraction);
            m_handler.Start(); m_handler.Activate(true);
            //m_handler.EventCrashed += new HHandlerQueue.EventHandlerCrashed(onCrashed);

            m_panelWork   = new PanelWork(); m_panelWork.EvtDataAskedHost += new DelegateObjectFunc(OnEvtDataAskedFormMain_PanelWork);
            m_panelConfig = new PanelConfig(); m_panelConfig.EvtDataAskedHost += new DelegateObjectFunc(OnEvtDataAskedFormMain_PanelConfig);
            //m_handler.Push();
            m_panelCS = new PanelClientServer(new PanelClientServer.InteractionParameters(
                                                  //@"NE2844, NE3336"
                                                  //, @"MainPipe"
                                                  )); m_panelCS.EvtDataAskedHost += new DelegateObjectFunc(OnEvtDataAskedFormMain_PanelCS);
            // автоматическое изменение состояния п.меню
            работаToolStripMenuItem.CheckOnClick                 =
                конфигурацияToolStripMenuItem.CheckOnClick       =
                    взаимодействиеToolStripMenuItem.CheckOnClick =
                        true;
            // п.п.меню заблокированы - изменение состояния только программно
            //взаимодействиеToolStripMenuItem.CheckStateChanged += new EventHandler(взаимодействиеToolStripMenuItem_CheckStateChanged);
            //работаToolStripMenuItem.CheckStateChanged += new EventHandler(работаToolStripMenuItem_CheckStateChanged);
            конфигурацияToolStripMenuItem.CheckStateChanged += new EventHandler(конфигурацияToolStripMenuItem_CheckStateChanged);

            m_TabCtrl.EventHTabCtrlExClose += new HTabCtrlEx.DelegateHTabCtrlEx(onCloseTabPage);

            switch (s_state_execute)
            {
            case STATE_EXECUTE.MINIMIZE:
                Message msg = new Message();
                msg.Msg    = 0x112;
                msg.WParam = (IntPtr)(0xF020);
                WndProc(ref msg);
                break;

            case STATE_EXECUTE.NORMALIZE:
                this.OnMaximumSizeChanged(null);
                break;
            }
        }
Exemplo n.º 5
0
        public FormMain()
        {
            string strNameFileINI = string.Empty;

            createHCmdArg(Environment.GetCommandLineArgs(), ref strNameFileINI);

            InitializeComponent();

            m_formWait = FormWait.This;

            //// настраиваемые параметры манагера состояний объектов
            //HHandlerQueue.MSEC_TIMERFUNC_UPDATE = 1006;
            //HHandlerQueue.MSEC_CONFIRM_WAIT = 6666;
            m_handler = new HHandlerQueue(strNameFileINI);
            m_handler.Start(); m_handler.Activate(true);
            //m_handler.EventCrashed += new HHandlerQueue.EventHandlerCrashed(onCrashed);

            m_panelWork   = new PanelWork(); m_panelWork.EvtDataAskedHost += new DelegateObjectFunc(OnEvtDataAskedFormMain_PanelWork); m_panelWork.Start();
            m_panelConfig = new PanelConfig(); m_panelConfig.EvtDataAskedHost += new DelegateObjectFunc(OnEvtDataAskedFormMain_PanelConfig); m_panelConfig.Start();
            m_panelCS     = new PanelClienServer(new string[] {
                //"NE2844", "NE3336",
                "NE3963"
                , "ITC563"
                //,"VNE3963"
            }); m_panelCS.EvtDataAskedHost += new DelegateObjectFunc(OnEvtDataAskedFormMain_PanelCS); m_panelCS.Start();

            работаToolStripMenuItem.CheckOnClick                 =
                конфигурацияToolStripMenuItem.CheckOnClick       =
                    взаимодействиеToolStripMenuItem.CheckOnClick =
                        true;

            взаимодействиеToolStripMenuItem.CheckStateChanged += new EventHandler(взаимодействиеToolStripMenuItem_CheckStateChanged);
            работаToolStripMenuItem.CheckStateChanged         += new EventHandler(работаToolStripMenuItem_CheckStateChanged);
            конфигурацияToolStripMenuItem.CheckStateChanged   += new EventHandler(конфигурацияToolStripMenuItem_CheckStateChanged);

            m_TabCtrl.EventHTabCtrlExClose += new HTabCtrlEx.DelegateHTabCtrlEx(onCloseTabPage);

            switch (s_state_execute)
            {
            case STATE_EXECUTE.MINIMIZE:
                Message msg = new Message();
                msg.Msg    = 0x112;
                msg.WParam = (IntPtr)(0xF020);
                WndProc(ref msg);
                break;

            case STATE_EXECUTE.NORMALIZE:
                this.OnMaximumSizeChanged(null);
                break;
            }
        }
Exemplo n.º 6
0
        public FormMain()
        {
            InitializeComponent();

            m_handler = new HHandlerQueue();
            m_handler.Start(); m_handler.Activate(true);

            m_panelWork   = new PanelWork(); m_panelWork.EvtDataAskedHost += new DelegateObjectFunc(OnEvtDataAskedFormMain_PanelWork); m_panelWork.Start();
            m_panelConfig = new PanelConfig(); m_panelConfig.EvtDataAskedHost += new DelegateObjectFunc(OnEvtDataAskedFormMain_PanelConfig); m_panelConfig.Start();

            работаToolStripMenuItem.CheckOnClick           =
                конфигурацияToolStripMenuItem.CheckOnClick =
                    true;

            работаToolStripMenuItem.CheckStateChanged       += new EventHandler(работаToolStripMenuItem_CheckStateChanged);
            конфигурацияToolStripMenuItem.CheckStateChanged += new EventHandler(конфигурацияToolStripMenuItem_CheckStateChanged);

            m_TabCtrl.EventHTabCtrlExClose += new HTabCtrlEx.DelegateHTabCtrlEx(onCloseTabPage);
        }
Exemplo n.º 7
0
        public FormMain()
        {
            string strNameFileINI = string.Empty;

            createHCmdArg(Environment.GetCommandLineArgs(), ref strNameFileINI);

            InitializeComponent();

            m_formWait = FormWait.This;

            m_handler = new HHandlerQueue(strNameFileINI);
            m_handler.Start();
            m_handler.Activate(true);

            m_panelWork   = new PanelWork(); m_panelWork.EvtDataAskedHost += new DelegateObjectFunc(OnEvtDataAskedFormMain_PanelWork); m_panelWork.Start();
            m_panelConfig = new PanelConfig(); m_panelConfig.EvtDataAskedHost += new DelegateObjectFunc(OnEvtDataAskedFormMain_PanelConfig); m_panelConfig.Start();

            работаToolStripMenuItem.CheckOnClick           =
                конфигурацияToolStripMenuItem.CheckOnClick =
                    true;

            работаToolStripMenuItem.CheckStateChanged       += new EventHandler(работаToolStripMenuItem_CheckStateChanged);
            конфигурацияToolStripMenuItem.CheckStateChanged += new EventHandler(конфигурацияToolStripMenuItem_CheckStateChanged);

            m_TabCtrl.EventHTabCtrlExClose += new HTabCtrlEx.DelegateHTabCtrlEx(onCloseTabPage);

            switch (m_state_execute)
            {
            case STATE_EXECUTE.MINIMIZE:
                Message msg = new Message();
                msg.Msg    = 0x112;
                msg.WParam = (IntPtr)(0xF020);
                WndProc(ref msg);
                break;

            case STATE_EXECUTE.NORMALIZE:
                this.OnMaximumSizeChanged(null);
                break;
            }
        }