private void FormMain_Load(object sender, EventArgs e) { // Show the warning box at least once ! if (!Properties.Settings.Default.LegalAcknowledged) { WarningBox wb = new WarningBox(); wb.ShowDialog(); } UserManagement.UpdateTitle(this); }
public Error Call(string exception = null) { if (WarningBox != null) { WarningBox.ErrorException = exception; foreach (Window item in Application.Current.Windows) { if (item.IsActive) { WarningBox.Owner = item; break; } } WarningBox.ShowDialog(); } return(this); }
/// <summary> /// Emit a warning about the user actions which may need to be performed. /// </summary> /// <returns>True if the operation should be performed, false if it is cancelled.</returns> /// <param name="debugging">If true warn about debugging, else warn about profiling.</param> /// <param name="doNotRepeat">Set to true of the warning should not be repeated.</param> internal bool EmitWarning(bool debugging, out bool doNotRepeat) { string warning; if (debugging) { warning = "For a better debugging experience please consider doing the folowing actions:\n"; warning += "- set `Tool > Options... > Debugging > General > Enable Just My Code' to `false' in Visual Studio\n"; } else { warning = "Profiling is only supported on 64-bit machines with Visual Studio installed.\n" + "The vertex will now be executed and profiled locally. This may take a significant amount of time.\n" + "When the profiling is completed the result will be displayed in a new Visual Studio instance."; } WarningBox box = new WarningBox(warning); box.ShowDialog(); doNotRepeat = box.DoNotShowAgain; return(!box.Cancelled); }