Example #1
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            // Init tray
            this.notifyIcon             = (TaskbarIcon)this.FindResource("NotifyIcon");
            this.viewModel              = new TrayViewModel();
            this.notifyIcon.DataContext = this.viewModel;

            // Upgrade settings if needed
            if (Settings.Default.ShouldUpgrade)
            {
                Settings.Default.Upgrade();
                Settings.Default.ShouldUpgrade = false;
                Settings.Default.Save();
            }

            this.token = Settings.Default.Token;
            this.showUnreadMentions = Settings.Default.ShowUnreadMentions;
            this.showUnreadMessages = Settings.Default.ShowUnreadMessages;
            this.showStatus         = Settings.Default.ShowStatus;

            // Init Luxa4Slack
            Task.Factory.StartNew(this.Initialize);
        }
Example #2
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

              // Init tray
              this.notifyIcon = (TaskbarIcon)this.FindResource("NotifyIcon");
              this.viewModel = new TrayViewModel();
              this.notifyIcon.DataContext = this.viewModel;

              // Upgrade settings if needed
              if (Settings.Default.ShouldUpgrade)
              {
            Settings.Default.Upgrade();
            Settings.Default.ShouldUpgrade = false;
            Settings.Default.Save();
              }

              this.token = Settings.Default.Token;
              this.showUnreadMentions = Settings.Default.ShowUnreadMentions;
              this.showUnreadMessages = Settings.Default.ShowUnreadMessages;

              // Init Luxa4Slack
              Task.Factory.StartNew(this.Initialize);
        }