public void Add(ActionButtonModel buttonModel) { ActionButtonViewModel vm = new ActionButtonViewModel(buttonModel); ButtonViewModels.Add(vm); Enable(buttonModel); Added?.Invoke(vm); }
ActionButtonModel AddButton(ActionPanelModel panel, string text, Action action) { ActionButtonModel m = new ActionButtonModel(); m.Text = text; m.Clicked += action; panel.Add(m); return(m); }
ActionButtonModel AddButton(ActionPanelModel panel, string text, Action action, double width, string pathData, bool filled) { ActionButtonModel m = AddButton(panel, text, action); m.Width = width; m.FilledPath = filled; m.PathData = Geometry.Parse(pathData); return(m); }
public void Disable(ActionButtonModel buttonModel) { }
public void Enable(ActionButtonModel buttonModel) { }
public void Remove(ActionButtonModel buttonModel) { }
void SubscribeModel(ActionButtonModel m) { m.PropertyChanged += OnPropertyChanged; }
public ActionButtonViewModel(ActionButtonModel model) { Model = model; SubscribeModel(model); Clicked = new RelayCommand(OnClicked, () => Model.Active); }
void AddLocalRepoButtons() { AddButton(LocalRepoPanel, "Commit", OnCommit); CheckoutButton = AddButton(LocalRepoPanel, "Checkout", OnCheckout); StashButton = AddButton(LocalRepoPanel, "Stash", OnStash); }