Esempio n. 1
0
        public void Load(IPersistStream stream)
        {
            _type = (NodeType)stream.Load("Type", (int)NodeType.query);

            if (_type == NodeType.query)
            {
                base.Text = (string)stream.Load("Name", "");

                _table = stream.Load("PromptDefs", null, new QueryThemePromptDef()) as QueryThemePromptDef;
                if (_table == null)
                {
                    _table = new QueryThemePromptDef();
                }

                base.ImageIndex = base.SelectedImageIndex = 0;
                while (true)
                {
                    QueryThemeTable tabNode = stream.Load("Table", null, new QueryThemeTable()) as QueryThemeTable;
                    if (tabNode == null)
                    {
                        break;
                    }

                    Nodes.Add(tabNode);
                }
            }
            else
            {
                base.ImageIndex = base.SelectedImageIndex = 1;
            }
        }
Esempio n. 2
0
        public QueryTheme(string name)
        {
            base.Text       = name;
            base.ImageIndex = base.SelectedImageIndex = 0;
            _type           = NodeType.query;

            _table = new QueryThemePromptDef();
        }