Пример #1
0
        private void SaveViewerPage()
        {
            if (!(Tab_Viewers.SelectedTab == null))
            {
                Ctrl_WaveForm oActiveGraphWindow = (Ctrl_WaveForm)Tab_Viewers.SelectedTab.Controls[0];

                if (oActiveGraphWindow.Properties.FilePath.Equals(""))
                {
                    if (Dlg_SaveViewerPage.ShowDialog().Equals(DialogResult.OK))
                    {
                        oActiveGraphWindow.Properties.FilePath = Dlg_SaveViewerPage.FileName;
                    }
                    else
                    {
                        return;
                    }
                }

                oActiveGraphWindow.Properties.Save_Properties(oActiveGraphWindow.Properties.FilePath);
            }
        }
Пример #2
0
        private void SaveAllViewerPages()
        {
            foreach (TabPage oTab in Tab_Viewers.TabPages)
            {
                if (!(oTab.Equals(Tab_NewViewer)))
                {
                    Ctrl_WaveForm oWave = (Ctrl_WaveForm)oTab.Controls[0];

                    if (oWave.Properties.FilePath.Equals(""))
                    {
                        if (Dlg_SaveViewerPage.ShowDialog().Equals(DialogResult.OK))
                        {
                            oWave.Properties.FilePath = Dlg_SaveViewerPage.FileName;
                        }
                    }

                    if (!(oWave.Properties.FilePath.Equals("")))
                    {
                        oWave.Properties.Save_Properties(oWave.Properties.FilePath);
                    }
                }
            }
        }