public void InitiateSettings(EIBFormDesigner.Designer.FormDesigner form) { designerForm = form; /* * this.CellBorderStyle = TableLayoutPanelCellBorderStyle.Inset; */ this.BackColor = Color.White; this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.Size = new Size(width, height); if (string.IsNullOrEmpty(this.Name)) { this.Name = "grid" + counter; } if (string.IsNullOrEmpty(this.ControlName)) { this.ControlName = this.Name; } if (string.IsNullOrEmpty(this.UniqueId)) { this.UniqueId = this.Name; } if (this.Text == null) { this.Text = this.Name; } this.Margin = new Padding(0, 0, 0, 0); this.Text = "grid" + counter.ToString(); this.Font = SystemFonts.DefaultFont; counter++; }
public void InitiateSettings(EIBFormDesigner.Designer.FormDesigner form) { this.Name = "placeholder" + counter; this.Name = EIBControlCollection.CheckControlForUniqueness <EIBPlaceHolder>(this.Name); if (this.ControlName == null) { this.ControlName = this.Name; } EIBControlCollection.PlaceHolderlist.Add(this.Name, this.Name); if (string.IsNullOrEmpty(this.Name)) { this.Name = "placeholder" + counter; } if (string.IsNullOrEmpty(this.ControlName)) { this.ControlName = this.Name; } if (string.IsNullOrEmpty(this.UniqueId)) { this.UniqueId = this.Name; } this.Font = new Font(this.Font.FontFamily, 8f); this.AccessibleName = "placeholder" + counter; this.Margin = new Padding(0, 0, 0, 0); this.AllowDrop = true; counter = 0; }
public void InitiateSettings(EIBFormDesigner.Designer.FormDesigner form) { if (form != null) { EIBTreeNode treeNode = new EIBTreeNode(); treeNode.InitiateSettings(null); //treeNode.ControlName = "treeNode0"; //treeNode.Text = "treeNode0"; this.Nodes.Add(treeNode); } this.Name = EIBControlCollection.CheckControlForUniqueness <EIBTreeView>(this.Name); if (string.IsNullOrEmpty(this.ControlName)) { this.ControlName = this.Name; } if (string.IsNullOrEmpty(this.UniqueId)) { this.UniqueId = this.Name; } if (this.Text == null) { this.Text = this.Name; } EIBControlCollection.TreeViewlist.Add(this.Name, this.Name); counter = 0; //counter++; }
public void InitiateSettings(EIBFormDesigner.Designer.FormDesigner form) { baseFrame = form.currentBaseWindow.baseFrame; bmpBack = new Bitmap(baseFrame.Width, baseFrame.Height); Graphics.FromImage(bmpBack).Clear(baseFrame.BackColor); this.BackgroundImage = (Bitmap)bmpBack.Clone(); counter++; createLine(); }
public void InitiateSettings(EIBFormDesigner.Designer.FormDesigner form) { this.Name = EIBControlCollection.CheckControlForUniqueness <EIBJasper>(this.Name); if (string.IsNullOrEmpty(this.ControlName)) { this.ControlName = this.Name; } EIBControlCollection.Jasperlist.Add(this.Name, this.Name); }
public void InitiateSettings(EIBFormDesigner.Designer.FormDesigner form) { this.Name = EIBControlCollection.CheckControlForUniqueness <EIBRadioGroup>(this.Name); if (string.IsNullOrEmpty(this.ControlName)) { this.ControlName = this.Name; } EIBControlCollection.RadioGrouplist.Add(this.Name, this.Name); counter = 0; }
public UIEventManager(EIBFormDesigner.Designer.FormDesigner designer) { form = designer; propertiesManager = getPropertiesManagerInstance(); if (toolBox == null) { toolBox = new ToolBox(form); } initContextMenu(); form.propertyWindow.controlList.SelectedIndexChanged += new System.EventHandler(this.controlList_SelectedIndexChanged); }
public void InitiateSettings(EIBFormDesigner.Designer.FormDesigner form) { this.Size = new Size(width, height); this.Name = "node" + counter; if (string.IsNullOrEmpty(this.controlName)) { this.ControlName = this.Name; } this.Text = "node" + counter; this.nodeIdText.Text = this.WorkFlowNode.WorkFlowNodeId; this.nodeIdText.Enabled = false; counter++; }
public void InitiateSettings(EIBFormDesigner.Designer.FormDesigner form) { this.Name = EIBControlCollection.CheckControlForUniqueness <EIBImageBrowse>(this.Name); if (string.IsNullOrEmpty(this.ControlName)) { this.ControlName = this.Name; } if (string.IsNullOrEmpty(this.UniqueId)) { this.UniqueId = this.Name; } EIBControlCollection.ImageBrowselist.Add(this.Name, this.Name); counter = 0; }
public void InitiateSettings(EIBFormDesigner.Designer.FormDesigner form) { this.Text = "column" + counter; if (string.IsNullOrEmpty(this.Name)) { this.Name = "column" + counter; } if (string.IsNullOrEmpty(this.ControlName)) { this.ControlName = this.Name; } counter++; this.Margin = new Padding(0, 0, 0, 0); this.Size = new Size(width, height); }
public void InitiateSettings(EIBFormDesigner.Designer.FormDesigner form) { this.Name = EIBControlCollection.CheckControlForUniqueness <EIBTime>(this.Name); if (string.IsNullOrEmpty(this.ControlName)) { this.ControlName = this.Name; } if (string.IsNullOrEmpty(this.UniqueId)) { this.UniqueId = this.Name; } EIBControlCollection.Timelist.Add(this.Name, this.Name); this.currentForm = form; counter = 0; //ShowTimeSplit(); }
public void InitiateSettings(EIBFormDesigner.Designer.FormDesigner form) { this.Name = EIBControlCollection.CheckControlForUniqueness <EIBMenuItem>(this.Name); this.ControlName = this.Name; if (string.IsNullOrEmpty(this.UniqueId)) { this.UniqueId = this.Name; } if (this.Text == null) { this.Text = this.Name; } EIBControlCollection.MenuItemlist.Add(this.Name, this.Name); //counter++; }
private static bool m_IsSimpleDrag = false; // Is this a simple drag? /// <summary> /// Initializes the DragDropHandler /// </summary> public static void Initialize(IUIEventManager eManager, EIBFormDesigner.Designer.FormDesigner designer) { eventManager = eManager; form = designer; if (m_Initialized) { return; } int idx = 0; // Collection of DataFormats from the app.config file NameValueCollection nvc = (NameValueCollection)ConfigurationSettings.GetConfig(m_DFSection); if (nvc == null) { throw new Exception("Invalid section requested during Initialization."); } // Store the collection in our internal collection for (idx = 0; idx < nvc.Count; idx++) { // Get the custom string for our new DataFormat // and generate a new DataFormat for it DataFormats.Format frmt = DataFormats.GetFormat(nvc[idx]); // Store the new DataFormat by object type m_htDataFormats.Add(nvc.GetKey(idx), frmt); } // Collection of DataFormatParents from the app.config file nvc = (NameValueCollection)ConfigurationSettings.GetConfig(m_DFPSection); // Store the collection in our internal collection for (idx = 0; idx < nvc.Count; idx++) { // Store the DataFormatParent mappins by parent object type // The value is a string[] of DataFormats that can be DragDropped // on the parent m_htDFParents.Add(nvc.GetKey(idx), ((string)nvc[idx]).Split(new Char[] { ',' })); } m_Initialized = true; }
public void InitiateSettings(EIBFormDesigner.Designer.FormDesigner form) { this.Name = EIBControlCollection.CheckControlForUniqueness <EIBTabPage>(this.Name); if (string.IsNullOrEmpty(this.ControlName)) { this.ControlName = this.Name; } if (string.IsNullOrEmpty(this.UniqueId)) { this.UniqueId = this.Name; } if (this.Text == null) { this.Text = this.Name; } EIBControlCollection.TabPagelist.Add(this.Name, this.Name); }
public void InitiateSettings(EIBFormDesigner.Designer.FormDesigner form) { EIBTabPage tabPage1 = new EIBTabPage(); tabPage1.InitiateSettings(null); EIBTabPage tabPage2 = new EIBTabPage(); tabPage2.InitiateSettings(null); tabPage1.Text = tabPage1.Name; tabPage2.Text = tabPage2.Name; this.Controls.Add(tabPage1); this.Controls.Add(tabPage2); this.Size = new Size(width, height); this.Name = EIBControlCollection.CheckControlForUniqueness <EIBTabControl>(this.Name); if (string.IsNullOrEmpty(this.ControlName)) { this.ControlName = this.Name; } if (string.IsNullOrEmpty(this.UniqueId)) { this.UniqueId = this.Name; } if (this.Text == null) { this.Text = this.Name; } EIBControlCollection.TabControllist.Add(this.Name, this.Name); //EIBTabPage tabPage1 = new EIBTabPage(); //EIBTabPage tabPage2 = new EIBTabPage(); //tabPage1.InitiateSettings(null); //tabPage2.InitiateSettings(null); //tabPage1.Text = "tabPage1"; //tabPage2.Text = "tabPage2"; //this.Controls.Add(tabPage1); //this.Controls.Add(tabPage2); //this.Size = new Size(width, height); //this.Name = "tabControl" + counter; //this.ControlName = this.Name; //this.Margin = new Padding(0, 0, 0, 0); //this.Text = "tabControl" + counter.ToString(); //counter++; }
public void InitiateSettings(EIBFormDesigner.Designer.FormDesigner form) { this.Size = new Size(width, height); this.Name = "search" + counter; checkUniqueness(this.Name); searchNames.Add(this.Name, this.Name); if (string.IsNullOrEmpty(this.ControlName)) { this.ControlName = this.Name; } if (string.IsNullOrEmpty(this.UniqueId)) { this.UniqueId = this.Name; } if (this.Text == null) { this.Text = this.Name; } this.Margin = new Padding(0, 0, 0, 0); this.Text = "search" + counter.ToString(); this.Font = SystemFonts.DefaultFont; counter++; }
public void save(FormDesigner form, XmlDocument applicationDoc) { String generatedFileName = null; String extension = ".xml"; string uniqueId = null; Hashtable controlProperties = XMLServices.updateSettings(form, EIBXMLUtilities.projectName, uniqueId); //add application name in manifest file XmlAttribute attr = null; attr = parentXmlNode.Attributes[XMLServicesConstants.XmlNodeNameAtt]; if (attr == null) { attr = parentXmlNode.OwnerDocument.CreateAttribute(XMLServicesConstants.XmlNodeNameAtt); attr.InnerText = EIBXMLUtilities.projectName; parentXmlNode.Attributes.Append(attr); } XmlNode formXmlNode = parentXmlNode.SelectSingleNode(FormDesignerConstants.FormPattern); XmlNode dataXmlNode = parentXmlNode.SelectSingleNode(FormDesignerConstants.DataPattern); XmlNode workXmlNode = parentXmlNode.SelectSingleNode(FormDesignerConstants.WorkflowPattern); //formXmlNode.RemoveAll(); //dataXmlNode.RemoveAll(); //workXmlNode.RemoveAll(); //delete old files for which name has been changed foreach (String oldFile in FormDesignerUtilities.oldFilesToBeDeleted) { File.Delete(EIBXMLUtilities.formFolderName + "\\" + oldFile + extension); } //clear the list for next session FormDesignerUtilities.oldFilesToBeDeleted.Clear(); if (applicationDoc != null) { foreach (BaseWindow baseWindow in FormDesigner.listBaseWindow) { //save basewindow only if it is visible //if (baseWindow.Visible == true) //{ #region Start If Condition //write each basewindow file if (baseWindow.baseFrame.ControlName == EIBXMLUtilities.projectName) { MessageBox.Show("Base Window can not have same name as of Application"); return; } baseWindow.TabText = baseWindow.baseFrame.ControlName; baseWindow.Text = baseWindow.baseFrame.ControlName; baseWindow.UniqueID = baseWindow.baseFrame.ControlName; baseWindow.XMLDocument = new XmlDocument(); //base window settings are of the base frame baseWindow.ControlProperties = XMLServices.updateSettings(baseWindow.baseFrame, baseWindow.Text, baseWindow.UniqueID); Hashtable eventProperties = XMLServices.updateEvents(baseWindow.baseFrame, baseWindow.Text, baseWindow.UniqueID); Hashtable internalEventProperties = XMLServices.updateInternalEvents(baseWindow.baseFrame, baseWindow.Text, baseWindow.UniqueID); baseWindow.ParentXmlNode = XMLServices.getRootNode(baseWindow.XMLDocument, BaseWindow.elementName, baseWindow.ControlProperties,eventProperties,internalEventProperties); baseWindow.baseFrame.ParentXmlNode = baseWindow.ParentXmlNode; if (baseWindow.TypeOfWindow.Equals(FormDesignerConstants.FormPattern)) { generatedFileName = EIBXMLUtilities.formFolderName + "\\" + baseWindow.UniqueID + extension; //Save Form Designer Design Elements XMLServices.saveXMLofChildren(baseWindow.baseFrame); //Save the generated Files in the chosen project folder Stream xmlFile = new FileStream(generatedFileName, FileMode.Create); baseWindow.XMLDocument.Save(xmlFile); xmlFile.Close(); //write base window into application file XmlNode xmlFormNode = SelectSingleNode(formXmlNode,baseWindow.baseFrame.ControlName); //If changing name of old window then remove the old basewindow if (baseWindow.Name != baseWindow.baseFrame.ControlName) { if (FormDesigner.listFormBaseWindow.ContainsKey(baseWindow.Name)) { //FormDesigner.listFormBaseWindow[baseWindow.Name].Close(); xmlFormNode = SelectSingleNode(formXmlNode, baseWindow.Name); FormDesigner.listFormBaseWindow.Remove(baseWindow.Name); //readding the new base window with new name as key FormDesigner.listFormBaseWindow.Add(baseWindow.baseFrame.ControlName, baseWindow); } } baseWindow.Name = baseWindow.baseFrame.ControlName; if (xmlFormNode == null) { XMLServices.writeElement(formXmlNode, FormDesignerConstants.FormPattern.ToLower(), baseWindow.ControlProperties, null, null); } else { XMLServices.appendElement(xmlFormNode, FormDesignerConstants.FormPattern.ToLower(), baseWindow.ControlProperties, null); if (FormDesigner.listFormBaseWindow.ContainsKey(baseWindow.Name)) { FormDesigner.listFormBaseWindow[baseWindow.Name] = baseWindow; } else { FormDesigner.listFormBaseWindow.Add(baseWindow.Name,baseWindow); } } //For each saved form pattern // If it is not Added in User Control Tab then // buttonA = add a button with defualt image, text of button will be name of formpattern //ButtonA will be registered as base control and registered in dragdrop handler //on drag either deserialize from the file and recreate the control or get the control object from application /// and add at the specified location } else if (baseWindow.TypeOfWindow.Equals(FormDesignerConstants.DataPattern)) { generatedFileName = EIBXMLUtilities.dataFolderName + "\\" + baseWindow.UniqueID + extension; //Save Database and its relationships DataSet DataSetNew = baseWindow.DatabaseDataSet; // Write the schema and data to an XML file. // Use WriteXml to write the document. DataSetNew.WriteXml(generatedFileName, XmlWriteMode.WriteSchema); // Dispose of the original DataSet. DataSetNew.Dispose(); //Edit xml Schema file to add attibute M2M(Many to Many). DatabaseXMLServices.Add_toSchema(DataSetNew.DataSetName, generatedFileName, baseWindow); //write base window into application file XmlNode xmlFormNode = SelectSingleNode(dataXmlNode, baseWindow.UniqueID); if (baseWindow.Name != baseWindow.baseFrame.ControlName) { if (FormDesigner.listDataBaseWindow.ContainsKey(baseWindow.Name)) { //FormDesigner.listFormBaseWindow[baseWindow.Name].Close(); xmlFormNode = SelectSingleNode(dataXmlNode, baseWindow.Name); FormDesigner.listDataBaseWindow.Remove(baseWindow.Name); //readding the new base window with new name as key //FormDesigner.listDataBaseWindow.Add(baseWindow.baseFrame.ControlName, baseWindow); } } baseWindow.Name = baseWindow.baseFrame.ControlName; if (xmlFormNode == null) { XMLServices.writeElement(dataXmlNode, FormDesignerConstants.DataPattern.ToLower(), baseWindow.ControlProperties, null, null); } else { XMLServices.appendElement(xmlFormNode, FormDesignerConstants.DataPattern.ToLower(), baseWindow.ControlProperties, null); if (FormDesigner.listDataBaseWindow.ContainsKey(baseWindow.Name)) { FormDesigner.listDataBaseWindow[baseWindow.Name] = baseWindow; } else { FormDesigner.listDataBaseWindow.Add(baseWindow.Name, baseWindow); } } } else if (baseWindow.TypeOfWindow.Equals(FormDesignerConstants.WorkflowPattern)) { generatedFileName = EIBXMLUtilities.workflowFolderName + "\\" + baseWindow.UniqueID + extension; //Save Workflow and its BPEL //Save Form Designer Design Elements WorkflowXMLServices.saveXMLofChildren(baseWindow.baseFrame); //Save the generated Files in the chosen project folder Stream xmlFile = new FileStream(generatedFileName, FileMode.Create); baseWindow.XMLDocument.Save(xmlFile); xmlFile.Close(); //write base window into application file XmlNode xmlFormNode = SelectSingleNode(workXmlNode, baseWindow.baseFrame.ControlName); //If changing name of old window then remove the old basewindow if (baseWindow.Name != baseWindow.baseFrame.ControlName) { if (FormDesigner.listWorkBaseWindow.ContainsKey(baseWindow.Name)) { //FormDesigner.listFormBaseWindow[baseWindow.Name].Close(); xmlFormNode = SelectSingleNode(workXmlNode, baseWindow.Name); FormDesigner.listWorkBaseWindow.Remove(baseWindow.Name); } } baseWindow.Name = baseWindow.baseFrame.ControlName; if (xmlFormNode == null) { XMLServices.writeElement(workXmlNode, FormDesignerConstants.WorkflowPattern.ToLower(), baseWindow.ControlProperties, null, null); } else { XMLServices.appendElement(xmlFormNode, FormDesignerConstants.WorkflowPattern.ToLower(), baseWindow.ControlProperties, null); if (FormDesigner.listWorkBaseWindow.ContainsKey(baseWindow.Name)) { FormDesigner.listWorkBaseWindow[baseWindow.Name] = baseWindow; } else { FormDesigner.listWorkBaseWindow.Add(baseWindow.Name, baseWindow); } } } //Mark the base window as saved baseWindow.IsBaseWindowSaved = true; #endregion //} } if (FormDesigner.useradminutility != null) { FormDesigner.useradminutility.Searilize(); } form.displayNameExplorer.serializeXMLMappings(); form.displayNameExplorer.comboBox1.Enabled = false; form.webServiceExplorer.serializeXMLMappings(); //generatedFileName = EIBXMLUtilities.usersFolderName + "\\" + "users.xml"; //if (AccessControlList.adminDataSet != null) //{ // AccessControlList.adminDataSet.WriteXml(generatedFileName, XmlWriteMode.IgnoreSchema); //} Stream applicationXmlFile = new FileStream(EIBXMLUtilities.projectFilePath, FileMode.Create); applicationDoc.Save(applicationXmlFile); applicationXmlFile.Close(); } }
/// <summary> /// Initializes the DragDropHandler /// </summary> public static void Initialize(IUIEventManager eManager, EIBFormDesigner.Designer.FormDesigner designer) { eventManager = eManager; form = designer; if (m_Initialized) return; int idx = 0; // Collection of DataFormats from the app.config file NameValueCollection nvc = (NameValueCollection)ConfigurationSettings.GetConfig(m_DFSection); if (nvc == null) throw new Exception("Invalid section requested during Initialization."); // Store the collection in our internal collection for (idx = 0; idx < nvc.Count; idx++) { // Get the custom string for our new DataFormat // and generate a new DataFormat for it DataFormats.Format frmt = DataFormats.GetFormat(nvc[idx]); // Store the new DataFormat by object type m_htDataFormats.Add(nvc.GetKey(idx), frmt); } // Collection of DataFormatParents from the app.config file nvc = (NameValueCollection)ConfigurationSettings.GetConfig(m_DFPSection); // Store the collection in our internal collection for (idx = 0; idx < nvc.Count; idx++) { // Store the DataFormatParent mappins by parent object type // The value is a string[] of DataFormats that can be DragDropped // on the parent m_htDFParents.Add(nvc.GetKey(idx), ((string)nvc[idx]).Split(new Char[] { ',' })); } m_Initialized = true; }
public void save(FormDesigner form, XmlDocument applicationDoc) { String generatedFileName = null; String extension = ".xml"; string uniqueId = null; Hashtable controlProperties = XMLServices.updateSettings(form, EIBXMLUtilities.projectName, uniqueId); //add application name in manifest file XmlAttribute attr = null; attr = parentXmlNode.Attributes[XMLServicesConstants.XmlNodeNameAtt]; if (attr == null) { attr = parentXmlNode.OwnerDocument.CreateAttribute(XMLServicesConstants.XmlNodeNameAtt); attr.InnerText = EIBXMLUtilities.projectName; parentXmlNode.Attributes.Append(attr); } XmlNode formXmlNode = parentXmlNode.SelectSingleNode(FormDesignerConstants.FormPattern); XmlNode dataXmlNode = parentXmlNode.SelectSingleNode(FormDesignerConstants.DataPattern); XmlNode workXmlNode = parentXmlNode.SelectSingleNode(FormDesignerConstants.WorkflowPattern); //formXmlNode.RemoveAll(); //dataXmlNode.RemoveAll(); //workXmlNode.RemoveAll(); //delete old files for which name has been changed //foreach (String oldFile in FormDesignerUtilities.oldFilesToBeDeleted) //{ // File.Delete(EIBXMLUtilities.formFolderName + "\\" + oldFile + extension); //} //Moving old files to a bakup directory foreach (String oldFile in FormDesignerUtilities.oldFilesToBeDeleted) { Directory.CreateDirectory(EIBXMLUtilities.formFolderName + "\\..\\BAK_Forms"); if (File.Exists(EIBXMLUtilities.formFolderName + "\\" + oldFile + extension)) { if (File.Exists(EIBXMLUtilities.formFolderName + "\\..\\BAK_Forms" + "\\" + oldFile + extension)) { File.Delete(EIBXMLUtilities.formFolderName + "\\..\\BAK_Forms" + "\\" + oldFile + extension); } File.Move(EIBXMLUtilities.formFolderName + "\\" + oldFile + extension, EIBXMLUtilities.formFolderName + "\\..\\BAK_Forms" + "\\" + oldFile + extension); } } //clear the list for next session FormDesignerUtilities.oldFilesToBeDeleted.Clear(); if (applicationDoc != null) { foreach (BaseWindow baseWindow in FormDesigner.listBaseWindow) { //save basewindow only if it is visible //if (baseWindow.Visible == true) //{ #region Start If Condition //write each basewindow file if (baseWindow.baseFrame.ControlName == EIBXMLUtilities.projectName) { MessageBox.Show("Base Window can not have same name as of Application"); return; } baseWindow.TabText = baseWindow.baseFrame.ControlName; baseWindow.Text = baseWindow.baseFrame.ControlName; baseWindow.UniqueID = baseWindow.baseFrame.ControlName; baseWindow.XMLDocument = new XmlDocument(); //base window settings are of the base frame baseWindow.ControlProperties = XMLServices.updateSettings(baseWindow.baseFrame, baseWindow.Text, baseWindow.UniqueID); Hashtable eventProperties = XMLServices.updateEvents(baseWindow.baseFrame, baseWindow.Text, baseWindow.UniqueID); Hashtable internalEventProperties = XMLServices.updateInternalEvents(baseWindow.baseFrame, baseWindow.Text, baseWindow.UniqueID); baseWindow.ParentXmlNode = XMLServices.getRootNode(baseWindow.XMLDocument, BaseWindow.elementName, baseWindow.ControlProperties, eventProperties, internalEventProperties); baseWindow.baseFrame.ParentXmlNode = baseWindow.ParentXmlNode; if (baseWindow.TypeOfWindow.Equals(FormDesignerConstants.FormPattern)) { try { generatedFileName = EIBXMLUtilities.formFolderName + "\\" + baseWindow.UniqueID + extension; //Save Form Designer Design Elements XMLServices.saveXMLofChildren(baseWindow.baseFrame); //Save the generated Files in the chosen project folder Stream xmlFile = new FileStream(generatedFileName, FileMode.Create); baseWindow.XMLDocument.Save(xmlFile); xmlFile.Close(); //write base window into application file XmlNode xmlFormNode = SelectSingleNode(formXmlNode, baseWindow.baseFrame.ControlName); //If changing name of old window then remove the old basewindow if (baseWindow.Name != baseWindow.baseFrame.ControlName) { if (FormDesigner.listFormBaseWindow.ContainsKey(baseWindow.Name)) { //FormDesigner.listFormBaseWindow[baseWindow.Name].Close(); xmlFormNode = SelectSingleNode(formXmlNode, baseWindow.Name); FormDesigner.listFormBaseWindow.Remove(baseWindow.Name); //readding the new base window with new name as key FormDesigner.listFormBaseWindow.Add(baseWindow.baseFrame.ControlName, baseWindow); } } baseWindow.Name = baseWindow.baseFrame.ControlName; if (xmlFormNode == null) { XMLServices.writeElement(formXmlNode, FormDesignerConstants.FormPattern.ToLower(), baseWindow.ControlProperties, null, null); } else { XMLServices.appendElement(xmlFormNode, FormDesignerConstants.FormPattern.ToLower(), baseWindow.ControlProperties, null); if (FormDesigner.listFormBaseWindow.ContainsKey(baseWindow.Name)) { FormDesigner.listFormBaseWindow[baseWindow.Name] = baseWindow; } else { FormDesigner.listFormBaseWindow.Add(baseWindow.Name, baseWindow); } } //For each saved form pattern // If it is not Added in User Control Tab then // buttonA = add a button with defualt image, text of button will be name of formpattern //ButtonA will be registered as base control and registered in dragdrop handler //on drag either deserialize from the file and recreate the control or get the control object from application /// and add at the specified location } catch (Exception ex) { MessageBox.Show("Error-Save: " + ex.Message + "\r\n" + "FineName: " + generatedFileName); } } else if (baseWindow.TypeOfWindow.Equals(FormDesignerConstants.DataPattern)) { generatedFileName = EIBXMLUtilities.dataFolderName + "\\" + baseWindow.UniqueID + extension; //Save Database and its relationships DataSet DataSetNew = baseWindow.DatabaseDataSet; // Write the schema and data to an XML file. // Use WriteXml to write the document. DataSetNew.WriteXml(generatedFileName, XmlWriteMode.WriteSchema); // Dispose of the original DataSet. DataSetNew.Dispose(); //Edit xml Schema file to add attibute M2M(Many to Many). DatabaseXMLServices.Add_toSchema(DataSetNew.DataSetName, generatedFileName, baseWindow); //write base window into application file XmlNode xmlFormNode = SelectSingleNode(dataXmlNode, baseWindow.UniqueID); if (baseWindow.Name != baseWindow.baseFrame.ControlName) { if (FormDesigner.listDataBaseWindow.ContainsKey(baseWindow.Name)) { //FormDesigner.listFormBaseWindow[baseWindow.Name].Close(); xmlFormNode = SelectSingleNode(dataXmlNode, baseWindow.Name); FormDesigner.listDataBaseWindow.Remove(baseWindow.Name); //readding the new base window with new name as key //FormDesigner.listDataBaseWindow.Add(baseWindow.baseFrame.ControlName, baseWindow); } } baseWindow.Name = baseWindow.baseFrame.ControlName; if (xmlFormNode == null) { XMLServices.writeElement(dataXmlNode, FormDesignerConstants.DataPattern.ToLower(), baseWindow.ControlProperties, null, null); } else { XMLServices.appendElement(xmlFormNode, FormDesignerConstants.DataPattern.ToLower(), baseWindow.ControlProperties, null); if (FormDesigner.listDataBaseWindow.ContainsKey(baseWindow.Name)) { FormDesigner.listDataBaseWindow[baseWindow.Name] = baseWindow; } else { FormDesigner.listDataBaseWindow.Add(baseWindow.Name, baseWindow); } } } else if (baseWindow.TypeOfWindow.Equals(FormDesignerConstants.WorkflowPattern)) { generatedFileName = EIBXMLUtilities.workflowFolderName + "\\" + baseWindow.UniqueID + extension; //Save Workflow and its BPEL //Save Form Designer Design Elements WorkflowXMLServices.saveXMLofChildren(baseWindow.baseFrame); //Save the generated Files in the chosen project folder Stream xmlFile = new FileStream(generatedFileName, FileMode.Create); baseWindow.XMLDocument.Save(xmlFile); xmlFile.Close(); //write base window into application file XmlNode xmlFormNode = SelectSingleNode(workXmlNode, baseWindow.baseFrame.ControlName); //If changing name of old window then remove the old basewindow if (baseWindow.Name != baseWindow.baseFrame.ControlName) { if (FormDesigner.listWorkBaseWindow.ContainsKey(baseWindow.Name)) { //FormDesigner.listFormBaseWindow[baseWindow.Name].Close(); xmlFormNode = SelectSingleNode(workXmlNode, baseWindow.Name); FormDesigner.listWorkBaseWindow.Remove(baseWindow.Name); } } baseWindow.Name = baseWindow.baseFrame.ControlName; if (xmlFormNode == null) { XMLServices.writeElement(workXmlNode, FormDesignerConstants.WorkflowPattern.ToLower(), baseWindow.ControlProperties, null, null); } else { XMLServices.appendElement(xmlFormNode, FormDesignerConstants.WorkflowPattern.ToLower(), baseWindow.ControlProperties, null); if (FormDesigner.listWorkBaseWindow.ContainsKey(baseWindow.Name)) { FormDesigner.listWorkBaseWindow[baseWindow.Name] = baseWindow; } else { FormDesigner.listWorkBaseWindow.Add(baseWindow.Name, baseWindow); } } } //Mark the base window as saved baseWindow.IsBaseWindowSaved = true; #endregion //} } if (FormDesigner.useradminutility != null) { FormDesigner.useradminutility.Searilize(); } form.displayNameExplorer.serializeXMLMappings(); form.displayNameExplorer.comboBox1.Enabled = false; form.webServiceExplorer.serializeXMLMappings(); //generatedFileName = EIBXMLUtilities.usersFolderName + "\\" + "users.xml"; //if (AccessControlList.adminDataSet != null) //{ // AccessControlList.adminDataSet.WriteXml(generatedFileName, XmlWriteMode.IgnoreSchema); //} Stream applicationXmlFile = new FileStream(EIBXMLUtilities.projectFilePath, FileMode.Create); applicationDoc.Save(applicationXmlFile); applicationXmlFile.Close(); } }
public BuildTool(FormDesigner form) { BuildTool.form = form; form.MakePublish(false); }
static void Main() { Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US", false); Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US", false); Console.WriteLine("CurrentCulture is {0}.", CultureInfo.CurrentCulture.Name); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); //MessageBox.Show(Application.StartupPath); string omlfFileDir = Application.StartupPath; //string omlfFilePath = Application.StartupPath + @"\NolisFormDesigner.omlf"; string ContentsOfFile = null; string dirConfig = null; bool isValidLicenseFile = false; //try //{ // //dirConfig = @"./"+"a"; // //FileInfo fi = new FileInfo(dirConfig); // string [] omlfFiles = Directory.GetFiles(omlfFileDir, "*.omlf", SearchOption.TopDirectoryOnly); // foreach (string omlfFilePath in omlfFiles) // { // try // { // ContentsOfFile = File.ReadAllText(omlfFilePath); // isValidLicenseFile = ValidateLicenseFile(omlfFileDir, ContentsOfFile); // if (isValidLicenseFile) // break; // } // catch (Exception excep) // { // } // } // if (!isValidLicenseFile) // { // OpenFileDialog openFileDialog = new OpenFileDialog(); // openFileDialog.InitialDirectory = omlfFileDir; // openFileDialog.DefaultExt = "*.omlf"; // openFileDialog.Filter = "(omlf Files)|*.omlf"; // DialogResult openDialogResult = openFileDialog.ShowDialog(); // if (openDialogResult == DialogResult.Cancel) // { // MessageBox.Show("Sorry. Please select the omlf(oxyent Medical Licence File) file.", "Form Designer", MessageBoxButtons.OK, MessageBoxIcon.Error); // return; // } // else // { // ContentsOfFile = File.ReadAllText(openFileDialog.FileName); // } // isValidLicenseFile = ValidateLicenseFile(omlfFileDir, ContentsOfFile); // } //} //catch (Exception ex) //{ // MessageBox.Show(ex.Message); //} isValidLicenseFile = true; if (isValidLicenseFile) { currentForm = new EIBFormDesigner.Designer.FormDesigner(); //Uncomment if you want designer to cover the whole desktop Screen //ef.FormBorderStyle = FormBorderStyle.None; currentForm.WindowState = FormWindowState.Maximized; //SceanrioBuilder sc = new SceanrioBuilder(); Application.Run(currentForm); } }
public void InitiateSettings(EIBFormDesigner.Designer.FormDesigner form) { designerForm = form; /* this.CellBorderStyle = TableLayoutPanelCellBorderStyle.Inset; */ this.BackColor = Color.White; this.Size = new Size(width, height); if (string.IsNullOrEmpty(this.Name)) { this.Name = "lattice" + counter; } if (string.IsNullOrEmpty(this.ControlName)) { this.ControlName = this.Name; } this.Margin = new Padding(0, 0, 0, 0); this.Text = "lattice" + counter.ToString(); this.Font = SystemFonts.DefaultFont; counter++; }
public void InitiateSettings(EIBFormDesigner.Designer.FormDesigner form) { this.Name = EIBControlCollection.CheckControlForUniqueness<EIBTime>(this.Name); if (string.IsNullOrEmpty(this.ControlName)) { this.ControlName = this.Name; } if (string.IsNullOrEmpty(this.UniqueId)) { this.UniqueId = this.Name; } EIBControlCollection.Timelist.Add(this.Name, this.Name); this.currentForm = form; counter = 0; //ShowTimeSplit(); }