private void bwMisc_DoWork(object sender, DoWorkEventArgs e) { //this.Invoke((MethodInvoker)delegate { Utils.Log("Init colors"); }); this.BeginInvoke((MethodInvoker) delegate { Utils.Log("Loading ITEMPID.H"); }); ItemPid.Init(); LoadParamDefines(); bwMisc.ReportProgress(50); LoadProtoManager(); bwMisc.ReportProgress(100); this.BeginInvoke((MethodInvoker) delegate { Utils.Log("Loaded game data."); }); }
public void DrawItemZones(Graphics g, string ItemDefine, bool ShowNumbers) { foreach (Zone i in Zones) { int num = ItemsInZone(i, ItemPid.GetPid(ItemDefine)); if (num != 0) { Drawing.DrawZone(g, Color.Blue, i.X, i.Y); if (ShowNumbers && num < 100) { Drawing.DrawZoneDisplay(g, Color.White, i.X, i.Y, num.ToString(), ZoneDisplayFont); } } } }
private void bwUI_DoWork(object sender, DoWorkEventArgs e) { List <Item> Items = ItemPid.GetItems(); this.BeginInvoke((MethodInvoker) delegate { AddStringsToZonePropertyControls(); foreach (Item Item in Items) { cmbShowItemZones.Items.Add(Item.Define); } cmbShowItemZones.Sorted = true; //ChangeEnableStateOfZonePropertyControls(false); }); }