/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void MainShell_FormClosing(object sender, FormClosingEventArgs e) { if (RuntimeDesignerHandleState.OnClose(CurrentDocumentsHostControl.HostSurface, GetFileName())) { e.Cancel = true; } }
public void AddDesigner(Form form, CreateAllOwnerDrawControlsDelegate createAllOwnerDrawControls, GetControlDesignerInfoDelegate getControlDesignerInfo) { RuntimeHostControl hc = _hostSurfaceManager.GetNewHost(form, createAllOwnerDrawControls, getControlDesignerInfo, AdminMode, this); AddNewHost(hc); RuntimeDesignerHandleState.SaveState(GetFileName(), RuntimeHostSurface.ComponentsDictionary); if (AdminMode) { FillHiddenControlsPane(RuntimeHostSurface.ComponentsDictionary); RuntimeHostSurface.ControlsDeleted += runtimeHostSurface_ControlsHidden; } }
public void ExecuteSaveCommand() { RuntimeDesignerSerializer.SerializeToFiles(RuntimeHostSurface.ComponentsDictionary); RuntimeDesignerHandleState.SaveState(GetFileName(), RuntimeHostSurface.ComponentsDictionary); }