Exemplo n.º 1
0
        private void UpdateSelectedTextGroupInfoNode()
        {
            var           n  = AdvTree1.SelectedNode;
            TextGroupInfo gi = (TextGroupInfo)n?.Tag;

            if (gi is object)
            {
                n.Text = gi.Name;
            }
        }
Exemplo n.º 2
0
        private Node AddTextGroupInfoNode(TextGroupInfo tg)
        {
            var n = new Node()
            {
                Text = tg.Name,
                Tag  = tg
            };

            if (tg.IsTextTableGroupInfo())
            {
                nTableGroups.Nodes.Add(n);
            }
            else if (tg.IsTextArrayGroupInfo())
            {
                nArrayGroups.Nodes.Add(n);
            }

            return(n);
        }
Exemplo n.º 3
0
        private void RemoveSelectedGroupInfo()
        {
            var           selNode = AdvTree1.SelectedNode;
            TextGroupInfo group   = (TextGroupInfo)selNode?.Tag;

            if (group is object)
            {
                if (group is TextTableGroupInfo)
                {
                    nTableGroups.Nodes.Remove(selNode);
                    ProfileInfo.TextTableGroups.Remove((TextTableGroupInfo)group);
                }
                else if (group is TextArrayGroupInfo)
                {
                    nArrayGroups.Nodes.Remove(selNode);
                    ProfileInfo.TextArrayGroups.Remove((TextArrayGroupInfo)group);
                }
            }
        }
Exemplo n.º 4
0
        private void LoadTextArrayItems(TextGroupInfo table)
        {
            ItemListBox1.SuspendLayout();
            ItemListBox1.Items.Clear();
            if (table is TextArrayGroupInfo)
            {
                foreach (TextArrayItemInfo item in ((TextArrayGroupInfo)table).Texts)
                {
                    AddArrayItemListItem(item);
                }
                AdvPropertyGrid1.Dock = DockStyle.Top;
                Panel3.Visible        = true;
            }
            else
            {
                Panel3.Visible        = false;
                AdvPropertyGrid1.Dock = DockStyle.Fill;
            }

            ItemListBox1.ResumeLayout();
            ItemListBox1.Refresh();
        }
Exemplo n.º 5
0
 public TextGroup(TextGroupInfo groupInfo)
 {
     TextGroupInfo = groupInfo;
 }
Exemplo n.º 6
0
 public TextItem(byte[] bytes, TextGroupInfo groupInfo)
 {
     TextGroupInfo = groupInfo;
     Data          = bytes;
 }
Exemplo n.º 7
0
 private void LoadGroup(TextGroupInfo group)
 {
     LoadPropertiesToEdit(group);
 }
Exemplo n.º 8
0
        private void AddGroupInfo(TextGroupInfo group)
        {
            var n = AddTextGroupInfoNode(group);

            AdvTree1.SelectedNode = n;
        }
Exemplo n.º 9
0
 public static bool IsTextTableGroupInfo(this TextGroupInfo tg)
 {
     return(tg is TextTableGroupInfo);
 }
Exemplo n.º 10
0
 public static bool IsTextArrayGroupInfo(this TextGroupInfo tg)
 {
     return(tg is TextArrayGroupInfo);
 }