Exemple #1
0
 private void OnActiveTimeEntryManagerPropertyChanged(object sender, PropertyChangedEventArgs args)
 {
     if (args.PropertyName == ActiveTimeEntryManager.PropertyActive || args.PropertyName == ActiveTimeEntryManager.PropertyRunning)
     {
         if (SyncModel())
         {
             Rebind();
         }
         if (ActiveEntryChanged != null)
         {
             ActiveEntryChanged.Invoke(sender, args);
         }
     }
 }
Exemple #2
0
        public void OnStart()
        {
            // Hook up to time entry manager
            if (timeEntryManager == null)
            {
                timeEntryManager = ServiceContainer.Resolve <ActiveTimeEntryManager> ();
                timeEntryManager.PropertyChanged += OnActiveTimeEntryManagerPropertyChanged;
            }

            canRebind = true;
            SyncModel();
            Rebind();

            if (ActiveEntryChanged != null)
            {
                ActiveEntryChanged.Invoke(this, EventArgs.Empty);  // Initial rendering
            }
        }