示例#1
0
        private void EditorManager_Click(object sender, EditorActionEventArgs args)
        {
            switch (args.Action)
            {
            case EditorAction.Save:
                this.activeEditor.Save();
                break;

            case EditorAction.Undo:
                this.activeEditor.Undo();
                break;

            case EditorAction.Redo:
                this.activeEditor.Redo();
                break;

            case EditorAction.Cut:
                this.activeEditor.Cut();
                break;

            case EditorAction.Copy:
                this.activeEditor.Copy();
                break;

            case EditorAction.Paste:
                this.activeEditor.Paste();
                break;

            case EditorAction.Find:
                this.activeEditor.ShowFindDialog();
                break;

            case EditorAction.Replace:
                this.activeEditor.ShowReplaceDialog();
                break;

            case EditorAction.Goto:
                this.activeEditor.ShowGoToLineDialog();
                break;

            default:
                throw new NotSupportedException(string.Format("Unsupported editor action - {0}", (object)args.Action));
            }
        }
示例#2
0
		private void EditorManager_Click(object sender, EditorActionEventArgs args)
		{
			switch (args.Action)
			{
				case EditorAction.Save:
					this.activeEditor.Save();
					break;
				case EditorAction.Undo:
					this.activeEditor.Undo();
					break;
				case EditorAction.Redo:
					this.activeEditor.Redo();
					break;
				case EditorAction.Cut:
					this.activeEditor.Cut();
					break;
				case EditorAction.Copy:
					this.activeEditor.Copy();
					break;
				case EditorAction.Paste:
					this.activeEditor.Paste();
					break;
				case EditorAction.Find:
					this.activeEditor.ShowFindDialog();
					break;
				case EditorAction.Replace:
					this.activeEditor.ShowReplaceDialog();
					break;
				case EditorAction.Goto:
					this.activeEditor.ShowGoToLineDialog();
					break;
				default:
					throw new NotSupportedException(string.Format("Unsupported editor action - {0}", (object)args.Action));
			}
		}