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); }
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); }
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); }
public ChangeData(ChangeListTree.ChangeType type, string key, GameData.State state) { this.Type = type; this.Key = key; this.Colour = StateColours.GetStateColor(state); }