public MainWindow() { InitializeComponent(); Closing += MainWindow_Closing; Closed += MainWindow_Closed; Loaded += MainWindow_Loaded; Application.Current.Deactivated += Current_Deactivated; var profile = LoadProfile(); _profile = new TimeProfileView(profile); _trayIcon = new TrayIcon(); _trayIcon.MainClick += _trayIcon_MainClick; _trayIcon.ExitClick += _trayIcon_ExitClick; _timeKeeper = new TimeKeeper(profile); _timeKeeper.NodeElapsed += TimeKeeperNodeElapsed; _timeKeeper.CurrentChanged += TimeKeeperCurrentChanged; _timeKeeper.Start(); _currentTimeNodeView = new TimeNodeView(); CurrentNode.DataContext = _currentTimeNodeView; SetCurrentValues(); }
public SettingsWindow(TimeProfileView timeProfile) { _timeProfile = timeProfile; InitializeComponent(); SettingsGraph.Profile = _timeProfile; }