コード例 #1
0
        public CalibrationWindow(IStabilityModel model)
        {
            InitializeComponent();
            buttonHandler = new ButtonHandler(but_ok.Height,but_ok.Width);
           /* _butH = but_ok.Height;
            _butW = but_ok.Width;*/
            arr = new TenzoRadioButton[4] { Tenz0, Tenz1, Tenz2, Tenz3 };
            for (int i = 0; i < 4; i++)
            {
                for (int j = 0; j < 4; j++)
                {
                    if(i!=j)
                        arr[i].GroupTenzoRadioButtons.Add(arr[j]);
                }
            }
            Tenz0.IsChecked = true;

            _weightKoefs =  (double[]) MainConfig.WeightKoefs.Clone();
            _tenz_Koef_0.Text = _weightKoefs[0].ToString(CultureInfo.CreateSpecificCulture("en-GB"));
            _tenz_Koef_1.Text = _weightKoefs[1].ToString(CultureInfo.CreateSpecificCulture("en-GB"));
            _tenz_Koef_2.Text = _weightKoefs[2].ToString(CultureInfo.CreateSpecificCulture("en-GB"));
            _tenz_Koef_3.Text = _weightKoefs[3].ToString(CultureInfo.CreateSpecificCulture("en-GB"));

            _calibrationParams.EntryCount = 100;
            _calibrationParams.Weight = 7.5;

           _presenter = new CalibratePresenter(model,this);
        }
コード例 #2
0
        public CalibrationWindow(IStabilityModel model)
        {
            InitializeComponent();
            buttonHandler = new ButtonHandler(but_ok.Height, but_ok.Width);

            /* _butH = but_ok.Height;
             * _butW = but_ok.Width;*/
            arr = new TenzoRadioButton[4] {
                Tenz0, Tenz1, Tenz2, Tenz3
            };
            for (int i = 0; i < 4; i++)
            {
                for (int j = 0; j < 4; j++)
                {
                    if (i != j)
                    {
                        arr[i].GroupTenzoRadioButtons.Add(arr[j]);
                    }
                }
            }
            Tenz0.IsChecked = true;

            _weightKoefs      = (double[])MainConfig.WeightKoefs.Clone();
            _tenz_Koef_0.Text = _weightKoefs[0].ToString(CultureInfo.CreateSpecificCulture("en-GB"));
            _tenz_Koef_1.Text = _weightKoefs[1].ToString(CultureInfo.CreateSpecificCulture("en-GB"));
            _tenz_Koef_2.Text = _weightKoefs[2].ToString(CultureInfo.CreateSpecificCulture("en-GB"));
            _tenz_Koef_3.Text = _weightKoefs[3].ToString(CultureInfo.CreateSpecificCulture("en-GB"));

            _calibrationParams.EntryCount = 100;
            _calibrationParams.Weight     = 7.5;

            _presenter = new CalibratePresenter(model, this);
        }