public StatusVM(AreaVM areaVM) { _areaVM = areaVM; RefreshCommand = new DelegateCommand(Refresh); CommitCommand = new DelegateCommand(Commit); }
public BranchVM(AreaVM areaVM, Branch branch) { _areaVM = areaVM; _branch = branch; CheckoutCommand = new DelegateCommand(Checkout); LogCommand = new DelegateCommand(Log); }
private CustomMessageBox(string message, string title, string[] options, int cancelOption, MessageBoxImage icon) { ButtonClickCommand = new DelegateCommand<int>(ButtonClick); Result = cancelOption; Message = message; Title = title; Options = options; Icon messageBoxIcon; if (icon == MessageBoxImage.Error) messageBoxIcon = SystemIcons.Error; else if (icon == MessageBoxImage.Hand) messageBoxIcon = SystemIcons.Hand; else if (icon == MessageBoxImage.Stop) messageBoxIcon = SystemIcons.Shield; // No stop icon? else if (icon == MessageBoxImage.Question) messageBoxIcon = SystemIcons.Question; else if (icon == MessageBoxImage.Exclamation) messageBoxIcon = SystemIcons.Exclamation; else if (icon == MessageBoxImage.Warning) messageBoxIcon = SystemIcons.Warning; else if (icon == MessageBoxImage.Information) messageBoxIcon = SystemIcons.Information; else if (icon == MessageBoxImage.Asterisk) messageBoxIcon = SystemIcons.Asterisk; else // if(icon == MessageBoxImage.None) messageBoxIcon = null; if (messageBoxIcon != null) Image = Imaging.CreateBitmapSourceFromHIcon(messageBoxIcon.Handle, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions()); InitializeComponent(); NotifyPropertyChanged("Title"); NotifyPropertyChanged("Options"); this.DataContext = this; }