Example #1
0
        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);
        }
Example #2
0
        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);
        }
Example #3
0
 public void ShowMessage(string message)
 {
     try
     {
         MessageBox.Show(this, message, "", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     catch (Exception exception)
     {
         FormError.Show(this, null, exception.Message, exception);
     }
 }
Example #4
0
 public void ShowFinishDialog()
 {
     try
     {
         FormFinish dialog = new FormFinish();
         dialog.ShowDialog(this);
     }
     catch (Exception exception)
     {
         FormError.Show(this, null, exception.Message, exception);
     }
 }
Example #5
0
 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);
     }
 }
Example #6
0
 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);
     }
 }
Example #7
0
 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);
     }
 }
Example #8
0
 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;
     }
 }
Example #9
0
        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);
            }
        }
Example #10
0
 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);
     }
 }
Example #11
0
 public void ShowErrorDialog(string message, Exception exception)
 {
     FormError.Show(this, null, message, exception);
 }