public RPDU_form(RPDU rPDU) { InitializeComponent(); // TODO: Complete member initialization this.rPDU = rPDU; label_rpduN.Text = rPDU.RPDU_Numb.ToString(); label_freq.Text = rPDU.Get_Text_Freq(); }
/// <summary> /// Установка состояния РПДУ и вывод на <c>Main_form</c> /// </summary> /// <param name="rpdu"> РПДУ</param> /// <param name="state">Состояние -<c>(int)State_RPDU.состояние</c></param> private void FM_RPDU_State(RPDU rpdu, int state) { try { rpdu.State_R = state; } catch (ArgumentException ex) { } if (rpdu == RPDU_list[0]) { label_RPDU1_state.BackColor = RPDU_list[0].State_Text_Color(); label_RPDU1_state.Text = RPDU_list[0].State_Text_R(); } else if (rpdu == RPDU_list[1]) { label_RPDU2_state.BackColor = RPDU_list[1].State_Text_Color(); label_RPDU2_state.Text = RPDU_list[1].State_Text_R(); } else if (rpdu == RPDU_list[2]) { label_RPDU3_state.BackColor = RPDU_list[2].State_Text_Color(); label_RPDU3_state.Text = RPDU_list[2].State_Text_R(); } else if (rpdu == RPDU_list[3]) { label_RPDU4_state.BackColor = RPDU_list[3].State_Text_Color(); label_RPDU4_state.Text = RPDU_list[3].State_Text_R(); } else throw new ArgumentException(); }
/// <summary> /// Установка класса излучения для РПДУ и вывод на <c>Main_form</c> /// </summary> /// <param name="rpdu"> РПДУ</param> /// <param name="cl">Устанавливаемый класс -<c>(int)Class_RPDU.класс</c></param> private void FM_RPDU_Izl_Class(RPDU rpdu, int cl) { try { rpdu.Class_R = cl; } catch (ArgumentException ex) { } if (rpdu == RPDU_list[0]) label_RPDU1_class.Text = RPDU_list[0].Class_Text_R(); else if (rpdu == RPDU_list[1]) label_RPDU2_class.Text = RPDU_list[1].Class_Text_R(); else if (rpdu == RPDU_list[2]) label_RPDU3_class.Text = RPDU_list[2].Class_Text_R(); else if (rpdu == RPDU_list[3]) label_RPDU4_class.Text = RPDU_list[3].Class_Text_R(); else throw new ArgumentException(); }
/// <summary> /// Установка мощности излучения для РПДУ и вывод на <c>Main_form</c> /// </summary> /// <param name="rpdu"> РПДУ</param> /// <param name="cl">Мощность -<c>(int)Power_RPDU.мощность</c></param> private void FM_RPDU_Power(RPDU rpdu, int power) { try { rpdu.Power_R = power; } catch (ArgumentException ex) { } if (rpdu == RPDU_list[0]) label_RPDU1_power.Text = RPDU_list[0].Power_Text_R(); else if (rpdu == RPDU_list[1]) label_RPDU2_power.Text = RPDU_list[1].Power_Text_R(); else if (rpdu == RPDU_list[2]) label_RPDU3_power.Text = RPDU_list[2].Power_Text_R(); else if (rpdu == RPDU_list[3]) label_RPDU4_power.Text = RPDU_list[3].Power_Text_R(); else throw new ArgumentException(); }
/// <summary> /// Установка частоты для РПДУ и вывод на элементы <c>Main_form</c> /// </summary> /// <param name="rpdu"> РПДУ</param> /// <param name="freq"> устанавливаемая частота : 150000 - 1,5 MHz 2900099 - 29,99 MHz</param> private void FM_RPDU_Freq(RPDU rpdu, int freq) { if ((freq < 150000 || freq >= 3000000) && freq != 0) throw new ArgumentException(); else rpdu.Freq_R = freq; if (rpdu == RPDU_list[0]) label_RPDU1_freq.Text = RPDU_list[0].Get_Text_Freq(); else if (rpdu == RPDU_list[1]) label_RPDU2_freq.Text = RPDU_list[1].Get_Text_Freq(); else if (rpdu ==RPDU_list[2]) label_RPDU3_freq.Text = RPDU_list[2].Get_Text_Freq(); else if (rpdu == RPDU_list[3]) label_RPDU4_freq.Text = RPDU_list[3].Get_Text_Freq(); else throw new ArgumentException(); }