/// <summary> /// Initializes a new instance of the <see cref="ResXOthersGrid"/> class. /// </summary> public ResXOthersGrid(ResXEditorControl editorControl) : base(editorControl) { ResXOthersGridRow rowTemplate = new ResXOthersGridRow(); rowTemplate.MinimumHeight = 24; this.RowTemplate = rowTemplate; }
public GridRenameKeyUndoUnit(ResXStringGridRow sourceRow, ResXEditorControl control, string oldKey, string newKey) : base(oldKey, newKey) { if (sourceRow == null) { throw new ArgumentNullException("sourceRow"); } if (control == null) { throw new ArgumentNullException("control"); } this.SourceRow = sourceRow; this.Control = control; }
public MergeUndoUnit(ResXEditorControl editorControl, string file, Stack <IOleUndoUnit> partialUnits) { if (editorControl == null) { throw new ArgumentNullException("editorControl"); } if (file == null) { throw new ArgumentNullException("file"); } if (partialUnits == null) { throw new ArgumentNullException("partialUnits"); } this.EditorControl = editorControl; this.SourceFile = file; this.AppendUnits.AddRange(partialUnits); }
public ListViewRemoveItemsUndoUnit(ResXEditorControl control, List <ListViewKeyItem> items, KeyValueIdentifierConflictResolver conflictResolver) { if (control == null) { throw new ArgumentNullException("control"); } if (items == null) { throw new ArgumentNullException("items"); } if (conflictResolver == null) { throw new ArgumentNullException("conflictResolver"); } this.Items = items; this.ConflictResolver = conflictResolver; this.Control = control; }
public ListViewRenameKeyUndoUnit(ResXEditorControl control, AbstractListView listView, ListViewKeyItem item, string oldKey, string newKey) : base(oldKey, newKey) { if (control == null) { throw new ArgumentNullException("control"); } if (listView == null) { throw new ArgumentNullException("listView"); } if (item == null) { throw new ArgumentNullException("item"); } this.Item = item; this.ListView = listView; this.Control = control; }
public ListViewItemsAddUndoUnit(ResXEditorControl control, List <ListViewKeyItem> items, KeyValueIdentifierConflictResolver conflictResolver) { if (control == null) { throw new ArgumentNullException("control"); } if (items == null) { throw new ArgumentNullException("items"); } if (conflictResolver == null) { throw new ArgumentNullException("conflictResolver"); } this.Items = items; // create the reverse unit RemoveUnit = new ListViewRemoveItemsUndoUnit(control, items, conflictResolver); }
public ListViewNewItemCreateUndoUnit(ResXEditorControl control, ListViewKeyItem item, KeyValueIdentifierConflictResolver conflictResolver) { if (control == null) { throw new ArgumentNullException("control"); } if (item == null) { throw new ArgumentNullException("item"); } if (conflictResolver == null) { throw new ArgumentNullException("conflictResolver"); } this.Item = item; RemoveUnit = new ListViewRemoveItemsUndoUnit(control, new List <ListViewKeyItem>() { item }, conflictResolver); }
/// <summary> /// Initializes a new instance of the <see cref="AbstractResXEditorGrid"/> class. /// </summary> public AbstractResXEditorGrid(ResXEditorControl editorControl) : base(false, editorControl.conflictResolver) { this.editorControl = editorControl; this.AllowUserToAddRows = true; this.ShowEditingIcon = false; this.MultiSelect = true; this.Dock = DockStyle.Fill; this.BackColor = Color.White; this.BorderStyle = BorderStyle.None; this.ClipboardCopyMode = DataGridViewClipboardCopyMode.Disable; this.ScrollBars = ScrollBars.Both; this.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells; this.AutoSize = true; // to remove rows this.editorControl.RemoveRequested += new Action <REMOVEKIND>(EditorControl_RemoveRequested); // to change depending buttons and context menu state (enabled/disabled) this.SelectionChanged += new EventHandler((o, e) => { NotifyItemsStateChanged(); }); this.NewRowNeeded += new DataGridViewRowEventHandler((o, e) => { NotifyItemsStateChanged(); }); this.MouseDown += new MouseEventHandler(Grid_MouseDown); this.Resize += new EventHandler(Grid_Resize); this.ColumnWidthChanged += new DataGridViewColumnEventHandler(Grid_ColumnWidthChanged); ResXStringGridRow rowTemplate = new ResXStringGridRow(); rowTemplate.MinimumHeight = 24; this.RowTemplate = rowTemplate; this.ContextMenu = BuildContextMenu(); this.ContextMenu.Popup += new EventHandler(ContextMenu_Popup); this.ColumnHeadersHeight = 24; UpdateContextItemsEnabled(); }
public GridRowAddUndoUnit(ResXEditorControl control, List <ResXStringGridRow> rows, AbstractResXEditorGrid grid, KeyValueIdentifierConflictResolver conflictResolver) { if (control == null) { throw new ArgumentNullException("control"); } if (grid == null) { throw new ArgumentNullException("grid"); } if (rows == null) { throw new ArgumentNullException("rows"); } if (conflictResolver == null) { throw new ArgumentNullException("conflictResolver"); } this.Rows = rows; this.Grid = grid; this.ConflictResolver = conflictResolver; this.Control = control; }
public RemoveStringsUndoUnit(ResXEditorControl control, List <ResXStringGridRow> elements, AbstractResXEditorGrid grid, KeyValueIdentifierConflictResolver conflictResolver) { if (control == null) { throw new ArgumentNullException("control"); } if (elements == null) { throw new ArgumentNullException("elements"); } if (grid == null) { throw new ArgumentNullException("grid"); } if (conflictResolver == null) { throw new ArgumentNullException("conflictResolver"); } this.Elements = elements; this.Grid = grid; this.ConflictResolver = conflictResolver; this.Control = control; }
public ResXIconsList(ResXEditorControl editorControl) : base(editorControl) { }
public ResXFilesList(ResXEditorControl editorControl) : base(editorControl) { }
public ResXSoundsList(ResXEditorControl editorControl) : base(editorControl) { }
public ResXImagesList(ResXEditorControl editorControl) : base(editorControl) { }
/// <summary> /// Initializes a new instance of the <see cref="ResXStringGrid"/> class. /// </summary> public ResXStringGrid(ResXEditorControl editorControl) : base(editorControl) { this.editorControl.NewTranslatePairAdded += new Action <TRANSLATE_PROVIDER>(EditorControl_TranslateRequested); this.editorControl.TranslateRequested += new Action <TRANSLATE_PROVIDER, string, string>(EditorControl_TranslateRequested); this.editorControl.InlineRequested += new Action <INLINEKIND>(EditorControl_InlineRequested); }