public void Init(ComPortPars _ComPort, ConverterPars _pars, int _frequency) { label2.Text = "Абонент " + _pars.Abonent.ToString(); textBox1.Text = _frequency.ToString(); label3.Text = null; inverter = new JInverterTh(_ComPort, _pars, _frequency); timer1.Interval = inverter.RTimeout; }
public JInverterTh(ComPortPars _comPortPars, ConverterPars _converterPars, int _Frequency) { // mitcom = new MitCOM(_comPortPars, pr); mitcom = new MitCOM(_comPortPars, null); abonent = _converterPars.Abonent; timeout = _comPortPars.Timeout; frequencyPosition = _converterPars.SpeedPar; frequency = _Frequency; IsABC = _converterPars.IsABC; Iters = _converterPars.Iters; RTimeout = 500; ts = new ThreadStart(Run); th = null; }