private void tvNameValue_AfterSelect(object sender, TreeViewEventArgs e) { if (ckbNavigation.Checked) { var item = tvNameValue.SelectedNode.Tag as ValueBookMark; if (item == null) { return; } GoTo?.Invoke(item); } }
public void Update(ConsoleKeyInfo key) { _prevSelecteIndex = _selectedIndex; if (key.Key == ConsoleKey.UpArrow && _selectedIndex != 0) { _selectedIndex--; } else if (key.Key == ConsoleKey.DownArrow && _selectedIndex < _items.Count - 1) { _selectedIndex++; } else if (key.Key == ConsoleKey.Enter) { Select?.Invoke(this, EventArgs.Empty); } else if (key.Key == ConsoleKey.F1) { ItemToOperateOn.CurrentItemToOperateOn = _selectedItem; ItemToOperateOn.CopyOrPaste = true; } else if (key.Key == ConsoleKey.F2) { ItemToOperateOn.CurrentItemToOperateOn = _selectedItem; ItemToOperateOn.CopyOrPaste = false; } else if (key.Key == ConsoleKey.F3) { Paste?.Invoke(this, new CopyOrCutEventArgs(ItemToOperateOn.CurrentItemToOperateOn, ItemToOperateOn.CopyOrPaste)); } else if (key.Key == ConsoleKey.F4) { ItemToOperateOn.CurrentItemToOperateOn = _selectedItem; ViewInfo?.Invoke(this, new ViewInfoEventArgs(ItemToOperateOn.CurrentItemToOperateOn)); } else if (key.Key == ConsoleKey.F5) { Rename?.Invoke(this, EventArgs.Empty); } else if (key.Key == ConsoleKey.F6) { ViewDrives?.Invoke(this, EventArgs.Empty); } else if (key.Key == ConsoleKey.F7) { GoTo?.Invoke(this, new RootEventArgs(Path.GetPathRoot(CurPath))); } else if (key.Key == ConsoleKey.F8) { CreateFolder?.Invoke(this, EventArgs.Empty); } }
private void tvNameValue_DoubleClick(object sender, EventArgs e) { if (tvNameValue.SelectedNode == null) { return; } var item = tvNameValue.SelectedNode.Tag as ValueBookMark; if (item == null) { return; } GoTo?.Invoke(item); }
private void GoToCountry() { GoTo?.Invoke(this); }