public override void OnClick() { //IProjectService projectService = _context.Container.GetSingleton<IProjectService>(); //projectService.TryClose(); frmCreateDB frm = new frmCreateDB(); if (_context.View.ShowChildView(frm, true)) { string projectFile = Path.Combine(frm.ProjectFile, frm.ProjectName, frm.ProjectName + ".vgproj"); XmlProject project = ReProjectHelper.CreateReProject(_context, frm.ProjectName, frm.ProjectFile, frm.EpsGCode); using (var writer = new StreamWriter(projectFile)) { writer.Write(project.Serialize()); writer.Flush(); } //((ISecureContext) _context).VastProject = project; IProjectService projectService = _context.Container.GetSingleton <IProjectService>(); projectService.Open(projectFile, false); } }
private void mnuNew_Click(object sender, EventArgs e) { frmCreateDB myNewDB = new frmCreateDB(dbName); myNewDB.ShowDialog(); }