Ejemplo n.º 1
0
        private void menuItem_NewW_Click(object sender, EventArgs e)
        {
            DialogResult res;

            if (DmxFramework.Framework.WorkspaceManager.CurrentWorkspace != null)
            {
                res = MessageBox.Show(this, "Do you want to save current workspace before creating a new one ?", "Save ...", MessageBoxButtons.YesNoCancel);
                if (res == DialogResult.Cancel)
                {
                    return;
                }
                else if (res == DialogResult.Yes)
                {
                    FrameWork.SaveFramework();
                }
            }

            Dialog.NewWorkspace dlg = new DmxCreator.Dialog.NewWorkspace();
            res = dlg.ShowDialog(this);
            if (res == DialogResult.OK)
            {
                DmxFramework.Workspace.Workspace work = new DmxFramework.Workspace.Workspace(dlg.WorkspaceName);
                FrameWork.OpenWorkspace(work);
                FrameWork.LoadXml();
                FrameWork.LoadScenes();

                LoadFrameworkExplorer();
            }
        }
Ejemplo n.º 2
0
 public void SaveFrameworkAs(string pText)
 {
     SaveFramework();
     Workspace.Workspace wkp = new DmxFramework.Workspace.Workspace(pText);
     WorkspaceManager.SaveAs(wkp);
 }