Beispiel #1
0
        private void documentationToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                Warnings.warning_list.Clear();

                if (tabControl1.SelectedTab != null)
                {
                    DeviceView     dv  = (DeviceView)tabControl1.SelectedTab.Controls[0];
                    SaveFileDialog sfd = new SaveFileDialog();

                    string temp = Path.GetTempFileName();

                    this.UseWaitCursor = true;

                    DocumentationGen docgen = new DocumentationGen();
                    docgen.genhtmldoc(temp, dv.eds);
                    ReportView rv = new ReportView(temp);
                    rv.Show();

                    this.UseWaitCursor = false;
                }
            }
            catch (Exception ex)
            {
                Warnings.warning_list.Add(ex.ToString());
            }

            if (Warnings.warning_list.Count != 0)
            {
                WarningsFrm frm = new WarningsFrm();
                frm.ShowDialog();
            }
        }
Beispiel #2
0
        private void networkPDOToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string dir = GetTemporaryDirectory();

            string csspath = Path.Combine(System.Environment.GetFolderPath(Environment.SpecialFolder.Personal), ".edseditor");

            csspath = Path.Combine(csspath, "style.css");

            if (!System.IO.File.Exists(csspath))
            {
                csspath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "style.css");
            }

            if (System.IO.File.Exists(csspath))
            {
                System.IO.File.Copy(csspath, dir + Path.DirectorySeparatorChar + "style.css");
            }

            string temp = dir + Path.DirectorySeparatorChar + "network.html";

            NetworkPDOreport npr = new NetworkPDOreport();

            npr.gennetpdodoc(temp, network);

            if (IsRunningOnMono())
            {
                System.Diagnostics.Process.Start("file://" + temp);
            }
            else
            {
                ReportView rv = new ReportView(temp);
                rv.Show();
            }
        }
Beispiel #3
0
        private void documentationToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                Warnings.warning_list.Clear();

                if (tabControl1.SelectedTab != null)
                {
                    DeviceView     dv  = (DeviceView)tabControl1.SelectedTab.Controls[0];
                    SaveFileDialog sfd = new SaveFileDialog();

                    string dir = GetTemporaryDirectory();


                    string csspath = Path.Combine(System.Environment.GetFolderPath(Environment.SpecialFolder.Personal), ".edseditor");
                    csspath = Path.Combine(csspath, "style.css");

                    if (!System.IO.File.Exists(csspath))
                    {
                        csspath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "style.css");
                    }

                    if (System.IO.File.Exists(csspath))
                    {
                        System.IO.File.Copy(csspath, dir + Path.DirectorySeparatorChar + "style.css");
                    }

                    string temp  = dir + Path.DirectorySeparatorChar + "documentation.html";
                    string temp2 = dir + Path.DirectorySeparatorChar + "documentation.md";

                    this.UseWaitCursor = true;

                    DocumentationGen docgen = new DocumentationGen();
                    docgen.genhtmldoc(temp, dv.eds);
                    docgen.genmddoc(temp2, dv.eds);
                    System.Diagnostics.Process.Start("file://" + temp2);
                    if (IsRunningOnMono())
                    {
                        System.Diagnostics.Process.Start("file://" + temp);
                    }
                    else
                    {
                        ReportView rv = new ReportView(temp);
                        rv.Show();
                    }

                    this.UseWaitCursor = false;
                }
            }
            catch (Exception ex)
            {
                Warnings.warning_list.Add(ex.ToString());
            }

            if (Warnings.warning_list.Count != 0)
            {
                WarningsFrm frm = new WarningsFrm();
                frm.ShowDialog();
            }
        }
Beispiel #4
0
        private void networkPDOToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string           temp = Path.GetTempFileName();
            NetworkPDOreport npr  = new NetworkPDOreport();

            npr.gennetpdodoc(temp, network);

            ReportView rv = new ReportView(temp);

            rv.Show();
        }