private void PropertyCheckBox_Click(object sender, RoutedEventArgs e) { CheckBox checkBox = sender as CheckBox; DataGridRow parentRow = WPFHelper.GetParentObject <DataGridRow>(checkBox, null); PropertyListItem sourceItem = parentRow.Item as PropertyListItem; GlobalCfg.Instance.SetCurrentIsNeedGen(_IDItemSelected.ID, sourceItem.EnName, checkBox.IsChecked.Value); }
private void DataGridCell_MouseDoubleClick(object sender, MouseButtonEventArgs e) { if (!_excelItemChoosed.IsEditing) { return; } DataGridCell cell = sender as DataGridCell; DataGridRow row = WPFHelper.GetParentObject <DataGridRow>(cell, null); PropertyListItem itemSource = row.Item as PropertyListItem; string branchName; for (int i = 0; i < GlobalCfg.BranchCount; i++) { branchName = Enum.GetName(typeof(Branch), i); if ((string)(cell.Column.Header) == branchName && itemSource.EnName != "id" && itemSource.EnName != "ID") { PropertyEditWindow propertyEditWindow = new PropertyEditWindow(itemSource, _IDItemSelected.ID, i); propertyEditWindow.ShowDialog(); break; } } }