Add offline mode prompt

This commit is contained in:
Fenopy
2022-09-13 09:32:40 -05:00
parent 42aba1e8e3
commit cd0feb4fd5

View File

@@ -1903,14 +1903,22 @@ without him none of this would be possible
if (quotaTries > remotesList.Items.Count)
{
ShowError_QuotaExceeded();
DialogResult om = MessageBox.Show("Relaunch Rookie in Offline Mode?", "Offline Mode?", MessageBoxButtons.YesNo);
if (om == DialogResult.Yes) {
Process pr = new Process();
pr.StartInfo.WorkingDirectory = Application.StartupPath;
pr.StartInfo.FileName = System.AppDomain.CurrentDomain.FriendlyName;
pr.StartInfo.Arguments = "--offline";
pr.Start();
Process.GetCurrentProcess().Kill();
}
if (System.Windows.Forms.Application.MessageLoop)
{
System.Windows.Forms.Application.Exit();
}
else
{
System.Environment.Exit(1);
Process.GetCurrentProcess().Kill();
}
}
if (remotesList.SelectedIndex + 1 == remotesList.Items.Count)
{