C# Класс PersonalAnalytics.TrackerManager

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
TaskbarIcon Hardcodet.Wpf.TaskbarNotification.TaskbarIcon

Открытые методы

Метод Описание
Continue ( ) : void

continues all trackers (that are enabled)

GetInstance ( ) : TrackerManager

Singleton

GetTrackers ( ) : List
InitializeTaskBarIcon ( ) : void

Dreates a taskbar icon to modify its tooltip and create the context menu options

Pause ( ) : void

stops all trackers starts a reminder to remind the user to resume it

PrepareSettings ( ) : void

Initialize/Prepare Settings

Register ( ITracker t ) : void

Tracker registers its service to the TrackerManager

RegisterTrackers ( ) : List

Register trackers for the TrackerManager (i.e. monitoring tool) (add a new tracker here to make it being integrated into the monitoring tool and retrospection)

SetAppVersion ( string v ) : void

Sets the current published app version

Start ( ) : void

Initialize the TrackerManager (prepares the settings, starts every tracker, creates a connection to the database, etc.)

Stop ( bool stoppedManually = false ) : void

stops the TrackerManager (stops every tracker, saves entries, dismisses connection to the database, etc.)

Приватные методы

Метод Описание
CheckForStudyDataSharedReminder ( object sender, EventArgs e ) : void

On the first workday of the week, remind the user ONCE to share the collected study data with us.

ManuallyStartUserSurvey ( ) : void

gets the current instance of the userefficiency tracker and manually starts the survey there todo: ugly, hardcoded

OpenDataExportDirectory ( ) : void

Opens the directory where all the data is saved

OpenRetrospection ( ) : void

Opens the UI specified for the current retrospection

OpenSettings ( ) : void

Opens the browser to modify the settings

PauseContinueTracker ( System item ) : void

depending on the variable _isPaused, the tracker is paused or continued

PerformDatabaseUpdatesIfNecessary ( ) : void

In case the current database version != the targeted database version, perform an incremental udpate to the database (for each tracker)

SaveCurrentTimeZone ( object sender, EventArgs e ) : void

Saves the current (updated) time zone to the database (temporary workaround)

SetContextMenuOptions ( ) : void

Manually add ContextMenuOptions

SetTaskbarIconTooltip ( string message ) : void

helper method to change the tooltip text

ShutdownApplication ( ) : void

Shutdown the application only if the state is saved, database disconnected, etc.

TrayBallonTipClicked ( object s, RoutedEventArgs e ) : void

Click on a TaskbarIcon Balloon to resume the tracker todo: as soon as there are other balloons shown, we need to be able to distinguish which one

UpdateApplicationIfNecessary ( object sender, EventArgs e ) : void

Called in a regular interval to try and update the tool. Asks the user for consent prior to installing the update. In case the installation was successful, the tool will restart. source: https://msdn.microsoft.com/en-us/library/ms404263.aspx

UpdateTooltipIcon ( object sender, EventArgs e ) : void

Updates the taskbar icon tooltip text based on the timer and

UploadTrackedData ( bool isManually = true ) : void

Starts the upload wizard

Описание методов

Continue() публичный Метод

continues all trackers (that are enabled)
public Continue ( ) : void
Результат void

GetInstance() публичный статический Метод

Singleton
public static GetInstance ( ) : TrackerManager
Результат TrackerManager

GetTrackers() публичный Метод

public GetTrackers ( ) : List
Результат List

InitializeTaskBarIcon() публичный Метод

Dreates a taskbar icon to modify its tooltip and create the context menu options
public InitializeTaskBarIcon ( ) : void
Результат void

Pause() публичный Метод

stops all trackers starts a reminder to remind the user to resume it
public Pause ( ) : void
Результат void

PrepareSettings() публичный Метод

Initialize/Prepare Settings
public PrepareSettings ( ) : void
Результат void

Register() публичный Метод

Tracker registers its service to the TrackerManager
public Register ( ITracker t ) : void
t ITracker
Результат void

RegisterTrackers() публичный Метод

Register trackers for the TrackerManager (i.e. monitoring tool) (add a new tracker here to make it being integrated into the monitoring tool and retrospection)
public RegisterTrackers ( ) : List
Результат List

SetAppVersion() публичный Метод

Sets the current published app version
public SetAppVersion ( string v ) : void
v string
Результат void

Start() публичный Метод

Initialize the TrackerManager (prepares the settings, starts every tracker, creates a connection to the database, etc.)
public Start ( ) : void
Результат void

Stop() публичный Метод

stops the TrackerManager (stops every tracker, saves entries, dismisses connection to the database, etc.)
public Stop ( bool stoppedManually = false ) : void
stoppedManually bool
Результат void

Описание свойств

TaskbarIcon публичное свойство

public TaskbarIcon,Hardcodet.Wpf.TaskbarNotification TaskbarIcon
Результат Hardcodet.Wpf.TaskbarNotification.TaskbarIcon