private void CharDecodeErrorDialog(IPoderosaMainWindow window, string msg) { WarningWithDisableOption dlg = new WarningWithDisableOption(msg); dlg.ShowDialog(window.AsForm()); if (dlg.CheckedDisableOption) { GEnv.Options.CharDecodeErrorBehavior = WarningOption.Ignore; } }
private void BadCharDetected() { switch(GEnv.Options.WarningOption) { case WarningOption.StatusBar: GEnv.Frame.SetStatusBarText(_msg); break; case WarningOption.MessageBox: { WarningWithDisableOption dlg = new WarningWithDisableOption(_msg); if(GUtil.ShowModalDialog(GEnv.Frame, dlg)==DialogResult.OK && dlg.CheckedDisableOption) GEnv.Options.WarningOption = WarningOption.Ignore; break; } } }