//
        private void listBox1_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            int          index        = m_listItems.SelectedIndex + 1;
            FactoryShape factoryShape = FactoryManager.getInstance().SelectTool(index);
            DrawElement  model        = factoryShape.CreateControl();

            ElementProperty prop   = FactoryActionParam.CreateParam(model);
            int             id     = m_Window.List.Count + 1;
            String          strVal = factoryShape.Name + factoryShape.List.Count.ToString();

            model.Property = prop;
            prop.SetValue("Name", strVal.Trim());
            prop.SetValue("Id", id.ToString());
            prop.SetValue("Location", model.Location.X.ToString() + "," + model.Location.Y.ToString());
            prop.SetValue("Text", model.Text);
            prop.SetValue("Size", model.Width.ToString() + "," + model.Height.ToString());
            //
            factoryShape.PopulatePropertyList(prop);
            m_GridView.Tag = prop;
            //
            Action action = factoryShape.CreateAddAction(model, m_Window);

            action.SetParam(prop);
            mHostory.ExcuteAction(action);
        }
        //
        public void CreateChildlement(XmlNode node)
        {
            FactoryShape factoryShape = FactoryManager.getInstance().GetFactory(node.Name);
            DrawElement  model        = factoryShape.CreateControl();

            ElementProperty prop = FactoryActionParam.CreateParam(model);

            model.Property = prop;

            foreach (XmlAttribute attr in node.Attributes)
            {
                prop.SetValue(attr.Name, attr.Value);
            }


            try
            {
                XmlNodeList propertiesNodes = node.FirstChild.ChildNodes;
                foreach (XmlNode nodeProp in propertiesNodes)
                {
                    prop.SetValue(nodeProp.Name, nodeProp.InnerText);
                }
            }
            catch (Exception e)
            {
            }



            factoryShape.PopulatePropertyList(prop);
            m_GridView.Tag = prop;
            Action action = factoryShape.CreateAddAction(model, m_Window);

            action.SetParam(prop);
            //
            mHostory.ExcuteAction(action);
        }