public static void Show(Control parentDialog, string title, string message, Exception exception) { if (title == null) title = FormOptions.LCID == 1031 ? "Error is occured." : "Fehler"; FormError form = new FormError(title, message, exception); form.ShowDialog(parentDialog); }
public static void Show(Control parentDialog, string title, string message, Exception exception) { if (title == null) { title = FormOptions.LCID == 1031 ? "Error is occured." : "Fehler"; } FormError form = new FormError(title, message, exception); form.ShowDialog(parentDialog); }
public void ShowMessage(string message) { try { MessageBox.Show(this, message, "", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception exception) { FormError.Show(this, null, exception.Message, exception); } }
public void ShowFinishDialog() { try { FormFinish dialog = new FormFinish(); dialog.ShowDialog(this); } catch (Exception exception) { FormError.Show(this, null, exception.Message, exception); } }
private void FormBase_Resize(object sender, EventArgs e) { try { buttonRunTutorial.Left = (buttonRunTutorial.Parent.Width) / 2 - (buttonRunTutorial.Width / 2); buttonRunTutorial.Top = (buttonRunTutorial.Parent.Height) / 2 - (buttonRunTutorial.Height / 2); } catch (Exception exception) { FormError.Show(this, null, exception.Message, exception); } }
private void linkLabelDiscussion_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { try { LinkLabel label = sender as LinkLabel; string link = label.Tag as string; System.Diagnostics.Process.Start(link); } catch (Exception exception) { FormError.Show(this, null, exception.Message, exception); } }
private void buttonOptions_Click(object sender, EventArgs e) { try { FormOptions dialog = new FormOptions(); if (DialogResult.OK == dialog.ShowDialog(this)) { ApplyConfiguration(); } } catch (Exception exception) { FormError.Show(this, null, exception.Message, exception); } }
private void buttonRunTutorial_Click(object sender, EventArgs e) { try { buttonRunTutorial.Enabled = false; if (listViewTutorials.SelectedItems.Count > 0) { ITutorial selectedTutorial = listViewTutorials.SelectedItems[0].Tag as ITutorial; selectedTutorial.Run(); } } catch (Exception exception) { FormError.Show(this, null, exception.Message, exception); } finally { buttonRunTutorial.Enabled = true; } }
private void listViewTutorials_SelectedIndexChanged(object sender, EventArgs e) { try { if ((panelTutorialArea.Controls.Count == 0) || (listViewTutorials.SelectedItems.Count == 0)) { return; } foreach (Control item in panelTutorialArea.Controls) { item.Visible = false; } ITutorial selectedTutorial = listViewTutorials.SelectedItems[0].Tag as ITutorial; if (null != selectedTutorial.Panel) { selectedTutorial.Panel.Visible = true; } else { buttonRunTutorial.Visible = true; } labelTutorialDescription.Text = selectedTutorial.Description; if (FormOptions.ConnectToDocumentation) { webBrowserTutorialContent.Navigate(new Uri((listViewTutorials.SelectedItems[0].Tag as ITutorial).Uri)); } else { linkLabelTutorialContent.Tag = selectedTutorial.Uri; linkLabelTutorialContent.Text = selectedTutorial.Uri; } } catch (Exception exception) { FormError.Show(this, null, exception.Message, exception); } }
private void linkLabelMultiLanguage_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { try { LinkLabel label = sender as LinkLabel; string link = label.Tag as string; string[] array = link.Split(new string[] { "#" }, StringSplitOptions.RemoveEmptyEntries); string root = "http://netoffice.codeplex.com"; if (FormOptions.LCID == 1033) { link = root + array[0]; } else { link = root + array[1]; } System.Diagnostics.Process.Start(link); } catch (Exception exception) { FormError.Show(this, null, exception.Message, exception); } }
public void ShowErrorDialog(string message, Exception exception) { FormError.Show(this, null, message, exception); }