/// <summary> /// Fire a notification that a Setting has been requested to change value. /// </summary> /// <param name="name"></param> /// <param name="newValue"></param> public void FireUpdateAppPreference(PreferenceName name, string newValue) { // PREFERENCE_CHANGED: PreferenceName, oldValue, newValue var eventArgs = new AppEventArgs(action: AppAction.PREFERENCE_CHANGED, object1: name, object2: _appSettings[name], object3: newValue); appEvent?.Invoke(this, eventArgs); }
/// <summary> /// Set the mode the Application is in. /// </summary> /// <param name="newMode"></param> public void SetApplicationMode(DataEntryMode newMode) { DataEntryMode oldMode = _appMode; _appMode = newMode; OnPropertyChanged(""); var eventArgs = new AppEventArgs(AppAction.SET_APPLICATION_MODE, oldMode, newMode); appEvent?.Invoke(this, eventArgs); }
/// <summary> /// Fire a notification that a new Work Item is being created (but has not yet been completed). /// </summary> /// <param name="workItem"></param> public void FireCreateNewWorkItem(WorkItem workItem) { IsBindingLoading = true; if (_selectedWorkItem != null) { _previouslySelectedWorkItem = _selectedWorkItem; } SelectedWorkItem = workItem; var eventArgs = new AppEventArgs(AppAction.CREATE_WORK_ITEM, workItem); appEvent?.Invoke(this, eventArgs); }
/// <summary> /// Sets the selected Work Item in the model, firing notification of the selection. /// </summary> /// <param name="wt"></param> public void SetSelectedWorkItem(WorkItem wt) { IsBindingLoading = true; if (_selectedWorkItem != null) { _previouslySelectedWorkItem = _selectedWorkItem; } SelectedWorkItem = wt; var eventArgs = new AppEventArgs(AppAction.SELECT_WORK_ITEM, wt); appEvent?.Invoke(this, eventArgs); }
/// <summary> /// Fire a notification that a Work Item has been requested to be deleted./ /// </summary> /// <param name="wi"></param> /// <param name="logicalDelete"></param> public void FireWorkItemDelete(WorkItem wi, bool logicalDelete) { AppEventArgs eventArgs = null; if (logicalDelete) { eventArgs = new AppEventArgs(AppAction.WORK_ITEM_DELETE_LOGICAL, wi); } else { eventArgs = new AppEventArgs(AppAction.WORK_ITEM_DELETE_PHYSICAL, wi); } appEvent?.Invoke(this, eventArgs); }
/// <summary> /// Add a Work Task to the collection. /// Optionally, can notify any listeners with the TaskAction of CREATED. The new object is passed through the first parameter. /// </summary> /// <param name="workItem"></param> /// <param name="notifyListeners"></param> /// /// <param name="select">Should the WorkItem be selected?</param> public void AddWorkItem(WorkItem workItem, bool notifyListeners, bool select) { if (workItem.IsConsideredActive) { _activeWorkItems.Add(workItem); } else { _closedWorkItems.Add(workItem); } if (notifyListeners) { AppEventArgs eventArgs = new AppEventArgs(AppAction.WORK_ITEM_ADDED, workItem); appEvent?.Invoke(this, eventArgs); } if (select) { SetSelectedWorkItem(workItem); } }
public void FireEditJournalEntry(WorkItem wi, JournalEntry oldEntry, JournalEntry newEntry) { var eventArgs = new AppEventArgs(AppAction.JOURNAL_ENTRY_EDITED, wi, oldEntry, newEntry); appEvent?.Invoke(this, eventArgs); }
public void FireAddJournalEntry(WorkItem wi, JournalEntry je) { var eventArgs = new AppEventArgs(AppAction.JOURNAL_ENTRY_ADDED, wi, je); appEvent?.Invoke(this, eventArgs); }
internal void FireCheckListModeChanged() { var eventArgs = new AppEventArgs(AppAction.CHECKLIST_MODE_CHANGED); appEvent?.Invoke(this, eventArgs); }
public void FireDataImportRequest() { var eventArgs = new AppEventArgs(AppAction.DATA_IMPORT); appEvent?.Invoke(this, eventArgs); }
/// <summary> /// Fire a notification that the due date has changed for a WorkItem. /// </summary> /// <param name="workItem"></param> /// <param name="newDateTime">The new DateTime that has been set.</param> public void FireDueDateChanged(WorkItem workItem, DateTime newDateTime) { var eventArgs = new AppEventArgs(AppAction.DUE_DATE_CHANGED, workItem, newDateTime); appEvent?.Invoke(this, eventArgs); }
public void FireCheckListItemMoved(CheckListItem cli, bool moveUp) { var eventArgs = new AppEventArgs(AppAction.CHECKLIST_ITEM_MOVED, SelectedWorkItem, cli, (Object)moveUp); appEvent?.Invoke(this, eventArgs); }
/// <summary> /// Fire a notification that a Work Item Status has changed for a WorkItem. /// </summary> /// <param name="wi"></param> /// <param name="newStatus"></param> /// <param name="oldStatus"></param> public void FireWorkItemStatusChange(WorkItem wi, WorkItemStatus newStatus, WorkItemStatus oldStatus) { var eventArgs = new AppEventArgs(AppAction.WORK_ITEM_STATUS_CHANGED, wi, newStatus, oldStatus); appEvent?.Invoke(this, eventArgs); }
private void FireWorkItemCheckListItemSelected(WorkItem wi, CheckListItem cli) { var eventArgs = new AppEventArgs(AppAction.CHECKLIST_ITEM_SELECTED, wi, cli); appEvent?.Invoke(this, eventArgs); }
public void FireWorkItemCheckListItemAdded(WorkItem wi, CheckListItem cli) { var eventArgs = new AppEventArgs(AppAction.CHECKLIST_ITEM_ADDED, wi, cli); appEvent?.Invoke(this, eventArgs); }