Beispiel #1
0
        public void OpenTag(string FileName)
        {
            // Create new Tab Page
            TagEditorPage tab = new TagEditorPage();

            tab.Open(FileName);
            this.xtraTabControl1.TabPages.Add(tab);
            this.xtraTabControl1.SelectedTabPageIndex = this.xtraTabControl1.TabPages.Count - 1;

            // Output
            MessagesWriteLine(FileName + " opened");
        }
Beispiel #2
0
        private void treeView1_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            // Make sure this node is a tag and not a folder
            if (treeView1.SelectedNode.Text.Contains('.'))
            {
                // Suspend the console worker
                SuspendConsoleWorker();

                // Get the full tag path and remove the project name from it
                string tagPath = treeView1.SelectedNode.FullPath.Replace(Global.Application.Instance.Project.Name + "\\", "");

                //
                this.xtraTabControl1.SuspendLayout();

                // Create a new tab page and add it to the tab view.
                TagEditorPage tab = new TagEditorPage();
                this.xtraTabControl1.TabPages.Add(tab);

                this.xtraTabControl1.SelectedTabPageIndex = this.xtraTabControl1.TabPages.Count - 1;

                //
                this.xtraTabControl1.ResumeLayout(true);

                // Setup the new tab page with the tag we are opening.
                tab.Open(Global.Application.Instance.Project.TagFolder + tagPath);

                // Do we need the Portal

                /*if (treeView1.SelectedNode.FullPath.EndsWith(".render_model") ||
                 *  treeView1.SelectedNode.FullPath.EndsWith(".decorator") ||
                 *  treeView1.SelectedNode.FullPath.EndsWith(".cloth") ||
                 *  treeView1.SelectedNode.FullPath.EndsWith(".collision_model"))
                 *  LoadPortal();*/

                // Output
                MessagesWriteLine(string.Format("\"{0}\" opened", tagPath));

                // Resume the console worker
                ResumeConsoleWorker();
            }
        }