private static void Baro_BGW_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { if (e.Result != null) { object[] Results = (object[])e.Result; if (Form_OverlayBaro._FormReference != null) { Form_OverlayBaro._FormReference.ChangeData(Results[0].ToString(), (Point)Results[1]); } else { var holder = new Form_OverlayBaro(Results[0].ToString(), (Point)Results[1]); holder.Show(); } } else { if (Form_OverlayBaro._FormReference != null) { Form_OverlayBaro._FormReference.Close(); } GC.Collect(); } Form_Main._FormReference.BaroScan_Timer.Start(); }
public Form_OverlayBaro(string FoundText, Point BaroWindowPoint) { InitializeComponent(); PlatinumLabelAvg.Text = "Avg: " + Module_Data.PrimeItemsData[FoundText].Platinum_Average; PlatinumLabelMin.Text = "Min: " + Module_Data.PrimeItemsData[FoundText].Platinum_Min; PlatinumLabelMax.Text = "Max: " + Module_Data.PrimeItemsData[FoundText].Platinum_Max; PlatinumPic.Text = Module_Data.PrimeItemsData[FoundText].Market_Count; VaultSymbol.Visible = Module_Data.PrimeItemsData[FoundText].isVaulted; Location = new Point(BaroWindowPoint.X - 175, BaroWindowPoint.Y - 2); _FormReference = this; }
private void Form_OverlayBaro_FormClosed(object sender, FormClosedEventArgs e) { _FormReference = null; }