Beispiel #1
0
        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);
        }
Beispiel #4
0
 public void Disable(ActionButtonModel buttonModel)
 {
 }
Beispiel #5
0
 public void Enable(ActionButtonModel buttonModel)
 {
 }
Beispiel #6
0
 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);
 }