Пример #1
0
        private void FormClientMain_Load(object sender, EventArgs args)
        {
            Resource.TLog.Log((int)ELogItem.Note, "Start Calorimeter Client Program.");
            DispCaption();

            DefMenu.Index = 0;
            Location      = new Point(0, 0);

            Resource.TLog.Log((int)ELogItem.Note, "Resume the thread for listener.");
            Resource.Client.Resume();

            Resource.TLog.Log((int)ELogItem.Note, "Send connection command to Server.");
            Resource.Client.Connect();

            Resource.TLog.Log((int)ELogItem.Note, "Resume invalidation thread of screen.");
            invalidThread = new InvalidThread(csInvalidTime);
            invalidThread.InvalidControls += InvalidForm;
            invalidThread.Resume();

            Resource.TLog.Log((int)ELogItem.Note, "Resume TestContext threads");
            CtrlTestLeft ctrlLeft = DefMenu.Controls((int)EMainMenuItem.Test) as CtrlTestLeft;

            for (int i = 0; i < ctrlLeft.DefMenu.ControlsCount; i++)
            {
                CtrlTestRight ctrlRight = ctrlLeft.DefMenu.Controls(i) as CtrlTestRight;
                ctrlRight.Context.Resume();
            }

            SetUser();
        }
Пример #2
0
        private void Initialize()
        {
            Resource.Create();

            terminateCode = ETerminateCode.None;

            DefMenu = new UlMenu(viewPanel);
            DefMenu.Add(new CtrlTestLeft(), testButton);
            DefMenu.Add(new CtrlViewLeft(), viewButton);
            DefMenu.Add(new CtrlDeviceLeft(), deviceButton);
            DefMenu.Add(new CtrlLogLeft(), logButton);
            DefMenu.Add(new CtrlConfigLeft(), configButton);

            invalidThread = null;

            Resource.Client.Listener.NonAcknowledge         += DoNonAcknowledge;
            Resource.Client.Listener.NotifyTermination      += DoNotifyTermination;
            Resource.Client.Listener.RefreshConnectionState += DoRefreshConnectionState;
        }