public MoreForm() { InitializeComponent(); this.Text = MainForm.PROGRAM_NAME + " - More"; if (!updateNotifier.CheckForInternetConnection()) { btn_More_CheckUpdates.Enabled = btn_News.Enabled = false; btn_More_CheckUpdates.Text = btn_News.Text = "No Internet"; } lbl_More_Tip.Text = TipProvider.GetRandomTip(); origImage = pb_More_Logo.BackgroundImage; try { newsTxt = (string)updateNotifier.GetLatestReleaseText()[0]; using (WebClient webClient = new WebClient()) { newsImage = ExtensionMethods.ImageFromBytes(webClient.DownloadData((string)updateNotifier.GetLatestReleaseText()[1])); //pb_More_Logo.BackgroundImage = newsImage; } } catch { } }
private void event_NewTip(object sender, MouseEventArgs e) { if (e.Button != MouseButtons.Right) { lbl_More_Tip.Text = TipProvider.GetRandomTip(); } else { string str = string.Empty; for (int i = 0; i < TipProvider.tips.Length; i++) { str += (i) + " | " + TipProvider.tips[i] + '\n'; } MessageBox.Show(str, MainForm.PROGRAM_NAME + " - All tips"); } }