Пример #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();
            }
        }
Пример #2
0
        private void menuItem_SaveAs_Click(object sender, EventArgs e)
        {
            Dialog.NewWorkspace dlg = new DmxCreator.Dialog.NewWorkspace();
            DialogResult        res = dlg.ShowDialog(this);

            if (res == DialogResult.OK)
            {
                FrameWork.SaveFrameworkAs(dlg.WorkspaceName);
            }
        }