コード例 #1
0
        public EditorTabViewModel(OfficePartViewModel part, MainWindowViewModel mainWindow)
        {
            this.part       = part;
            this.MainWindow = mainWindow;

            this.CutCommand       = new RelayCommand(() => this.Cut?.Invoke(this, EventArgs.Empty));
            this.CopyCommand      = new RelayCommand(() => this.Copy?.Invoke(this, EventArgs.Empty));
            this.PasteCommand     = new RelayCommand(() => this.Paste?.Invoke(this, EventArgs.Empty));
            this.UndoCommand      = new RelayCommand(() => this.Undo?.Invoke(this, EventArgs.Empty));
            this.RedoCommand      = new RelayCommand(() => this.Redo?.Invoke(this, EventArgs.Empty));
            this.SelectAllCommand = new RelayCommand(() => this.SelectAll?.Invoke(this, EventArgs.Empty));
        }
コード例 #2
0
        public EditorTabViewModel(OfficePartViewModel part, MainWindowViewModel mainWindow)
        {
            this.part       = part;
            this.MainWindow = mainWindow;

            this.CutCommand           = new RelayCommand(() => this.Cut?.Invoke(this, EventArgs.Empty));
            this.CopyCommand          = new RelayCommand(() => this.Copy?.Invoke(this, EventArgs.Empty));
            this.PasteCommand         = new RelayCommand(() => this.Paste?.Invoke(this, EventArgs.Empty));
            this.UndoCommand          = new RelayCommand(() => this.Undo?.Invoke(this, EventArgs.Empty));
            this.RedoCommand          = new RelayCommand(() => this.Redo?.Invoke(this, EventArgs.Empty));
            this.SelectAllCommand     = new RelayCommand(() => this.SelectAll?.Invoke(this, EventArgs.Empty));
            this.FoldCommand          = new RelayCommand <int>(level => this.Fold?.Invoke(this, new FoldEventArgs(level)));
            this.UnfoldCommand        = new RelayCommand <int>(level => this.Fold?.Invoke(this, new FoldEventArgs(level, true)));
            this.FoldCurrentCommand   = new RelayCommand(() => this.Fold?.Invoke(this, new FoldEventArgs(true)));
            this.UnfoldCurrentCommand = new RelayCommand(() => this.Fold?.Invoke(this, new FoldEventArgs(true, true)));
        }
コード例 #3
0
 public EditorTabViewModel(OfficePartViewModel part, MainWindowViewModel mainWindow)
 {
     _part      = part;
     MainWindow = mainWindow;
 }