public RandomSuffixEditor(Item item) { this.item = item; InitializeComponent(); #if !SILVERLIGHT this.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterOwner; this.WindowState = System.Windows.WindowState.Normal; #endif data = new List <SuffixAvailability>(); foreach (var s in RandomSuffix.GetAllSuffixes()) { SuffixAvailability sa; data.Add(sa = new SuffixAvailability() { Id = s, Suffix = RandomSuffix.GetSuffix(s), Available = item.AllowedRandomSuffixes != null && item.AllowedRandomSuffixes.Contains(s) }); RandomSuffix.AccumulateStats(sa.Stats = new Stats(), item, s); } SuffixGrid.ItemsSource = data; }
public RandomSuffixEditor(Item item) { this.item = item; InitializeComponent(); #if !SILVERLIGHT this.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterOwner; this.WindowState = System.Windows.WindowState.Normal; #endif data = new List<SuffixAvailability>(); foreach (var s in RandomSuffix.GetAllSuffixes()) { SuffixAvailability sa; data.Add(sa = new SuffixAvailability() { Id = s, Suffix = RandomSuffix.GetSuffix(s), Available = item.AllowedRandomSuffixes != null && item.AllowedRandomSuffixes.Contains(s) }); RandomSuffix.AccumulateStats(sa.Stats = new Stats(), item, s); } SuffixGrid.ItemsSource = data; }