Ejemplo n.º 1
0
        private void EditControl()
        {
            var dcsBIOSInput       = (DCSBIOSInput)DataGridValues.SelectedItem;
            var dcsBiosInputWindow = new DCSBiosInputWindow(_header, dcsBIOSInput);

            if (dcsBiosInputWindow.ShowDialog() == true)
            {
                _dcsbiosInputs.Remove(dcsBIOSInput);
                var tmpdcsBiosInput = dcsBiosInputWindow.DCSBiosInput;
                _dcsbiosInputs.Add(tmpdcsBiosInput);
                SetIsDirty();
                ShowItems();
            }
            ShowItems();
            SetFormState();
        }
Ejemplo n.º 2
0
        private void AddNewControl()
        {
            var dcsBiosInputWindow = new DCSBiosInputWindow(string.Empty);

            dcsBiosInputWindow.ShowDialog();
            if (dcsBiosInputWindow.DialogResult.HasValue && dcsBiosInputWindow.DialogResult.Value)
            {
                var dcsBiosInput = dcsBiosInputWindow.DCSBiosInput;
                // 1 appropriate text to textbox
                // 2 update bindings
                _dcsbiosInputs.Add(dcsBiosInput);
                SetIsDirty();
            }

            SetFormState();
            ShowItems();
        }
Ejemplo n.º 3
0
 private void EditButton_OnClick(object sender, RoutedEventArgs e)
 {
     try
     {
         var dcsBIOSInput       = (DCSBIOSInput)DataGridValues.SelectedItem;
         var dcsBiosInputWindow = new DCSBiosInputWindow(_dcsAirframe, _header, dcsBIOSInput);
         if (dcsBiosInputWindow.ShowDialog() == true)
         {
             _dcsbiosInputs.Remove(dcsBIOSInput);
             var tmpdcsBiosInput = dcsBiosInputWindow.DCSBiosInput;
             _dcsbiosInputs.Add(tmpdcsBiosInput);
             SetIsDirty();
             ShowItems();
         }
         ShowItems();
         SetFormState();
     }
     catch (Exception ex)
     {
         Common.ShowErrorMessageBox(1072, ex);
     }
 }
Ejemplo n.º 4
0
 private void NewControlButton_OnClick(object sender, RoutedEventArgs e)
 {
     try
     {
         DCSBiosInputWindow dcsBiosInputWindow;
         dcsBiosInputWindow = new DCSBiosInputWindow();
         dcsBiosInputWindow.ShowDialog();
         if (dcsBiosInputWindow.DialogResult.HasValue && dcsBiosInputWindow.DialogResult.Value)
         {
             var dcsBiosInput = dcsBiosInputWindow.DCSBiosInput;
             //1 appropriate text to textbox
             //2 update bindings
             _dcsbiosInputs.Add(dcsBiosInput);
             SetIsDirty();
         }
         SetFormState();
         ShowItems();
     }
     catch (Exception ex)
     {
         Common.ShowErrorMessageBox(1016, ex);
     }
 }