public IMyGenDocument Open(IMyGenerationMDI mdi, FileInfo file, params string[] args)
        {
            SampleEditor edit = null;

            if (file.Exists)
            {
                bool isopen = mdi.IsDocumentOpen(file.FullName);

                if (!isopen)
                {
                    edit = new SampleEditor(mdi);
                    edit.LoadImage(file.FullName);
                }
                else
                {
                    edit = mdi.FindDocument(file.FullName) as SampleEditor;
                    if (edit != null)
                    {
                        edit.Activate();
                    }
                }
            }

            return edit;
        }
예제 #2
0
        public IMyGenDocument Open(IMyGenerationMDI mdi, FileInfo file, params string[] args)
        {
            SampleEditor edit = null;

            if (file.Exists)
            {
                bool isopen = mdi.IsDocumentOpen(file.FullName);

                if (!isopen)
                {
                    edit = new SampleEditor(mdi);
                    edit.LoadImage(file.FullName);
                }
                else
                {
                    edit = mdi.FindDocument(file.FullName) as SampleEditor;
                    if (edit != null)
                    {
                        edit.Activate();
                    }
                }
            }

            return(edit);
        }
예제 #3
0
        public IMyGenDocument Create(IMyGenerationMDI mdi, params string[] args)
        {
            SampleEditor edit = new SampleEditor(mdi);

            switch (args[0])
            {
            case SampleEditorManager.SAMPLE_IMAGE:
            default:
                edit.CreateNewImage();
                break;
            }

            return(edit);
        }
        public IMyGenDocument Create(IMyGenerationMDI mdi, params string[] args)
        {
            SampleEditor edit = new SampleEditor(mdi);

            switch (args[0])
            {
                case SampleEditorManager.SAMPLE_IMAGE:
                default:
                    edit.CreateNewImage();
                    break;
            }

            return edit;
        }