Esempio n. 1
0
 private void SendState()
 {
     if (ActiveTimeEntry == null)
     {
         entryState = FABButtonState.Start;
     }
     else if (ActiveTimeEntry.State == TimeEntryState.New && ActiveTimeEntry.StopTime.HasValue)
     {
         entryState = FABButtonState.Save;
     }
     else if (ActiveTimeEntry.State == TimeEntryState.Running)
     {
         entryState = FABButtonState.Stop;
     }
     else
     {
         entryState = FABButtonState.Start;
     }
     if (FABStateChange != null)
     {
         FABStateChange.Invoke(this, EventArgs.Empty);  // Initial rendering
     }
 }
Esempio n. 2
0
 private void SendState ()
 {
     if (ActiveTimeEntry == null) {
         entryState = FABButtonState.Start;
     } else if (ActiveTimeEntry.State == TimeEntryState.New && ActiveTimeEntry.StopTime.HasValue) {
         entryState = FABButtonState.Save;
     } else if (ActiveTimeEntry.State == TimeEntryState.Running) {
         entryState = FABButtonState.Stop;
     } else {
         entryState = FABButtonState.Start;
     }
     if (FABStateChange != null) {
         FABStateChange.Invoke (this, EventArgs.Empty); // Initial rendering
     }
 }