/// <summary> /// Инициализирует новый экземпляр класса <see cref="N15InsideForm"/> /// </summary> public N15InsideForm() { this.InitializeComponent(); N15InsideParameters.ParameterChanged += RefreshFormElements; RefreshFormElements(); if (ParametersConfig.IsTesting) { N15InsideParameters.TestModuleRef = this; N15InsideParameters.Action += TestMain.Action; } LearnMain.form = this; switch (LearnMain.getIntent()) { case ModulesEnum.H15Inside_open_from_H15: if (LearnMain.globalIntent == GlobalIntentEnum.OneChannel) { LearnMain.setIntent(ModulesEnum.H15Inside_power); } break; } switch (TestMain.getIntent()) { case ModulesEnum.H15Inside_open_from_H15: //if (TestMain.globalIntent == GlobalIntentEnum.OneChannel) //{ TestMain.setIntent(ModulesEnum.H15Inside_power); //} break; } }
/// <summary> /// Инициализирует новый экземпляр класса <see cref="PowerCabelForm"/> /// </summary> public PowerCabelForm() { InitializeComponent(); PowerCabelParameters.ParameterChanged += RefreshFormElements; PowerCabelParameters.СтанцияСгорела += ВыводСообщенияСтанцияСгорела; if (ParametersConfig.IsTesting) { PowerCabelParameters.TestModuleRef = this; PowerCabelParameters.Action += TestMain.Action; } this.RefreshFormElements(); if (LearnMain.getIntent() == ModulesEnum.openPowerCabeltoPower) { LearnMain.setIntent(ModulesEnum.PowerCabelConnect); LearnMain.form = this; LearnMain.Action(); } if (TestMain.getIntent() == ModulesEnum.openPowerCabeltoPower) { TestMain.setIntent(ModulesEnum.PowerCabelConnect); IsExactModule = true; } }
private void VoltageStabilizerForm_FormClosed(object sender, FormClosedEventArgs e) { VoltageStabilizerParameters.ParameterChanged -= RefreshFormElements; VoltageStabilizerParameters.ОператорСтанцииПораженТоком -= ВыводСообщенияОператорСтанцииПоражёнТоком; if (ParametersConfig.IsTesting) { VoltageStabilizerParameters.Action -= TestMain.Action; } if ((LearnMain.getIntent() == ModulesEnum.VoltageStabilizerSetUp) && (VoltageStabilizerParameters.КабельВход > 0)) { LearnMain.setIntent(ModulesEnum.openN502BtoPower); } else { LearnMain.setIntent(ModulesEnum.openVoltageStabilizer); } if ((TestMain.getIntent() == ModulesEnum.VoltageStabilizerSetUp) && (VoltageStabilizerParameters.КабельВход > 0)) { TestMain.setIntent(ModulesEnum.openN502BtoPower); } else { TestMain.setIntent(ModulesEnum.openVoltageStabilizer); } }
public N502BForm() { InitializeComponent(); N502BParameters.ParameterChanged += RefreshFormElements; if (ParametersConfig.IsTesting) { N502BParameters.TestModuleRef = this; N502BParameters.Action += TestMain.Action; } N502BParameters.СтанцияСгорела += ВыводСообщенияСтанцияСгорела; N502BParameters.НекорректноеДействие += ВыводСообщенияНекорректноеДействие; RefreshFormElements(); LearnMain.isMainWindow = false; switch (LearnMain.getIntent()) { case ModulesEnum.openN502BtoCheck: LearnMain.form = this; LearnMain.setIntent(ModulesEnum.N502Check); break; case ModulesEnum.openN502BtoPower: if (VoltageStabilizer.VoltageStabilizerParameters.КабельВход > 0) { LearnMain.form = this; LearnMain.setIntent(ModulesEnum.N502Power); } break; default: break; } switch (TestMain.getIntent()) { case ModulesEnum.openN502BtoCheck: IsExactModule = true; TestMain.setIntent(ModulesEnum.N502Check); break; case ModulesEnum.openN502BtoPower: IsExactModule = true; if (VoltageStabilizer.VoltageStabilizerParameters.КабельВход > 0) { TestMain.setIntent(ModulesEnum.N502Power); } break; default: break; } }
private void N15Form_FormClosed(object sender, FormClosedEventArgs e) { N15Parameters.ParameterChanged -= RefreshFormElements; if (ParametersConfig.IsTesting) { N15Parameters.Action -= TestMain.Action; N15LocalParameters.Action -= TestMain.Action; } if (LearnMain.getIntent() == ModulesEnum.N15Power) { if (LearnMain.globalIntent == GlobalIntentEnum.OneChannel) { if (N15Parameters.ТумблерЦ300М1 && N15Parameters.ТумблерЦ300М2 && N15Parameters.ТумблерЦ300М3 && N15Parameters.ТумблерЦ300М4 && N15Parameters.ТумблерАФСС && !N15Parameters.ТумблерАнтЭкв && N15Parameters.ТумблерА403 && N15Parameters.ЛампочкаБМА_1 && N15Parameters.ЛампочкаБМА_2 && N15Parameters.ЛампочкаМШУ && N15Parameters.ТумблерТлфТлгПрд && N15Parameters.ТумблерТлфТлгПрм) { LearnMain.setIntent(ModulesEnum.A205_m1_Open); } else { LearnMain.setIntent(ModulesEnum.openN15); } } } switch (TestMain.getIntent()) { //NB: здесь оставлена проверка на 95 норматив case ModulesEnum.N15Power: if (N15LocalParameters.локТумблерА205Base && N15LocalParameters.локТумблерА20512 && N15Parameters.Н13_1) { TestMain.setIntent(ModulesEnum.A205_m1_Open); } else { TestMain.setIntent(ModulesEnum.openN15); } break; case ModulesEnum.N15SmallLoop: if (N15Parameters.ТумблерМШУ && N15Parameters.ТумблерН12С && N15Parameters.ТумблерА503Б) { TestMain.setIntent(ModulesEnum.A304_open); } else { TestMain.setIntent(ModulesEnum.openN15SmallLoop); } break; } }
private void N502BForm_FormClosed(object sender, FormClosedEventArgs e) { N502BParameters.ParameterChanged -= RefreshFormElements; N502BParameters.СтанцияСгорела -= ВыводСообщенияСтанцияСгорела; N502BParameters.НекорректноеДействие -= ВыводСообщенияНекорректноеДействие; if (ParametersConfig.IsTesting) { N502BParameters.Action -= TestMain.Action; } switch (LearnMain.getIntent()) { case ModulesEnum.N502Check: LearnMain.setIntent(ModulesEnum.openVoltageStabilizer); break; case ModulesEnum.N502Power: if ((N502BParameters.ЛампочкаСфазировано) && (N502BParameters.Н15Включен) && (N502BParameters.ТумблерЭлектрооборудование) && (N502BParameters.ТумблерН13_1) && (N502BParameters.ТумблерН13_2) && (N502BParameters.ТумблерВыпрямитель27В)) { LearnMain.setIntent(ModulesEnum.openN15); } break; } switch (TestMain.getIntent()) { case ModulesEnum.N502Check: TestMain.setIntent(ModulesEnum.openVoltageStabilizer); break; case ModulesEnum.N502Power: if ((N502BParameters.ЛампочкаСфазировано) && (N502BParameters.Н15Включен) && (N502BParameters.ТумблерЭлектрооборудование) && (N502BParameters.ТумблерН13_1) && (N502BParameters.ТумблерН13_2) && (N502BParameters.ТумблерВыпрямитель27В)) { TestMain.setIntent(ModulesEnum.openN15); IsExactModule = false; } break; } //if (LearnMain.globalIntent == GlobalIntentEnum.nill) // LearnMain.setIntent(ModulesEnum.chooseLearnType); }
/// <summary> /// Инициализирует новый экземпляр класса <see cref="N15Form"/> /// </summary> public N15Form() { this.InitializeComponent(); N15Parameters.ParameterChanged += RefreshFormElements; if (ParametersConfig.IsTesting) { N15Parameters.TestModuleRef = this; N15Parameters.Action += TestMain.Action; N15LocalParameters.TestModuleRef = this; N15LocalParameters.Action += TestMain.Action; } N15Parameters.IndicatorChanged += RefreshIndicator; RefreshFormElements(); LearnMain.form = this; switch (LearnMain.getIntent()) { case ModulesEnum.openN15: LearnMain.setIntent(ModulesEnum.N15Power); break; case ModulesEnum.H15Inside_open: LearnMain.setIntent(ModulesEnum.H15Inside_open_from_H15); break; } switch (TestMain.getIntent()) { case ModulesEnum.openN15: TestMain.setIntent(ModulesEnum.N15Power); IsExactModule = true; break; case ModulesEnum.openN15SmallLoop: TestMain.setIntent(ModulesEnum.N15SmallLoop); IsExactModule = true; break; case ModulesEnum.H15Inside_open: TestMain.setIntent(ModulesEnum.H15Inside_open_from_H15); break; } }
private void A205M_1Form_FormClosed(object sender, FormClosedEventArgs e) { A205M_1Parameters.ParameterChanged -= RefreshFormElements; if (LearnMain.getIntent() == ModulesEnum.A205_m1_Power) { if (LearnMain.globalIntent == GlobalIntentEnum.OneChannel) { if (A205M_1Parameters.ПереключательВидРаботы == 3 && A205M_1Parameters.ПереключательВходЧТ == 1) { LearnMain.setIntent(ModulesEnum.H15Inside_open); } else { LearnMain.setIntent(ModulesEnum.A205_m1_Open); } } else if (TestMain.globalIntent == GlobalIntentEnum.Normativ95) { if (A205M_1Parameters.ПереключательВидРаботы == 3 && A205M_1Parameters.ПереключательВходЧТ == 1) { LearnMain.setIntent(ModulesEnum.openN15SmallLoop); } else { LearnMain.setIntent(ModulesEnum.A205_m1_Open); } } } if (TestMain.getIntent() == ModulesEnum.A205_m1_Power) { //if (LearnMain.globalIntent == GlobalIntentEnum.OneChannel) //{ if (A205M_1Parameters.ПереключательВидРаботы == 3 && A205M_1Parameters.ПереключательВходЧТ == 1) { TestMain.setIntent(ModulesEnum.H15Inside_open); } else { TestMain.setIntent(ModulesEnum.A205_m1_Open); } //} } }
private void A304Form_FormClosed(object sender, FormClosedEventArgs e) { A304Parameters.ParameterChanged -= RefreshFormElements; switch (TestMain.getIntent()) { case ModulesEnum.A304_set_trunk: if (A304Parameters.Комплект2Включен && A304Parameters.ПереключательВыборСтвола == 5 && A304Parameters.ТумблерКомплект == false) { TestMain.setIntent(ModulesEnum.H15Inside_open); } else { TestMain.setIntent(ModulesEnum.A304_open); } break; } }
/// <summary> /// Инициализирует новый экземпляр класса <see cref="A304Form"/>. /// </summary> public A304Form() { this.InitializeComponent(); A304Parameters.ParameterChanged += RefreshFormElements; RefreshFormElements(); if (ParametersConfig.IsTesting) { A304Parameters.TestModuleRef = this; A304Parameters.Action += TestMain.Action; } switch (TestMain.getIntent()) { case ModulesEnum.A304_open: TestMain.setIntent(ModulesEnum.A304_set_trunk); IsExactModule = true; break; } }
/// <summary> /// Инициализирует новый экземпляр класса <see cref="R440OForm"/> /// </summary> public R440OForm() { this.InitializeComponent(); Antenna.StartServerPing(); Antenna.ErrorEvent += ServerError; TestMain.close += Close; if (ParametersConfig.getIsLearning()) { TextHelperForm textHelper = new TextHelperForm(); textHelper.Show(); LearnMain.setHelpForms(this, textHelper); LearnMain.setIntent(ModulesEnum.openPowerCabeltoPower); } else if (ParametersConfig.IsTesting) { TestMain.setIntent(ModulesEnum.openPowerCabeltoPower); } }
private void PowerCabelForm_FormClosed(object sender, FormClosedEventArgs e) { if (!PowerCabelParameters.КабельСеть) { LearnMain.setIntent(ModulesEnum.openPowerCabeltoPower); TestMain.setIntent(ModulesEnum.openPowerCabeltoPower); } else { LearnMain.setIntent(ModulesEnum.openN502BtoCheck); TestMain.setIntent(ModulesEnum.openN502BtoCheck); } PowerCabelParameters.ParameterChanged -= RefreshFormElements; PowerCabelParameters.СтанцияСгорела -= ВыводСообщенияСтанцияСгорела; if (ParametersConfig.IsTesting) { PowerCabelParameters.Action -= TestMain.Action; } }
/// <summary> /// Инициализирует новый экземпляр класса <see cref="A205M_1Form"/>. /// </summary> public A205M_1Form() { this.InitializeComponent(); A205M_1Parameters.ParameterChanged += RefreshFormElements; RefreshFormElements(); if (ParametersConfig.IsTesting) { A205M_1Parameters.TestModuleRef = this; A205M_1Parameters.Action += TestMain.Action; } if (LearnMain.getIntent() == ModulesEnum.A205_m1_Open) { LearnMain.form = this; LearnMain.setIntent(ModulesEnum.A205_m1_Power); } if (TestMain.getIntent() == ModulesEnum.A205_m1_Open) { TestMain.setIntent(ModulesEnum.A205_m1_Power); } }
/// <summary> /// Инициализирует новый экземпляр класса <see cref="VoltageStabilizerForm"/> /// </summary> public VoltageStabilizerForm() { InitializeComponent(); VoltageStabilizerParameters.ParameterChanged += RefreshFormElements; VoltageStabilizerParameters.ОператорСтанцииПораженТоком += ВыводСообщенияОператорСтанцииПоражёнТоком; RefreshFormElements(); if (ParametersConfig.IsTesting) { VoltageStabilizerParameters.TestModuleRef = this; VoltageStabilizerParameters.Action += TestMain.Action; } if (LearnMain.getIntent() == ModulesEnum.openVoltageStabilizer) { LearnMain.form = this; LearnMain.setIntent(ModulesEnum.VoltageStabilizerSetUp); } if (TestMain.getIntent() == ModulesEnum.openVoltageStabilizer) { IsExactModule = true; TestMain.setIntent(ModulesEnum.VoltageStabilizerSetUp); } }