public Settings(NotificationsSender notificationsSender) { this.InitializeComponent(); MaterialSkinManager.Instance.AddFormToManage(this); this.LoadSettings(); this.notificationsSender = notificationsSender; }
async public Task <ActionResult> SendNotifications() { using (var db = DbFactory.Open()) { Logger.I("Begin sending notifications"); await NotificationsSender.Send(db); db.Commit(); Logger.I("Sending notifications complete"); return(Json(new { })); } }
public Main() { InitializeMaterialSkinManager(); this.trayIcon = new TrayIcon(); this.contextMenu = new ContextMenu(); this.trayIcon.SetContextMenuStrip(this.contextMenu.Create(this.ShowSettings, this.UpdateMarketStatus, this.DisconnectFromMarket)); this.notificationsSender = new NotificationsSender(); this.whispersDetector = new WhispersDetector(true, true); this.whispersDetector.NewWhisper += this.OnNewWhisper; this.whispersDetector.ChatStateChanged += this.OnChatStateChanged; this.notificationsList = new NotificationsList(); this.whispersDetector.Start(); if (Properties.Settings.Default.ConnectToMarketOnStartup) { this.ConnectToMarket().Forget(); } }