Esempio n. 1
0
 public ChangeData(ChangeListTree.ChangeType type, object oldVal, object newVal, GameData.State state)
 {
     this.Type     = type;
     this.OldValue = oldVal;
     this.NewValue = newVal;
     this.Colour   = StateColours.GetStateColor(state);
 }
Esempio n. 2
0
        private ListViewItem RetrieveVirtualItem(int index)
        {
            if (this.itemCache != null && index >= this.cacheOffset && index < this.cacheOffset + (int)this.itemCache.Length)
            {
                return(this.itemCache[index - this.cacheOffset]);
            }
            if (this.mappedNodes[index] is ChangeListTree.RootNode)
            {
                GameData.Item item         = (this.mappedNodes[index] as ChangeListTree.RootNode).Item;
                ListViewItem  listViewItem = new ListViewItem(item.Name);
                ListViewItem.ListViewSubItemCollection subItems = listViewItem.SubItems;
                itemType _itemType = item.type;
                subItems.Add(_itemType.ToString(), listViewItem.ForeColor, listViewItem.BackColor, listViewItem.Font);
                listViewItem.SubItems.Add("");
                listViewItem.Checked   = this.mappedNodes[index].Checked;
                listViewItem.ForeColor = StateColours.GetStateColor(item.getState());
                listViewItem.Tag       = this.mappedNodes[index];
                return(listViewItem);
            }
            if (!(this.mappedNodes[index] is ChangeListTree.ChangeData))
            {
                return(null);
            }
            ChangeListTree.ChangeData changeDatum = this.mappedNodes[index] as ChangeListTree.ChangeData;
            ListViewItem @checked = new ListViewItem(changeDatum.Text ?? changeDatum.Key);

            ListViewItem.ListViewSubItemCollection listViewSubItemCollections = @checked.SubItems;
            ChangeListTree.ChangeType type = changeDatum.Type;
            listViewSubItemCollections.Add(type.ToString(), @checked.ForeColor, @checked.BackColor, @checked.Font);
            @checked.SubItems.Add(changeDatum.ToString(), @checked.ForeColor, @checked.BackColor, @checked.Font);
            @checked.Checked   = changeDatum.Checked;
            @checked.ForeColor = changeDatum.Colour;
            @checked.Tag       = changeDatum;
            return(@checked);
        }
Esempio n. 3
0
 public ChangeData(ChangeListTree.ChangeType type, string section, string key, object oldVal, object newVal, GameData.State state)
 {
     this.Type     = type;
     this.OldValue = oldVal;
     this.NewValue = newVal;
     this.Key      = key;
     this.Section  = section;
     this.Colour   = StateColours.GetStateColor(state);
 }
Esempio n. 4
0
 public ChangeData(ChangeListTree.ChangeType type, string key, GameData.State state)
 {
     this.Type   = type;
     this.Key    = key;
     this.Colour = StateColours.GetStateColor(state);
 }