예제 #1
0
        public void UpdateWizardState()
        {
            if (SelectedIndex == 0)
            {
                BackButton.Enabled = false;
            }
            else
            {
                BackButton.Enabled = true;
            }

            if (SelectedIndex == this.Pages.Count - 1)
            {
                NextButton.Enabled   = false;
                FinishButton.Enabled = true;
                FinishButton.Focus();
            }
            else
            {
                StiCanNextEventArgs e = new StiCanNextEventArgs();
                InvokeOnCanNext(e);
                NextButton.Enabled = e.CanNext;

                StiCanFinishEventArgs ee = new StiCanFinishEventArgs();
                InvokeOnCanFinish(ee);
                FinishButton.Enabled = ee.CanFinish;
            }
        }
예제 #2
0
        private void SetMaximumButton_Click(object sender, RoutedEventArgs e)
        {
            double num;

            //read Loadcell to get Raw Maximum Value
            if (SetMaximumTextBox.Text == "")
            {
                errorMessageShow("Please enter weight value, then press Calibrate button"); return;
            }
            if (!double.TryParse(SetMaximumTextBox.Text, out num))
            {
                errorMessageShow("Please enter numeric value for weight value"); return;
            }

            _UserMaximumValue = Convert.ToDecimal(SetMaximumTextBox.Text); //Capture User Maximum
            //_MaximumValue = Convert.ToDecimal(SetMaximumTextBox.Text); //Capture User Minimum
            _RawMaximumValue = GpioUtility.ReadData();

            string message = "Wieght value set. Press Finish button to complete calibration.";

            successMessageShow(message);
            SetMaximumButton.IsEnabled = false;
            FinishButton.Focus(FocusState.Programmatic);
        }