コード例 #1
0
ファイル: sGraphicWidget.cs プロジェクト: technic/e2skinner2
        //protected sAttributeWidget pAttr;


        public sGraphicWidget(sAttributeWidget attr)
            : base(attr)
        {
            pAttr = attr;
        }
コード例 #2
0
ファイル: fMain.cs プロジェクト: Koloss78/e2skinner2
        private void refresh()
        {
            refreshEditor();

            propertyGrid1.SelectedObject = null;

            TreeNode selectedNode = treeView1.SelectedNode;
            if (selectedNode != null)
            {
                int hash = selectedNode.GetHashCode();
                XmlNode node = pXmlHandler.getXmlNode(hash);
                {
                    //Get Screen Node
                    XmlNode screenNode = node;
                    //As we could be selecting a sub Element, walk up
                    while (screenNode != null && screenNode.Name != "screen")
                    {
                        hash = pXmlHandler.XmlGetParentHandle(hash);
                        screenNode = pXmlHandler.getXmlNode(hash);
                    }

                    pDesigner.clear();

                    if (screenNode != null)
                    {
                        //Draw Screen and its Elements

                        if (cProperties.getPropertyBool("enable_backdrop"))
                            pDesigner.drawBackground();

                        sAttribute subattr = null;
                        {
                            sAttribute attr = new sAttributeScreen(screenNode);
                            if (screenNode.Name == "screen")
                            {
                                //sAttribute subattr = new sAttributeScreen(node);
                                propertyGrid1.SelectedObject = attr;
                            }
                            pDesigner.draw(attr);

                            XmlNode[] nodes = pXmlHandler.XmlGetChildNodes(hash);

                            if (nodes.Length > 0 && screenNode != node)
                                propertyGrid1.SelectedObject = null;

                            foreach (XmlNode tmpnode in nodes)
                            {
                                 if (tmpnode.Name == "eLabel")
                                {
                                    subattr = new sAttributeLabel(attr, tmpnode);
                                    pDesigner.draw(subattr);
                                }
                                else if (tmpnode.Name == "ePixmap")
                                {
                                    subattr = new sAttributePixmap(attr, tmpnode);
                                    pDesigner.draw(subattr);
                                }
                                else if (tmpnode.Name == "widget")
                                {
                                    subattr = new sAttributeWidget(attr, tmpnode);
                                    pDesigner.draw(subattr);
                                }

                                 if (tmpnode == node)
                                 {
                                     propertyGrid1.SelectedObject = subattr;
                                     if (cProperties.getPropertyBool("fading"))
                                         pDesigner.drawFog((int)subattr.pAbsolutX, (int)subattr.pAbsolutY, (int)subattr.pWidth, (int)subattr.pHeight);
                                 }
                            }
                        }
                          
                        pDesigner.drawFrame();
                    }

                    pDesigner.sort();
                    pictureBox1.Invalidate();
                }
            }
        }
コード例 #3
0
ファイル: sGraphicWidget.cs プロジェクト: Koloss78/e2skinner2
        //protected sAttributeWidget pAttr;
        

        public sGraphicWidget(sAttributeWidget attr)
            : base(attr)
        {
            pAttr = attr;
        }