Beispiel #1
0
        private void listViewExamples_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            try
            {
                if (listViewExamples.SelectedItems.Count == 0)
                {
                    return;
                }

                this.Enabled = false;
                this.Cursor  = Cursors.WaitCursor;

                IExample selectedExample = listViewExamples.SelectedItems[0].Tag as IExample;
                if (null == selectedExample.Panel)
                {
                    selectedExample.RunExample();
                }
                else
                {
                    panelExamples.Controls.Add(selectedExample.Panel);
                    selectedExample.Panel.Dock    = DockStyle.Fill;
                    selectedExample.Panel.Visible = true;
                }
            }
            catch (Exception exception)
            {
                FormError.Show(this, exception);
            }
            finally
            {
                this.Enabled = true;
                this.Cursor  = Cursors.Default;
            }
        }
Beispiel #2
0
        private void buttonOptions_Click(object sender, EventArgs e)
        {
            try
            {
                FormOptions dialog = new FormOptions(_rootDirectory);
                if (DialogResult.OK == dialog.ShowDialog(this))
                {
                    _rootDirectory = dialog.RootDirectory;


                    foreach (ListViewItem item in listViewExamples.Items)
                    {
                        IExample example = item.Tag as IExample;
                        item.Text             = example.Caption;
                        item.SubItems[1].Text = example.Description;
                    }

                    Translator.TranslateControls(this, "FormBase.txt", FormOptions.LCID);
                }
            }
            catch (Exception exception)
            {
                FormError.Show(this, exception);
            }
        }
Beispiel #3
0
 public void ShowFinishDialog(string message, string fullDocumentPath)
 {
     try
     {
         FormFinish dialog = new FormFinish(message, fullDocumentPath);
         dialog.ShowDialog(this);
     }
     catch (Exception exception)
     {
         FormError.Show(this, exception);
     }
 }
Beispiel #4
0
 private void linkLabelEmployeWanted_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     try
     {
         string link = linkLabelEmployeWanted.Tag as string;
         System.Diagnostics.Process.Start(link);
     }
     catch (Exception exception)
     {
         FormError.Show(this, null, exception.Message, exception);
     }
 }
Beispiel #5
0
        private void listViewExamples_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                buttonStartExample.Enabled = listViewExamples.SelectedItems.Count > 0;
                if(panelExamples.Controls.Count == 0)
                    return;

                UserControl control = panelExamples.Controls[0] as UserControl;
                panelExamples.Controls.Clear();
            }
            catch(Exception exception)         
            {
                FormError.Show(this, exception);           
            }
        }
Beispiel #6
0
        private void listViewExamples_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                if (panelExamples.Controls.Count == 0)
                {
                    return;
                }

                UserControl control = panelExamples.Controls[0] as UserControl;
                panelExamples.Controls.Clear();
            }
            catch (Exception exception)
            {
                FormError.Show(this, exception);
            }
        }
Beispiel #7
0
 private void linkLabelRessource_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);
     }
 }
Beispiel #8
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)
        {
            FormError form = new FormError(null, null, exception);

            form.ShowDialog(parentDialog);
        }
Beispiel #9
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)
        {
            FormError form = new FormError(title, message, exception);

            form.ShowDialog(parentDialog);
        }
Beispiel #10
0
 public void ShowErrorDialog(string message, Exception exception)
 {
     FormError.Show(this, exception);
 }
Beispiel #11
0
        public static void Show(Control parentDialog, string title, string message, Exception exception)
        {
            FormError form = new FormError(title, message, exception);

            form.ShowDialog(parentDialog);
        }
Beispiel #12
0
 public static void Show(Control parentDialog, Exception exception)
 {
     FormError form = new FormError(FormOptions.LCID == 1033 ? "Error." : "Fehler.", null, exception);
     form.ShowDialog(parentDialog);
 }
Beispiel #13
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)
        {
            FormError form = new FormError(null, null, exception);

            form.ShowDialog(parentDialog);
        }
Beispiel #14
0
        public static void Show(Control parentDialog, Exception exception)
        {
            FormError form = new FormError(FormOptions.LCID == 1033 ? "Error." : "Fehler.", null, exception);

            form.ShowDialog(parentDialog);
        }