private void buttonExecuteTemplateCancel_Click(object sender, EventArgs e) { try { if (this.OnTemplateExecuteCallback == null) { return; } this.OnTemplateCancelCallback(this.CurrentTemplateDisplaySurface); this.HideErrorOrStatusMessage(); this.tabControlTemplateUI.TabPages.Clear(); this.splitContainerTabControl.Panel1Collapsed = false; this.splitContainerTabControl.Panel2Collapsed = true; } catch (Exception ex) { this.ShowError(ex); } finally { OnTemplateExecuteCallback = null; OnTemplateCancelCallback = null; CurrentTemplateDisplaySurface = null; } }
private void buttonExecuteTemplateOk_Click(object sender, EventArgs e) { Cursor origCursor = this.Cursor; try { if (this.OnTemplateExecuteCallback == null) { return; } this.HideErrorOrStatusMessage(); //#if TRIAL // Licensing license = new Licensing(); // string id = license.getUniqueID("C"); // if (1 != licensing.ValidateLicense("trial", "b69e3783-9f56-47a7-82e0-6eee6d0779bf", System.Environment.MachineName, id, "2019.1.0725.0", GetProxySettings(Settings))) // { // return; // } //#else // Licensing licensing = new Licensing(); // licensing.ReplaceMeLater("developer", esVersion, "Serial_Number", "Serial_Number2", "Interop.ADODBX.dll", GetProxySettings(Settings)); //#endif this.Cursor = Cursors.WaitCursor; if (this.OnTemplateExecuteCallback(this.CurrentTemplateDisplaySurface)) { this.tabControlTemplateUI.TabPages.Clear(); this.splitContainerTabControl.Panel1Collapsed = false; this.splitContainerTabControl.Panel2Collapsed = true; OnTemplateExecuteCallback = null; OnTemplateCancelCallback = null; CurrentTemplateDisplaySurface = null; } } catch (Exception ex) { this.ShowError(ex); } finally { this.Cursor = origCursor; } }
private void buttonExecuteTemplateCancel_Click(object sender, EventArgs e) { try { if (this.OnTemplateExecuteCallback == null) return; this.OnTemplateCancelCallback(this.CurrentTemplateDisplaySurface); this.HideErrorOrStatusMessage(); this.tabControlTemplateUI.TabPages.Clear(); this.splitContainerTabControl.Panel1Collapsed = false; this.splitContainerTabControl.Panel2Collapsed = true; } catch (Exception ex) { this.ShowError(ex); } finally { OnTemplateExecuteCallback = null; OnTemplateCancelCallback = null; CurrentTemplateDisplaySurface = null; } }
public void DisplayTemplateUI ( bool useCachedInput, Hashtable input, esSettings settings, Template template, OnTemplateExecute OnExecuteCallback, OnTemplateCancel OnCancelCallback ) { try { this.Template = template; TemplateDisplaySurface.MainWindow.OnTemplateExecuteCallback = OnExecuteCallback; TemplateDisplaySurface.MainWindow.OnTemplateCancelCallback = OnCancelCallback; TemplateDisplaySurface.MainWindow.CurrentTemplateDisplaySurface = this; if (template != null) { CurrentUIControls.Clear(); PopulateTemplateInfoCollection(); SortedList <int, esTemplateInfo> templateInfoCollection = coll.GetTemplateUI(template.Header.UserInterfaceID); if (templateInfoCollection == null || templateInfoCollection.Count == 0) { MainWindow.ShowError(new Exception("Template UI Assembly Cannot Be Located")); } this.esMeta = esMetaCreator.Create(settings); esMeta.Input["OutputPath"] = settings.OutputPath; if (useCachedInput) { if (CachedInput.ContainsKey(template.Header.UniqueID)) { Hashtable cachedInput = CachedInput[template.Header.UniqueID]; if (cachedInput != null) { foreach (string key in cachedInput.Keys) { esMeta.Input[key] = cachedInput[key]; } } } } if (input != null) { esMeta.Input = input; } MainWindow.tabControlTemplateUI.SuspendLayout(); foreach (esTemplateInfo info in templateInfoCollection.Values) { UserControl userControl = info.UserInterface.CreateInstance(esMeta, useCachedInput, MainWindow.ApplicationObject); CurrentUIControls.Add(info.TabOrder, userControl); TabPage page = new TabPage(info.TabTitle); page.Controls.Add(userControl); userControl.Dock = DockStyle.Fill; MainWindow.tabControlTemplateUI.TabPages.Add(page); MainWindow.ShowTemplateUIControl(); } MainWindow.tabControlTemplateUI.ResumeLayout(); if (CurrentUIControls.Count > 0) { MainWindow.ShowTemplateUIControl(); } } } catch (Exception ex) { MainWindow.ShowError(ex); } }
public void DisplayTemplateUI ( bool useCachedInput, Hashtable input, esSettings settings, Template template, OnTemplateExecute OnExecuteCallback, OnTemplateCancel OnCancelCallback ) { try { this.Template = template; TemplateDisplaySurface.MainWindow.OnTemplateExecuteCallback = OnExecuteCallback; TemplateDisplaySurface.MainWindow.OnTemplateCancelCallback = OnCancelCallback; TemplateDisplaySurface.MainWindow.CurrentTemplateDisplaySurface = this; if (template != null) { CurrentUIControls.Clear(); PopulateTemplateInfoCollection(); SortedList<int, esTemplateInfo> templateInfoCollection = coll.GetTemplateUI(template.Header.UserInterfaceID); if (templateInfoCollection == null || templateInfoCollection.Count == 0) { MainWindow.ShowError(new Exception("Template UI Assembly Cannot Be Located")); } this.esMeta = esMetaCreator.Create(settings); esMeta.Input["OutputPath"] = settings.OutputPath; if (useCachedInput) { if (CachedInput.ContainsKey(template.Header.UniqueID)) { Hashtable cachedInput = CachedInput[template.Header.UniqueID]; if (cachedInput != null) { foreach (string key in cachedInput.Keys) { esMeta.Input[key] = cachedInput[key]; } } } } if (input != null) { esMeta.Input = input; } MainWindow.tabControlTemplateUI.SuspendLayout(); foreach (esTemplateInfo info in templateInfoCollection.Values) { UserControl userControl = info.UserInterface.CreateInstance(esMeta, useCachedInput, MainWindow.ApplicationObject); CurrentUIControls.Add(info.TabOrder, userControl); TabPage page = new TabPage(info.TabTitle); page.Controls.Add(userControl); userControl.Dock = DockStyle.Fill; MainWindow.tabControlTemplateUI.TabPages.Add(page); MainWindow.ShowTemplateUIControl(); } MainWindow.tabControlTemplateUI.ResumeLayout(); if (CurrentUIControls.Count > 0) { MainWindow.ShowTemplateUIControl(); } } } catch (Exception ex) { MainWindow.ShowError(ex); } }