예제 #1
0
        public static object CreateControl(string ctrlName, string partialName)
        {
            try
            {
                Control ctrl = null;
                //ToolStripMenuItem menu;
                //ToolStripButton menuItem;
                switch (ctrlName)
                {
                    case "EIBButton":
                        ctrl = new EIBButton();
                        break;
                    case "EIBApplet":
                        ctrl = new EIBApplet();
                        break;
                    case "EIBLattice":
                        ctrl = new EIBLattice();
                        break;
                    case "EIBSchedular":
                        ctrl = new EIBSchedular();
                        break;
                    case "EIBDatePicker":
                        ctrl = new EIBDatePicker();
                        break;
                    case "EIBTime":
                        ctrl = new EIBTime();
                        break;
                    case "EIBCheckbox":
                        ctrl = new EIBCheckbox();
                        break;
                    case "EIBCombobox":
                        ctrl = new EIBCombobox();
                        break;
                    case "EIBLabel":
                        ctrl = new EIBLabel();
                        break;
                    case "EIBLine":
                        ctrl = new EIBLine();
                        break;
                    case "EIBPanel":
                        ctrl = new EIBPanel();
                        DragDropHandler.RegisterControl(ctrl, true, true);
                        break;
                    case "EIBJasper":
                        ctrl = new EIBJasper();
                        break;
                    case "EIBRadioGroup":
                        ctrl = new EIBRadioGroup();
                        DragDropHandler.RegisterControl(ctrl, true, true);
                        break;
                    case "EIBPicture":
                        ctrl = new EIBPicture();
                        break;
                    case "EIBRadioButton":
                        ctrl = new EIBRadioButton();
                        break;
                    case "EIBTabControl":
                        ctrl = new EIBTabControl();
                        DragDropHandler.RegisterControl(ctrl, true, true);
                        break;
                    case "EIBTabPage":
                        ctrl = new EIBTabPage();
                        DragDropHandler.RegisterControl(ctrl, true, true);
                        break;
                    case "EIBSearch":
                        ctrl = new EIBSearch();
                        break;
                    case "EIBListbox":
                        ctrl = new EIBListbox();
                        break;
                    case "EIBGrid":
                        ctrl = new EIBGrid();
                        DragDropHandler.RegisterControl(ctrl, true, true);
                        break;
                    case "EIBTable":
                        ctrl = new EIBTable();
                        break;
                    case "EIBRelation":
                        ctrl = new EIBRelation();
                        break;
                    case "EIBTextBox":
                        ctrl = new EIBTextBox();
                        break;
                    case "EIBTreeView":
                        ctrl = new EIBTreeView();
                        break;
                    case "EIBMenuBar":
                        ctrl = new EIBMenuBar(false);
                        DragDropHandler.RegisterControl(ctrl, true, true);
                        break;
                    case "EIBNode":
                        ctrl = new EIBNode();
                        break;
                    case "EIBNodeRelation":
                        ctrl = new EIBNodeRelation();
                        break;
                    case "EIBColumn":
                        ctrl = new EIBColumn();
                        DragDropHandler.RegisterControl(ctrl, true, true);
                        break;
                    case "EIBScrollableRow":
                        ctrl = new EIBScrollableRow();
                        DragDropHandler.RegisterControl(ctrl, true, true);
                        break;
                    case "EIBBrowse":
                        ctrl = new EIBBrowse();
                        break;
                    case "EIBVMenuBar":
                        ctrl = new EIBVMenuBar(false);
                        DragDropHandler.RegisterControl(ctrl, true, true);
                        break;
                    case "EIBMenu":
                        return new EIBMenu();
                    case "EIBMenuItem":
                        return new EIBMenuItem();
                    /*
                                        case "EIBTreeNode":
                                            ctrl = new EIBTreeNode();
                                            break;
                    */
                    default:
                        Assembly controlAsm = Assembly.LoadWithPartialName(partialName);
                        Type controlType = controlAsm.GetType(partialName + "." + ctrlName);
                        ctrl = (Control)Activator.CreateInstance(controlType);
                        break;

                }

                return ctrl;

            }
            catch (Exception ex)
            {
                System.Diagnostics.Trace.WriteLine("create control failed:" + ex.Message);
                return new Control();
            }
        }
예제 #2
0
 public void Add(EIBScrollableRow value)
 {
     // TODO:  Add RowsCollections.Add implementation
     this.parentTable.Controls.Add(value);
 }
예제 #3
0
 public ColumnCollection(EIBScrollableRow parent)
 {
     this.parentRow = parent;
 }
예제 #4
0
        //Deserialize individual base windows and there child control
        public static void DeserializeWindowXML(string fileName, Control baseFrame, XmlNode parentXMLNode)
        {
            XmlDocument doc = new XmlDocument();
            XmlNode currentXmlNode = null;
            EIBGrid grid = null;
            EIBLattice lattice = null;
            String dbg_xmlNodeName = "";
            try
            {

                // disabling re-drawing of treeview till all nodes are added
                fileName = fileName + ".xml";
                if (parentXMLNode == null)
                {
                    xmlFileName = fileName;
                    doc.Load(fileName);
                    currentXmlNode = doc.FirstChild;
                    baseFrame.Controls.Clear();
                }
                else
                {
                    currentXmlNode = parentXMLNode;
                }
                // baseFrame.Controls.Clear();
                if (currentXmlNode.Name == FormDesignerConstants.BaseWindow)
                {
                    // loading node attributes
                    UpdateControlProperties(baseFrame, currentXmlNode);
                    ((EIBPanel)baseFrame).AutoScroll = true;
                }
                foreach (XmlNode xmlNode in currentXmlNode.ChildNodes)
                {
                    #region Desearilization for each control
                    if (xmlNode.NodeType == XmlNodeType.Element)
                    {
                        dbg_xmlNodeName = xmlNode.Name;
                        if (xmlNode.Name == FormDesignerConstants.TextBoxControl)
                        {
                            EIBTextBox newNode = new EIBTextBox();
                            UpdateControlProperties(newNode, xmlNode);
                            newNode.InitiateSettings(null);
                            baseFrame.Controls.Add(newNode);
                            EIBTextBox.counter++;
                            //FormDesignerUtilities.formWindowNames.Add(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value, xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value.ToLower());
                            ControlValidation.addUniqueIdToList(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value);
                        }
                        if (xmlNode.Name == FormDesignerConstants.SchedularControl)
                        {
                            EIBSchedular newNode = new EIBSchedular();
                            UpdateControlProperties(newNode, xmlNode);
                            newNode.InitiateSettings(null);
                            baseFrame.Controls.Add(newNode);
                            EIBSchedular.counter++;
                           // FormDesignerUtilities.formWindowNames.Add(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value, xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value.ToLower());
                            ControlValidation.addUniqueIdToList(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value);
                        }
                        if (xmlNode.Name == FormDesignerConstants.AppletControl)
                        {
                            EIBApplet newNode = new EIBApplet();
                            UpdateControlProperties(newNode, xmlNode);
                            newNode.InitiateSettings(null);
                            baseFrame.Controls.Add(newNode);
                            EIBApplet.counter++;
                            //FormDesignerUtilities.formWindowNames.Add(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value, xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value.ToLower());
                            ControlValidation.addUniqueIdToList(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value);
                        }
                        if (xmlNode.Name == FormDesignerConstants.ButtonControl)
                        {
                            EIBButton newNode = new EIBButton();
                            UpdateControlProperties(newNode, xmlNode);
                            newNode.InitiateSettings(null);
                            baseFrame.Controls.Add(newNode);
                            EIBButton.counter++;
                           // FormDesignerUtilities.formWindowNames.Add(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value, xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value.ToLower());
                            //UIEventManager.form.Controlpool.Add(newNode,);
                            ControlValidation.addUniqueIdToList(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value);
                        }
                        if (xmlNode.Name == FormDesignerConstants.JasperControl)
                        {
                            EIBJasper newNode = new EIBJasper();
                            UpdateControlProperties(newNode, xmlNode);
                            newNode.InitiateSettings(null);
                            baseFrame.Controls.Add(newNode);
                            EIBJasper.counter++;
                           // FormDesignerUtilities.formWindowNames.Add(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value, xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value.ToLower());
                            ControlValidation.addUniqueIdToList(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value);
                        }
                        if (xmlNode.Name == FormDesignerConstants.DatePickerControl)
                        {
                            EIBDatePicker newNode = new EIBDatePicker();
                            UpdateControlProperties(newNode, xmlNode);
                            newNode.InitiateSettings(null);
                            baseFrame.Controls.Add(newNode);
                            EIBDatePicker.counter++;
                           // FormDesignerUtilities.formWindowNames.Add(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value, xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value.ToLower());
                            ControlValidation.addUniqueIdToList(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value);
                        }
                        if (xmlNode.Name == FormDesignerConstants.TimeControl)
                        {
                            EIBTime newNode = new EIBTime();
                            UpdateControlProperties(newNode, xmlNode);
                            newNode.InitiateSettings(null);
                            baseFrame.Controls.Add(newNode);
                            newNode.ShowTimeSplit();
                            EIBTime.counter++;
                           // FormDesignerUtilities.formWindowNames.Add(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value, xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value.ToLower());
                            ControlValidation.addUniqueIdToList(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value);
                        }
                        if (xmlNode.Name == FormDesignerConstants.CalenderControl)
                        {
                            EIBCalender newNode = new EIBCalender();
                            UpdateControlProperties(newNode, xmlNode);
                            newNode.InitiateSettings(null);
                            baseFrame.Controls.Add(newNode);
                            EIBCalender.counter++;
                           // FormDesignerUtilities.formWindowNames.Add(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value, xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value.ToLower());
                            ControlValidation.addUniqueIdToList(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value);
                        }
                        if (xmlNode.Name == FormDesignerConstants.LabelControl)
                        {
                            EIBLabel newNode = new EIBLabel();
                            UpdateControlProperties(newNode, xmlNode);
                            newNode.InitiateSettings(null);
                            baseFrame.Controls.Add(newNode);
                            EIBLabel.counter++;
                          //  FormDesignerUtilities.formWindowNames.Add(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value, xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value.ToLower());
                            ControlValidation.addUniqueIdToList(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value);
                        }
                        if (xmlNode.Name == FormDesignerConstants.RadioControl)
                        {
                            EIBRadioButton newNode = new EIBRadioButton();
                            UpdateControlProperties(newNode, xmlNode);
                            newNode.InitiateSettings(null);
                            baseFrame.Controls.Add(newNode);
                            EIBRadioButton.counter++;
                          //  FormDesignerUtilities.formWindowNames.Add(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value, xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value.ToLower());
                            ControlValidation.addUniqueIdToList(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value);
                        }
                        if (xmlNode.Name == FormDesignerConstants.CheckboxControl)
                        {
                            EIBCheckbox newNode = new EIBCheckbox();
                            UpdateControlProperties(newNode, xmlNode);
                            newNode.InitiateSettings(null);
                            baseFrame.Controls.Add(newNode);
                            EIBCheckbox.counter++;
                           // FormDesignerUtilities.formWindowNames.Add(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value,xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value.ToLower());
                            ControlValidation.addUniqueIdToList(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value);
                        }
                        if (xmlNode.Name == FormDesignerConstants.ComboControl)
                        {
                            EIBCombobox newNode = new EIBCombobox();
                            UpdateControlProperties(newNode, xmlNode);
                            UpdateComboBoxValues(newNode, xmlNode);
                            newNode.InitiateSettings(null);
                            baseFrame.Controls.Add(newNode);
                            EIBCombobox.counter++;
                          //  FormDesignerUtilities.formWindowNames.Add(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value, xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value.ToLower());
                            ControlValidation.addUniqueIdToList(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value);
                        }
                        if (xmlNode.Name == FormDesignerConstants.PagingControl)
                        {
                            EIBPaging newNode = new EIBPaging();
                            UpdateControlProperties(newNode, xmlNode);
                            newNode.InitiateSettings(null);
                            baseFrame.Controls.Add(newNode);
                            EIBPaging.counter++;
                          //  FormDesignerUtilities.formWindowNames.Add(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value, xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value.ToLower());
                            ControlValidation.addUniqueIdToList(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value);
                        }
                        if (xmlNode.Name == FormDesignerConstants.ImageBrowseControl)
                        {
                            EIBImageBrowse newNode = new EIBImageBrowse();
                            UpdateControlProperties(newNode, xmlNode);
                            newNode.InitiateSettings(null);
                            baseFrame.Controls.Add(newNode);
                            EIBImageBrowse.counter++;
                          //  FormDesignerUtilities.formWindowNames.Add(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value, xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value.ToLower());
                            ControlValidation.addUniqueIdToList(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value);
                        }
                        /*if (xmlNode.Name == FormDesignerConstants.MenuBarControl)
                        {
                            EIBMenuBar.counter++;
                            EIBMenuBar newNode = new EIBMenuBar();
                            UpdateControlProperties(newNode, xmlNode);
                            UpdateMenuValues(newNode, xmlNode);
                            newNode.InitiateSettings(null);
                            baseFrame.Controls.Add(newNode);
                            newNode.Height = 25;
                            newNode.Width = newNode.Parent.Width;
                            newNode.CurrentToolStrip.Dock = DockStyle.Fill;
                            DragDropHandler.RegisterControl(newNode, true, true);
                            newNode.Click += new EventHandler(FormDesigner.eventManager.handleMenuClick);
                            currentControl = newNode;
                        }*/
                        if (xmlNode.Name == FormDesignerConstants.MenuBarControl)
                        {
                            EIBVMenuBar newNode = new EIBVMenuBar();
                            UpdateControlProperties(newNode, xmlNode);
                            UpdateMenuValues(newNode, xmlNode);
                            newNode.InitiateSettings(null);
                            newNode.Dock = DockStyle.None;
                            baseFrame.Controls.Add(newNode);
                            DragDropHandler.RegisterControl(newNode, true, true);
                            newNode.PerformLayout();
                            //newNode.Size = new Size(30, 30);
                            //newNode.Click += new EventHandler(FormDesigner.eventManager.handleMenuClick);
                            currentControl = newNode;
                            EIBVMenuBar.counter++;
                          //  FormDesignerUtilities.formWindowNames.Add(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value, xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value.ToLower());
                            ControlValidation.addUniqueIdToList(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value);
                        }
                        if (xmlNode.Name == FormDesignerConstants.FrameControl)
                        {
                            EIBPanel newNode = new EIBPanel();
                            UpdateControlProperties(newNode, xmlNode);
                            newNode.InitiateSettings(null);
                            baseFrame.Controls.Add(newNode);
                            EIBDeserializeServices.DeserializeWindowXML(null, newNode, xmlNode);
                            DragDropHandler.RegisterControl(newNode, true, true);
                            Console.Write("Done with Frame");
                            EIBPanel.counter++;
                        }
                        if (xmlNode.Name == FormDesignerConstants.PlaceHolderControl)
                        {
                            EIBPlaceHolder newNode = new EIBPlaceHolder();

                            UpdateControlProperties(newNode, xmlNode);
                            newNode.InitiateSettings(null);
                            baseFrame.Controls.Add(newNode);
                            EIBDeserializeServices.DeserializeWindowXML(null, newNode, xmlNode);
                            DragDropHandler.RegisterControl(newNode, true, true);
                            Console.Write("Done with PlaceHolder");
                            EIBPlaceHolder.counter++;
                           // FormDesignerUtilities.formWindowNames.Add(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value, xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value.ToLower());
                            ControlValidation.addUniqueIdToList(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value);
                        }
                        if (xmlNode.Name == FormDesignerConstants.UserControl)
                        {
                            EIBItem newNode = new EIBItem();

                            UpdateControlProperties(newNode, xmlNode);
                            newNode.InitiateSettings(null);
                            baseFrame.Controls.Add(newNode);
                            //EIBDeserializeServices.DeserializeWindowXML(null, newNode, xmlNode);
                            //DragDropHandler.RegisterControl(newNode, true, true);
                            Console.Write("Done with Item");
                            EIBItem.counter++;
                        }

                        if (xmlNode.Name == FormDesignerConstants.RadioGroupControl)
                        {
                            EIBRadioGroup newNode = new EIBRadioGroup();
                            UpdateControlProperties(newNode, xmlNode);
                            newNode.InitiateSettings(null);
                            baseFrame.Controls.Add(newNode);
                            EIBDeserializeServices.DeserializeWindowXML(null, newNode, xmlNode);
                            DragDropHandler.RegisterControl(newNode, true, true);
                            //Console.Write("Done with EIBradioGroup");
                            EIBRadioGroup.counter++;
                           // FormDesignerUtilities.formWindowNames.Add(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value, xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value.ToLower());
                            ControlValidation.addUniqueIdToList(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value);
                        }

                        if (xmlNode.Name == FormDesignerConstants.PictureControl)
                        {
                            EIBPicture newNode = new EIBPicture();
                            UpdateControlProperties(newNode, xmlNode);
                            newNode.InitiateSettings(null);
                            baseFrame.Controls.Add(newNode);
                            EIBPicture.counter++;
                         //   FormDesignerUtilities.formWindowNames.Add(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value, xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value.ToLower());
                            ControlValidation.addUniqueIdToList(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value);
                        }
                        if (xmlNode.Name == FormDesignerConstants.GridControl)
                        {
                            EIBGrid newNode = new EIBGrid();
                            UpdateControlProperties(newNode, xmlNode);
                            currentControl = newNode;
                            baseFrame.Controls.Add(newNode);
                            DragDropHandler.RegisterControl(newNode, true, true);
                            EIBDeserializeServices.DeserializeWindowXML(null, newNode, xmlNode);
                            EIBGrid.counter++;
                          //  FormDesignerUtilities.formWindowNames.Add(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value, xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value.ToLower());
                            ControlValidation.addUniqueIdToList(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value);
                        }
                        if (xmlNode.Name == FormDesignerConstants.LatticeControl)
                        {
                            EIBLattice newNode = new EIBLattice();
                            UpdateControlProperties(newNode, xmlNode);
                            currentControl = newNode;
                            baseFrame.Controls.Add(newNode);
                            DragDropHandler.RegisterControl(newNode, true, true);
                            EIBDeserializeServices.DeserializeWindowXML(null, newNode, xmlNode);
                            EIBLattice.counter++;
                          //  FormDesignerUtilities.formWindowNames.Add(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value, xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value.ToLower());
                            ControlValidation.addUniqueIdToList(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value);
                        }
                        if (xmlNode.Name.Trim().Equals(FormDesignerConstants.ScrollableRowControl, StringComparison.CurrentCultureIgnoreCase))
                        {
                            EIBScrollableRow newNode = new EIBScrollableRow();
                            if (currentControl is EIBGrid)
                            {
                                if (currentControl is EIBGrid)
                                {
                                    grid = (EIBGrid)currentControl;
                                    UpdateControlProperties(newNode, xmlNode);
                                    DragDropHandler.RegisterControl(newNode, true, true);
                                    grid.Rows.Add(newNode);
                                    currentControl = newNode;
                                    EIBDeserializeServices.DeserializeWindowXML(null, newNode, xmlNode);
                                    EIBScrollableRow.counter++;
                                    // FormDesignerUtilities.formWindowNames.Add(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value, xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value.ToLower());
                                    ControlValidation.addUniqueIdToList(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value);
                                }
                            }
                            else
                            {
                                // EIBLabel newNode = new EIBLabel();
                                UpdateControlProperties(newNode, xmlNode);
                                newNode.InitiateSettings(null);
                                baseFrame.Controls.Add(newNode);
                                EIBScrollableRow.counter++;
                                //  FormDesignerUtilities.formWindowNames.Add(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value, xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value.ToLower());
                                ControlValidation.addUniqueIdToList(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value);
                            }

                        }

                        //added for LROW
                        if (xmlNode.Name.Trim().Equals(FormDesignerConstants.LRowControl, StringComparison.CurrentCultureIgnoreCase))
                        {
                            EIBScrollableRow newNode = new EIBScrollableRow();
                            if (currentControl is EIBLattice)
                            {
                                if (currentControl is EIBLattice)
                                {
                                    lattice = (EIBLattice)currentControl;
                                    UpdateControlProperties(newNode, xmlNode);
                                    DragDropHandler.RegisterControl(newNode, true, true);
                                    //  lattice.Rows.Add(newNode);
                                    IEIBControl parent = currentControl;
                                    currentControl = newNode;
                                    EIBDeserializeServices.DeserializeWindowXML(null, newNode, xmlNode);
                                    currentControl = parent;
                                    EIBScrollableRow.counter++;
                                    //  FormDesignerUtilities.formWindowNames.Add(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value, xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value.ToLower());
                                    ControlValidation.addUniqueIdToList(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value);
                                }
                            }

                        }
                        if (xmlNode.Name.Trim().Equals(FormDesignerConstants.ColumnControl, StringComparison.CurrentCultureIgnoreCase))
                        {
                            EIBColumn newNode = new EIBColumn();
                            if (currentControl is EIBScrollableRow)
                            {
                                EIBScrollableRow row = (EIBScrollableRow)currentControl;
                                row.Columns.Add(newNode);
                                DragDropHandler.RegisterControl(newNode, true, true);
                                UpdateControlProperties(newNode, xmlNode);
                            }
                            EIBDeserializeServices.DeserializeWindowXML(null, newNode, xmlNode);
                            EIBColumn.counter++;
                        }
                        //added for LCOLUMN
                        if (xmlNode.Name.Trim().Equals(FormDesignerConstants.LColumnControl, StringComparison.CurrentCultureIgnoreCase))
                        {
                            EIBColumn newNode = new EIBColumn();
                            if (currentControl is EIBScrollableRow)
                            {
                                EIBScrollableRow row = (EIBScrollableRow)currentControl;
                                row.Columns.Add(newNode);
                                DragDropHandler.RegisterControl(newNode, true, true);
                                UpdateControlProperties(newNode, xmlNode);
                            }
                            EIBDeserializeServices.DeserializeWindowXML(null, newNode, xmlNode);
                            EIBColumn.counter++;
                        }
                        if (xmlNode.Name == FormDesignerConstants.ListControl)
                        {
                            EIBListbox newNode = new EIBListbox();
                            UpdateControlProperties(newNode, xmlNode);
                            UpdateListBoxValues(newNode, xmlNode);
                            newNode.InitiateSettings(null);
                            baseFrame.Controls.Add(newNode);
                            EIBListbox.counter++;
                            //FormDesignerUtilities.formWindowNames.Add(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value, xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value.ToLower());
                            ControlValidation.addUniqueIdToList(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value);
                        }
                        if (xmlNode.Name == FormDesignerConstants.MultiTabControl)
                        {
                            EIBTabControl newNode = new EIBTabControl();
                            UpdateControlProperties(newNode, xmlNode);
                            //newNode.InitiateSettings(null);
                            baseFrame.Controls.Add(newNode);
                            EIBDeserializeServices.DeserializeWindowXML(null, newNode, xmlNode);
                            DragDropHandler.RegisterControl(newNode, true, true);
                            EIBTabControl.counter++;
                         //   FormDesignerUtilities.formWindowNames.Add(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value, xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value.ToLower());
                            ControlValidation.addUniqueIdToList(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value);
                        }
                        if (xmlNode.Name == FormDesignerConstants.TreeNodeControl)
                        {
                            EIBTreeNode newNode = new EIBTreeNode();
                            currentTreeControl = null;
                            UpdateTreeNodeProperties(newNode, xmlNode);
                            newNode.InitiateSettings(null);
                            if ((currentControl != null) && (currentControl is EIBTreeView))
                            {
                                if (!(((EIBTreeView)currentControl).Nodes.Contains(newNode)))
                                {
                                    ((EIBTreeView)currentControl).Nodes.Add(newNode);
                                }
                            }
                            //baseFrame.Controls.Add(newNode);
                            EIBTreeNode.counter++;
                           // FormDesignerUtilities.formWindowNames.Add(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value, xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value.ToLower());
                            ControlValidation.addUniqueIdToList(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value);
                        }
                        if (xmlNode.Name == FormDesignerConstants.TabPage)
                        {
                            EIBTabPage newNode = new EIBTabPage();
                            UpdateControlProperties(newNode, xmlNode);
                            newNode.InitiateSettings(null);
                            baseFrame.Controls.Add(newNode);
                            EIBDeserializeServices.DeserializeWindowXML(null, newNode, xmlNode);
                            EIBTabPage.counter++;
                        //    FormDesignerUtilities.formWindowNames.Add(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value, xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value.ToLower());
                            ControlValidation.addUniqueIdToList(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value);
                        }
                        if (xmlNode.Name == FormDesignerConstants.TreeControl)
                        {
                            EIBTreeView newNode = new EIBTreeView();
                            UpdateControlProperties(newNode, xmlNode);
                            newNode.InitiateSettings(null);
                            baseFrame.Controls.Add(newNode);
                            currentControl = newNode;
                            EIBDeserializeServices.DeserializeWindowXML(null, newNode, xmlNode);
                            DragDropHandler.RegisterControl(newNode, true, true);
                            EIBTreeView.counter++;
                           // FormDesignerUtilities.formWindowNames.Add(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value, xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value.ToLower());
                            ControlValidation.addUniqueIdToList(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value);
                        }
                        if (xmlNode.Name == FormDesignerConstants.SearchControl)
                        {
                            EIBSearch eibSearch = new EIBSearch();
                            UpdateControlProperties(eibSearch, xmlNode);
                            eibSearch.SearchDesign = new EIBFormDesigner.Search.SearchDesigner(baseFrame);
                            eibSearch.SearchDesign.initSearchFrame(baseFrame);
                            UpdateSearchProperties(eibSearch.SearchDesign, xmlNode);
                            baseFrame.Controls.Add(eibSearch);
                            EIBSearch.counter++;
                         //   FormDesignerUtilities.formWindowNames.Add(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value, xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value.ToLower());
                            ControlValidation.addUniqueIdToList(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value);
                        }
                        if (xmlNode.Name == FormDesignerConstants.BrowseControl)
                        {
                            EIBBrowse eibBrowse = new EIBBrowse();
                            UpdateControlProperties(eibBrowse, xmlNode);
                            eibBrowse.InitiateSettings(null);
                            baseFrame.Controls.Add(eibBrowse);
                            EIBBrowse.counter++;
                          //  FormDesignerUtilities.formWindowNames.Add(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value, xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value.ToLower());
                            ControlValidation.addUniqueIdToList(xmlNode.Attributes[XMLServicesConstants.XmlNodeIdAtt].Value);
                        }
                    }
                    #endregion
                    // moving up to in TreeView if end tag is encountered
                }
            }
            catch (FileNotFoundException ex)
            {
                MessageBox.Show("The File " + ex.FileName + " not found.");
            }
            catch (Exception ex)
            {
                String errStr = "Error occured in file " + xmlFileName + "\r\n";
                errStr += "Error-DeserializeWindowXML: " + ex.Message + "\r\n";
                errStr += "XML Node: " + dbg_xmlNodeName + "\r\n";
                MessageBox.Show(errStr);
            }
            finally
            {

            }
        }