public void AddStat(Stat stat, int amount, StatSource source) { foreach (UserItemStat addedStat in AddedStats) { if (addedStat.Stat != stat || addedStat.StatSource != source) { continue; } addedStat.Amount += amount; return; } if (amount == 0) { return; } UserItemStat newStat = SEnvir.UserItemStatsList.CreateNewObject(); newStat.StatSource = source; newStat.Stat = stat; newStat.Amount = amount; newStat.Item = this; }
public wfCFSMonitor(CFSDriveConfig drive) { InitializeComponent(); theDrive = drive; myStats = new StatSource(new CFSStats()); this.statBindingSource.DataSource = myStats; this.lbDrive.Text = "[" + drive.Name + "] on "+ drive.MountPoint.ToUpper() ; run(); }