コード例 #1
0
 private void View_DetailPreviewMouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     var view = profileDetailgridControl.View as TableView;
     TableViewHitInfo hi = view.CalcHitInfo(e.OriginalSource as DependencyObject);
     if (hi.InRow && hi.Column != null)
     {
         var row = profileDetailgridControl.GetRow(hi.RowHandle) as Y_NORM_PROFILE_DETAIL;
         if (IsNotExistsProfileInNormative(row.ID))
         {
             if (hi.Column.FieldName.Equals("ID_PARAM") ||
                 hi.Column.FieldName.Equals("Y_NORM_PARAMETERS.DESC_RU"))
             {
                 if (_addDetailCollection.Contains(row))
                 {
                     var winParam = new WindowEditParameters();
                     winParam.ParameterSelected += winParam_ParameterSelected;
                     winParam.ShowDialog();
                 }
             }
             if ((hi.Column.FieldName.Equals("VALUE") || hi.Column.FieldName.Equals("VALUE_DESC")) &&
                 row.ID_PARAM != 0)
             {
                 var winParamValues = new WindowDirectoryParameters(Convert.ToInt32(row.ID_PARAM), true);
                 winParamValues.DirectoryParamSelected += winParamValues_DirectoryParamSelected;
                 winParamValues.ShowDialog();
             }
         }
     }
 }
コード例 #2
0
 private void BtnParamDefaultButtonClick(object sender, RoutedEventArgs e)
 {
     try
     {
         var winParam = new WindowEditParameters((Y_NORM_NORMATIVE_CELL) DataContext);
         winParam.ParameterSelected += WinParamParameterSelected;
         winParam.ShowDialog();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }