Ejemplo n.º 1
0
        private void ApplyCellButton_Click(object sender, RoutedEventArgs e)
        {
            var text = new TextRange(MergeValueTextBox.Document.ContentStart, MergeValueTextBox.Document.ContentEnd).Text;

            text = text.Substring(0, text.LastIndexOf("\r\n"));

            (MergeDataGrid.Model as DiffGridModel).SetCellText(MergeDataGrid.CurrentCell.Row.Value, MergeDataGrid.CurrentCell.Column.Value, text);

            excelWorkBook.SetCellValue(_currentSheetName, MergeDataGrid.CurrentCell.Row.Value, MergeDataGrid.CurrentCell.Column.Value, text);

            MergeDataGrid.NotifyRefresh();
        }
Ejemplo n.º 2
0
        private void UseRightButton_Click(object sender, RoutedEventArgs e)
        {
            if (_diffView == null)
            {
                return;
            }

            var text = _diffView.GetCurrentCellText(false);

            (MergeDataGrid.Model as DiffGridModel).SetCellText(MergeDataGrid.CurrentCell.Row.Value, MergeDataGrid.CurrentCell.Column.Value, text);

            excelWorkBook.SetCellValue(_currentSheetName, MergeDataGrid.CurrentCell.Row.Value, MergeDataGrid.CurrentCell.Column.Value, text);

            MergeDataGrid.NotifyRefresh();
        }