Ejemplo n.º 1
0
 public EsuDesTimerViewModel()
     : base(0, 0, TaskCreationOptions.LongRunning)
 {
     buttonCollection = new EsuToolBarButtonCollection(EsuButtonToolBarType.TextAndImage);
       startButton = new EsuButtonBase(Start) {Text = "Start", Description = "Start time"};
       stopButton = new EsuButtonBase(Stop) {Text = "Stop", Description = "Stop time"};
       resetButton = new EsuButtonBase(Reset) {Text = "Reset", Description = "Reset time"};
       buttonCollection.Add(startButton);
       buttonCollection.Add(stopButton);
       buttonCollection.Add(resetButton);
       NotifyOfPropertyChange(() => ButtonCollection);
       StopButton.Enable = false;
 }
Ejemplo n.º 2
0
        public MainWindow()
        {
            InitializeComponent();

              var collection = new EsuToolBarButtonCollection(EsuButtonToolBarType.TextAndImage);
              var button = new EsuButtonBase("Test", 0, DoAction) { Description = "Test button" };
              collection.Add(button);
              collection.Add((EsuButtonBase)button.Clone());
              collection.Add((EsuButtonBase)button.Clone());
              collection.Add((EsuButtonBase)button.Clone());

              DataContext = collection;
        }