Ejemplo n.º 1
0
        private ImageHistoryForm AddNewImageForm()
        {
            ImageHistoryForm newImageForm = new ImageHistoryForm(this);

            mImageForms.Add(newImageForm);
            newImageForm.TabText = "Untitled Image Form " + mImageForms.Count;
            if (bigImageForm.Pane == null)
            {
                newImageForm.Show(dockPanel, DockState.Document);
            }
            else
            {
//                newImageForm.Show(bigImageForm.Pane, bigImageForm);
                bigImageForm.Show(); // HACK_2008_02_26!!!  the history forms don't show properly until AFTER the BigImage form is shown...bug in DockPanel Suite?  BigImageForm is the first form added to this region
                bigImageForm.Hide(); // HACK_2008_02_26!!! ...hiding this form after showing it since we don't want to show it until the user needs it
                newImageForm.Show(dockPanel, DockState.Document);
//                newImageForm.Show();
            }
            return(newImageForm);
        }
Ejemplo n.º 2
0
        private IDockContent GetContentFromPersistString(string persistString)
        {
            if (persistString == typeof(OperationSequenceTreeForm).ToString())
            {
                return(treeForm);
            }
            else if (persistString == typeof(FavoriteSettingsForm).ToString())
            {
                return(favSettingsForm);
            }
            else if (persistString == typeof(FavoriteValuesForm).ToString())
            {
                return(favValuesForm);
            }
            else if (persistString == typeof(AnalysisForm).ToString())
            {
                return(studyChartForm);
            }
            else if (persistString == typeof(OperationLogForm).ToString())
            {
                return(logForm);
            }
            else if (persistString == typeof(ImageBigViewForm).ToString())
            {
                return(bigImageForm);
            }
            else if (persistString == typeof(ActiveTestLogForm).ToString())
            {
                return(activeLogForm);
            }
//            else if (persistString == typeof(OperationPropertiesForm).ToString())
//                return propForm;
            else if (persistString == typeof(OperationReportForm).ToString())
            {
                return(reportForm);
            }
            else
            {
                string[] parsedStrings = persistString.Split(new char[] { ',' });
                if (parsedStrings.GetUpperBound(0) != 1)
                {
                    return(null);
                }

                if (parsedStrings[0] != typeof(ImageHistoryForm).ToString())
                {
                    return(null);
                }

                string formName = parsedStrings[1];
                foreach (ImageHistoryForm iForm in mImageForms)
                {
                    if (iForm.TabText == formName)
                    {
                        return(iForm);
                    }
                }

                // form by that name doesn't exist...so create a new one
                ImageHistoryForm imageForm = AddNewImageForm();
                imageForm.TabText = formName;

                return(imageForm);
            }
        }