コード例 #1
0
        public void Add(ActionButtonModel buttonModel)
        {
            ActionButtonViewModel vm = new ActionButtonViewModel(buttonModel);

            ButtonViewModels.Add(vm);
            Enable(buttonModel);
            Added?.Invoke(vm);
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #4
0
 public void Disable(ActionButtonModel buttonModel)
 {
 }
コード例 #5
0
 public void Enable(ActionButtonModel buttonModel)
 {
 }
コード例 #6
0
 public void Remove(ActionButtonModel buttonModel)
 {
 }
コード例 #7
0
 void SubscribeModel(ActionButtonModel m)
 {
     m.PropertyChanged += OnPropertyChanged;
 }
コード例 #8
0
 public ActionButtonViewModel(ActionButtonModel model)
 {
     Model = model;
     SubscribeModel(model);
     Clicked = new RelayCommand(OnClicked, () => Model.Active);
 }
コード例 #9
0
 void AddLocalRepoButtons()
 {
     AddButton(LocalRepoPanel, "Commit", OnCommit);
     CheckoutButton = AddButton(LocalRepoPanel, "Checkout", OnCheckout);
     StashButton    = AddButton(LocalRepoPanel, "Stash", OnStash);
 }