Пример #1
0
        private void RestoreAllButtons()
        {
            IsWorking = false;

            ControlBridge.SetControlVisibleState(panelCancel, false);
            ControlBridge.SetControlVisibleState(panelButtons, true);

            Logging.LogMessage($"Processing thread COMPLETED.");
        }
Пример #2
0
        private void SetAsProcessing()
        {
            ControlBridge.SetControlVisibleState(panelCancel, true);
            ControlBridge.SetControlVisibleState(panelButtons, false);

            _cancellationTokenSource = new CancellationTokenSource();
            _cancellationToken       = _cancellationTokenSource.Token;
            _cancellationToken.Register(new Action(() => RestoreAllButtons()));

            Logging.LogMessage($"Processing thread LAUNCHED.");

            IsWorking = true;
        }
Пример #3
0
        private void MainForm_Shown(object sender, EventArgs e)
        {
            ControlBridge.SetControlText(tbN, Settings.N);
            ControlBridge.SetControlText(tbDegree, Settings.Degree);
            ControlBridge.SetControlText(tbBase, Settings.Base);
            ControlBridge.SetControlText(tbBound, Settings.Bound);
            ControlBridge.SetControlText(tbRelationQuantity, Settings.RelationQuantity);
            ControlBridge.SetControlText(tbRelationValueRange, Settings.RelationValueRange);

            ControlBridge.SetControlVisibleState(panelCancel, false);

            RefreshLoadSaveButtonState();

            this.tbN.TextChanged += new System.EventHandler(this.tbN_TextChanged);
        }