Ejemplo n.º 1
0
 public void ShowFinishDialog(string message, string fullDocumentPath)
 {
     try
     {
         FinishForm dialog = new FinishForm(message, fullDocumentPath);
         dialog.ShowDialog(this);
     }
     catch (Exception exception)
     {
         ErrorForm.Show(this, exception);
     }
 }
Ejemplo n.º 2
0
 private void TopicLabel_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)
     {
         ErrorForm.Show(this, null, exception.Message, exception);
     }
 }
Ejemplo n.º 3
0
 private void OptionButton_Click(object sender, EventArgs e)
 {
     try
     {
         OptionsForm dialog = new OptionsForm(_rootDirectory);
         if (DialogResult.OK == dialog.ShowDialog(this))
         {
             _rootDirectory = dialog.RootDirectory;
         }
     }
     catch (Exception exception)
     {
         ErrorForm.Show(this, exception);
     }
 }
Ejemplo n.º 4
0
        private void ExamplesView_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            var example = SelectedExample;

            if (null == example)
            {
                return;
            }

            Label label = null;

            try
            {
                Cursor  = Cursors.WaitCursor;
                Enabled = false;

                if (null != example.Panel)
                {
                    AreaForm.ShowForm(this, example);
                }
                else
                {
                    label = ShowWait();
                    example.RunExample();
                }
            }
            catch (Exception exception)
            {
                ErrorForm.Show(this, exception);
            }
            finally
            {
                HideWait(label);
                Enabled = true;
                Cursor  = Cursors.Default;
            }
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Creates an instance of FormError and show them
        /// </summary>
        /// <param name="parentDialog">modal parent</param>
        /// <param name="exception">exception as any</param>
        public static void Show(Control parentDialog, Exception exception)
        {
            ErrorForm form = new ErrorForm(null, null, exception);

            form.ShowDialog(parentDialog);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Creates an instance of FormError and show them
        /// </summary>
        /// <param name="parentDialog">modal parent</param>
        /// <param name="title">dialog title</param>
        /// <param name="message">error caption</param>
        /// <param name="exception">exception as any</param>
        public static void Show(Control parentDialog, string title, string message, Exception exception)
        {
            ErrorForm form = new ErrorForm(title, message, exception);

            form.ShowDialog(parentDialog);
        }
Ejemplo n.º 7
0
 public void ShowErrorDialog(string message, Exception exception)
 {
     ErrorForm.Show(this, exception);
 }