Esempio n. 1
0
        private void RTC_Form_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (!RTC_Core.isStandalone && e.CloseReason != CloseReason.FormOwnerClosing)
            {
                e.Cancel = true;
                this.Hide();
                return;
            }
            else if (RTC_Core.isStandalone)
            {
                if (RTC_StockpileManager.unsavedEdits && !RTC_Core.isClosing && MessageBox.Show("You have unsaved edits in the Glitch Harvester Stockpile. \n\n Are you sure you want to close RTC without saving?", "Unsaved edits in Stockpile", MessageBoxButtons.YesNo) == DialogResult.No)
                {
                    e.Cancel = true;
                    return;
                }

                if (RTC_Core.RemoteRTC_SupposedToBeConnected)
                {
                    RTC_Core.SendCommandToBizhawk(new RTC_Command(CommandType.REMOTE_EVENT_CLOSEBIZHAWK));
                    Thread.Sleep(1000);
                }

                RTC_Core.CloseAllRtcForms();
            }
        }
Esempio n. 2
0
        public static void MAINFORM_CLOSING()
        {
            if (DisableRTC)
            {
                return;
            }

            RTC_Core.CloseAllRtcForms();
        }