Beispiel #1
0
 /// <summary>
 /// Нажатие на пукн меню "Z Calculator"
 /// </summary>
 /// <param name="sender">Истончик события.</param>
 /// <param name="e">Параметры события.</param>
 private void ZCalculatorToolStripMenuItemClick(object sender, EventArgs e)
 {
     if (_calculatorZ == null)
     {
         _calculatorZ = new CalculatorZForm
         {
             Frequencies = _project.Frequencies
         };
     }
     _calculatorZ.Visible = true;
 }
Beispiel #2
0
 /// <summary>
 /// Изменение текущего списка компонентов.
 /// </summary>
 /// <param name="sender">Истончик события.</param>
 /// <param name="e">Параметры события.</param>
 private void IComponentBindingSourceCurrentChanged(object sender, EventArgs e)
 {
     if (_calculatorZ == null)
     {
         _calculatorZ = new CalculatorZForm
         {
             Frequencies = _project.Frequencies
         };
     }
     _calculatorZ.Circuit           = (CircuitBase)iComponentBindingSource.Current;
     _circuitDetailForm.CircuitBase = (CircuitBase)iComponentBindingSource.Current;
 }
Beispiel #3
0
        /// <summary>
        /// Создает новый экземпляр формы.
        /// </summary>
        public MainForm()
        {
            InitializeComponent();
#if DEBUG
            //// var test = new TestForm();
            // test.ShowDialog();
#endif

            _project = new Project
            {
                Circuits    = new List <IComponent>(),
                Frequencies = new List <double>()
            };
            iComponentBindingSource.DataSource = _project.Circuits;
            _calculatorZ       = new CalculatorZForm();
            _circuitDetailForm = new CircuitDetailForm(FormOpenModeEnum.LiveEdit);
        }