public PopUp(UpdatingWindow updatingFormToUse) { clickedYes = false; clickedNo = false; InitializeComponent(); HandleDestroyed += (sender, args) => { if (!clickedYes && !clickedNo) { IntPtr mbWnd = FindWindow(null, "Updating Core..."); if (mbWnd != IntPtr.Zero) { SendMessage(mbWnd, WM_CLOSE, IntPtr.Zero, IntPtr.Zero); } } else if (clickedYes) { DllDownloader coreDownloader = new DllDownloader { currentForm = updatingFormToUse }; coreDownloader.DownloadLatestDLL("https://github.com/DanThePman/Hearthstone/blob/master/Download/PlaceContentInThe_SmartBot_Folder/HearthstoneMulligan.dll?raw=true", Environment.CurrentDirectory + @"\HearthstoneMulliganNew.dll"); } }; }
public PopUp(UpdatingWindow updatingFormToUse) { clickedYes = false; clickedNo = false; InitializeComponent(); HandleDestroyed += (sender, args) => { if (!clickedYes && !clickedNo) { IntPtr mbWnd = FindWindow(null, "Updating Core..."); if (mbWnd != IntPtr.Zero) SendMessage(mbWnd, WM_CLOSE, IntPtr.Zero, IntPtr.Zero); } else if (clickedYes) { DllDownloader coreDownloader = new DllDownloader { currentForm = updatingFormToUse }; coreDownloader.DownloadLatestDLL("https://github.com/DanThePman/Hearthstone/blob/master/Download/PlaceContentInThe_SmartBot_Folder/HearthstoneMulligan.dll?raw=true", Environment.CurrentDirectory + @"\HearthstoneMulliganNew.dll"); } }; }