예제 #1
0
        protected override void OnLoad(EventArgs e)
        {
            inletRadioButton_CheckedChanged(this, e);
            temperatureCheckBox_CheckedChanged(this, e);

            var args = e.As <ParamsEventArgs <decimal> >();

            base.OnLoad(args);
            var data = args.Parameters;

            if (data == null)
            {
                return;
            }
            voltageNumericUpDown.Minimum = data[0];
            voltageNumericUpDown.Maximum = data[1];
            // TODO: move to traslatable resources
            inletRadioButton.Text            = string.Format("Напряжение ({0:F0}-{1:F0}В)", data[0], data[1]);
            voltageNumericUpDown.Value       = data[2];
            temperatureNumericUpDown.Minimum = data[3];
            temperatureNumericUpDown.Maximum = data[4];
            // TODO: move to traslatable resources
            temperatureCheckBox.Text       = string.Format("Температура ({0:F0}-{1:F0}C)", data[3], data[4]);
            temperatureNumericUpDown.Value = data[5];
        }
예제 #2
0
        protected override void OnLoad(EventArgs e)
        {
            var args = e.As <LoadEventArgs>();

            base.OnLoad(args);
            peakComboBox.Items.AddRange(args.PeakList);
            peakComboBox.SelectedIndex = args.NormPeakNumber;
            //double coeff = args.Coeff;
        }
예제 #3
0
 private void MenuView_OnViewEvent(object sender, EventArgs e)
 {
     TypeSwitch.On(e.GetType())
     // paging
     .Case <GoToFirstPageEventArgs>(() => this.OnGoToFirstPageEvent())
     .Case <GoToPrevPageEventArgs>(() => this.OnGoToPrevPageEvent())
     .Case <GoToNextPageEventArgs>(() => this.OnGoToNextPageEvent())
     .Case <GoToLastPageEventArgs>(() => this.OnGoToLastPageEvent())
     // sorting
     .Case <SortByPersonPropertiesEventArgs>(() => this.OnSortEvent(
                                                 e.As <SortByPersonPropertiesEventArgs>().SortCriteria,
                                                 e.As <SortByPersonPropertiesEventArgs>().SortDirection))
     // exit
     .Case <ExitEventArgs>(() => this.OnExitEvent())
     // unknwon
     .Case <UnknownCommandEventArgs>(() => this.OnUnknownEvent(e.As <UnknownCommandEventArgs>()?.Command))
     .Evaluate();
 }
예제 #4
0
        protected override void OnLoad(EventArgs e)
        {
            var args = e.As <LoadEventArgs>();

            args.Method += InvokeSetVisibility;
            base.OnLoad(args);
            rareModeCheckBox.Checked = args.NotRareModeRequested;
            var co = args.CommonOptions;

            if (co != null)
            {
                loadCommonData(co);
            }
        }
예제 #5
0
        protected override void OnLoad(EventArgs e)
        {
            var args = e.As <LoadEventArgs>();

            args.Method += InvokeEnableForm;
            base.OnLoad(args);

            // TODO: transmit Config and Graph data in LoadEventArgs
            bool enable = Graph.PointToAdd != null;

            insertPointButton.Enabled = enable;
            loadPreciseEditorData(Config.PreciseData);
            if (!enable)
            {
                Graph.OnPointAdded += Graph_OnPointAdded;
            }
        }
예제 #6
0
        protected override void OnLoad(EventArgs e)
        {
            inletRadioButton_CheckedChanged(this, e);
            temperatureCheckBox_CheckedChanged(this, e);

            base.OnLoad(e);
            var data = e.As <ParamsEventArgs <decimal> >().Parameters;

            if (data == null || data.Length != 3)
            {
                return;
            }
            temperatureNumericUpDown.Minimum = data[0];
            temperatureNumericUpDown.Maximum = data[1];
            // TODO: move to traslatable resources
            temperatureCheckBox.Text       = string.Format("Температура ({0:F0}-{1:F0}C)", data[0], data[1]);
            temperatureNumericUpDown.Value = data[2];
        }