Пример #1
0
            private void NameClickHandler(object sender, EventArgs args)
            {
                DataFileSummary dataFileSummaryForm = null;

                foreach (var form in Application.OpenForms)
                {
                    if (form is DataFileSummary && _dataFile.Equals(((DataFileSummary)form).MsDataFile))
                    {
                        dataFileSummaryForm = (DataFileSummary)form;
                        break;
                    }
                }

                if (dataFileSummaryForm == null)
                {
                    dataFileSummaryForm = new DataFileSummary(_dataFile);
                    dataFileSummaryForm.Show(_form.DockPanel, DockState.Document);
                }
                else
                {
                    dataFileSummaryForm.Activate();
                }
            }
Пример #2
0
            private void NameClickHandler(object sender, EventArgs args)
            {
                DataFileSummary dataFileSummaryForm = null;
                foreach (var form in Application.OpenForms)
                {
                    if (form is DataFileSummary && _dataFile.Equals(((DataFileSummary)form).MsDataFile))
                    {
                        dataFileSummaryForm = (DataFileSummary)form;
                        break;
                    }
                }

                if (dataFileSummaryForm == null)
                {
                    dataFileSummaryForm = new DataFileSummary(_dataFile);
                    dataFileSummaryForm.Show(_form.DockPanel, DockState.Document);
                }
                else
                {
                    dataFileSummaryForm.Activate();
                }
            }