private void RefreshIssueButton_Click(object sender, EventArgs e) { ToastManager.Clear(); lastGetIssue = DateTime.MinValue; currentIssueIdList.Clear(); issueExcludeIdList.Clear(); Timer_GetIssue_Tick(null, e); }
public void ProgramEnd() { Visible = false; NotifyIcon.Visible = false;//避免关闭程序后右下角图标滞留 isQuit = true; Timer.Enabled = false; Settings.Default.issueExclude = issueExcludeIdList; Settings.Default.Save(); ToastManager.Clear(); Environment.Exit(0); }
private void RestartGameRPC() { Debug.Log("Game Restarted"); ToastManager toastManager = FindObjectOfType <ToastManager>(); toastManager.Clear(); InitGameState(); for (int i = 0; i < buttonList.Length; i++) { buttonList[i].text = ""; } gameOverPanel.SetActive(false); restartButton.SetActive(false); }
public void StartGame() { Debug.Log("Game Started"); ToastManager toastManager = FindObjectOfType <ToastManager>(); toastManager.Clear(); connectionPanel.SetActive(false); gameBoard.SetActive(true); foreach (Text button in buttonList) { button.GetComponentInParent <GridSpace>().SetGameController(this); } SetGameInfo(); InitGameState(); }
private void Init(bool isFirst) { if (isFirst) { Timer.Enabled = true; #if DEBUG Label_CurrentRequestCountText.Visible = true; Label_CurrentRequestCount.Visible = true; Width += 200; #endif #region Setting if (!ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.PerUserRoamingAndLocal).HasFile) { Settings.Default.Upgrade();//低版本配置文件复制到高版本配置文件 } #endregion DateTimePicker.Value = DateTime.Today; DateTimePicker.MaxDate = DateTime.Today; DataGridViewIssues.AutoGenerateColumns = false; DataGridViewIssues.MultiSelect = false; ToastManager.Clear(); issueExcludeIdList = Settings.Default.issueExclude; ContextMenuStripForNotifyIcon.ItemClicked += new ToolStripItemClickedEventHandler(ToolStripItemForNotifyIcon_Click); if (Settings.Default.IsLogout) { Logout(); } else { Login(); } ToastNotificationManagerCompat.OnActivated += toastArgs => { ToastArguments args = ToastArguments.Parse(toastArgs.Argument); switch (Enum.Parse(typeof(ToastActionType), args.Get("action"))) { case ToastActionType.RemindLater: issueManager.SendToast(args.Get("contentId"), isShow: false); break; case ToastActionType.Click: Invoke((EventHandler) delegate { System.Diagnostics.Process.Start(Settings.Default.RedMineHost + "issues/" + args.Get("contentId")); }); break; default: break; } }; } }