Exemplo n.º 1
0
        public void Add(ActionButtonModel buttonModel)
        {
            ActionButtonViewModel vm = new ActionButtonViewModel(buttonModel);

            ButtonViewModels.Add(vm);
            Enable(buttonModel);
            Added?.Invoke(vm);
        }
Exemplo n.º 2
0
        ActionButtonModel AddButton(ActionPanelModel panel, string text, Action action)
        {
            ActionButtonModel m = new ActionButtonModel();

            m.Text     = text;
            m.Clicked += action;
            panel.Add(m);
            return(m);
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
 public void Disable(ActionButtonModel buttonModel)
 {
 }
Exemplo n.º 5
0
 public void Enable(ActionButtonModel buttonModel)
 {
 }
Exemplo n.º 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);
 }
Exemplo n.º 9
0
 void AddLocalRepoButtons()
 {
     AddButton(LocalRepoPanel, "Commit", OnCommit);
     CheckoutButton = AddButton(LocalRepoPanel, "Checkout", OnCheckout);
     StashButton    = AddButton(LocalRepoPanel, "Stash", OnStash);
 }