public void set_parameters(ref DeviceTune device) { calibr_weight = device.tarirovka_weight; max_level = device.max_level; zero_level = device.zero_level; calulate_scale(); device.step = step; }
public tarirovka_tab(Dispatcher disp) { evt_tarirovka_step_2 = new MarkerEvent1(); evt_tarirovka_done = new MarkerEvent1(); evt_tarirovka_cancel = new MarkerEvent1(); device = new DeviceTune(); plotter_cntrl = new PlotterControl(disp); plotter_cntrl.evt_1.someEvent += new _MarkerEventHandler1(tarirovka_1_done); plotter_cntrl.evt_2.someEvent += new _MarkerEventHandler1(tarirovka_2_done); }
public MainWindow() { try { InitializeComponent(); //SplashScreen splashScreen = new SplashScreen("logo.bmp"); //splashScreen.Show(true); InitializeCOMInterface(); create_training_tab(out tr_tab); create_tarirovka_tab(out tar_tab); create_calc_tab(out calc_tab); create_setings_tab(out set_tab); create_measuring_tab(out meas_tab); main_pg = new main_page(); main_pg.evt_tarirovka_click.someEvent += new _MarkerEventHandler(tarirovka_click); main_pg.evt_Training_Click.someEvent += new _MarkerEventHandler(Training_Click); main_pg.evt_draw_calc_choise.someEvent += new _MarkerEventHandler(draw_calc_choise); main_pg.evt_Measuring_Click.someEvent += new _MarkerEventHandler(Measuring_Click); tdb = new tassDB(); program_settings = new ProgramSettings(); SetParametersFromSettings(tdb.get_default_settings()); device = new DeviceTune(); pattern = new Template(); //Прорисовка главного меню MainMenuDraw(); // прорисовка заставки //TimeSpan timeSp = new TimeSpan(0, 0, 3); //splashScreen.Close(timeSp); //Thread.Sleep(1000); } catch (Exception fail) { String error = "The following error has occurred:\n\n"; error += fail.Message.ToString() + "\n\n"; MessageBox.Show(error); } }
public void getTunedDevice(out DeviceTune device_in, ref ProgramSettings program_settings_in) { // установка параметров после успешной тарировки program_settings_in.set_parameters(ref device); device_in = device; }
public PlotterControl(Dispatcher disp) { evt_1 = new MarkerEvent1(); evt_2 = new MarkerEvent1(); m_smplQueue = new Queue(); device = new DeviceTune(); pattern = new Template(); // Создание шаблона для тренировки pattern.create_template(); program_settings = new ProgramSettings(); dp_test = disp; }