Example #1
0
        public void OpenFile(string fileName, bool isShowProjFile = true)
        {
            FileInfo       fi  = new FileInfo(fileName);
            EditorDockForm cvf = FindEditorForm(fi);

            if (cvf != null)
            {
                cvf.Show(this.MainDockPanel);
            }
            else
            {
                cvf = newEditorDockForm();
                cvf.OpenFile(fi);
                cvf.ParentDockPanel = this.MainDockPanel;
                cvf.Show(this.MainDockPanel);
            }
            if (fileName.EndsWith(ZDevCompiler.ZYYExt, StringComparison.InvariantCultureIgnoreCase))
            {
                //this.procDock.ShowClass(fi);
            }
            else if (fileName.EndsWith(ZDevCompiler.ZXMExt, StringComparison.InvariantCultureIgnoreCase))
            {
                this.procDock.ClearTree();
                if (isShowProjFile)
                {
                    //this.projDock.ShowClass(fi);
                }
            }
        }
Example #2
0
        void NewFile()
        {
            EditorDockForm cvf = new EditorDockForm();

            cvf.NewFile(newIndex);
            cvf.ParentDockPanel = this.MainDockPanel;
            cvf.Editor.NewFile();
            cvf.Show(this.MainDockPanel);
            newIndex++;
        }