public void Dispose(bool disposing) { if (!this.disposed) { if (disposing) { _window.Dispose(); } } this.disposed = true; }
public override void CommandClick(string controlID) { if (controlID == ABOUT_AGS_COMMAND) { AboutDialog dialog = new AboutDialog(); dialog.ShowDialog(); dialog.Dispose(); } else if (controlID == VISIT_AGS_WEBSITE) { LaunchBrowserAtAGSWebsite(); } else if (controlID == VISIT_AGS_FORUMS) { LaunchBrowserAtAGSForums(); } else if (controlID == CHECK_FOR_UPDATES) { CheckForUpdates(); } else if (!File.Exists(_helpFileName)) { _guiController.ShowMessage("The help file '" + _helpFileName + "' is missing. You may need to reinstall AGS.", MessageBoxIcon.Warning); } else if (controlID == LAUNCH_HELP_COMMAND) { string keyword = string.Empty; if (_guiController.ActivePane != null) { keyword = _guiController.ActivePane.Control.HelpKeyword; } LaunchHelp(_helpFileName, HelpNavigator.KeywordIndex, keyword); } else if (controlID == HELP_CONTENTS_COMMAND) { Help.ShowHelp(GetHelpParentWindow(), _helpFileName); } else if (controlID == HELP_INDEX_COMMAND) { Help.ShowHelpIndex(GetHelpParentWindow(), _helpFileName); } else if (controlID == CRASH_EDITOR_COMMAND) { throw new AGSEditorException("Crash test"); } }
public override void CommandClick(string controlID) { if (controlID == ABOUT_AGS_COMMAND) { AboutDialog dialog = new AboutDialog(); dialog.ShowDialog(); dialog.Dispose(); } else if (controlID == VISIT_AGS_WEBSITE) { LaunchBrowserAtAGSWebsite(); } else if (controlID == VISIT_AGS_FORUMS) { LaunchBrowserAtAGSForums(); } else if (controlID == CHECK_FOR_UPDATES) { CheckForUpdates(); } else if (!File.Exists(_helpFileName)) { _guiController.ShowMessage("The help file '" + _helpFileName + "' is missing. You may need to reinstall AGS.", MessageBoxIcon.Warning); } else if (controlID == LAUNCH_HELP_COMMAND) { string keyword = string.Empty; if (_guiController.ActivePane != null) { keyword = _guiController.ActivePane.Control.HelpKeyword; } LaunchHelp(_helpFileName, HelpNavigator.KeywordIndex, keyword); } else if (controlID == HELP_CONTENTS_COMMAND) { Help.ShowHelp(GetHelpParentWindow(), _helpFileName); } else if (controlID == HELP_INDEX_COMMAND) { Help.ShowHelpIndex(GetHelpParentWindow(), _helpFileName); } else if (controlID == CRASH_EDITOR_COMMAND) { throw new AGSEditorException("Crash test"); } }
/// <summary> /// Shows about window. /// </summary> public static void Show() { AboutDialog about = new AboutDialog(); Assembly asm = Assembly.GetExecutingAssembly(); Pixbuf icon = null; try { icon = IconTheme.Default.LoadIcon("glippy", 128, Gtk.IconLookupFlags.GenericFallback); } catch (System.Exception ex) { Core.Tools.PrintInfo(ex, typeof(AboutWindow)); } about.ProgramName = Name; about.Version = Core.EnvironmentVariables.Version; about.Comments = Description; about.Copyright = (asm.GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false)[0] as AssemblyCopyrightAttribute).Copyright; about.Website = "https://launchpad.net/glippy"; about.Authors = authors; about.Artists = artists; about.License = license; about.TranslatorCredits = translators; about.Icon = icon; about.Logo = IconTheme.Default.LoadIcon("glippy", 48, Gtk.IconLookupFlags.GenericFallback); about.Run(); if (icon != null) { icon.Dispose(); } if (about.Logo != null) { about.Logo.Dispose(); } about.Destroy(); about.Dispose(); }
private void aboutMenuItem_Click(object sender, System.EventArgs e) { AboutDialog aboutDialog = new AboutDialog(); aboutDialog.ShowDialog(this); aboutDialog.Dispose(); }
public override void CommandClick(string controlID) { if (controlID == CRASH_EDITOR_COMMAND) { throw new AGSEditorException("Crash test"); } else if (controlID == ABOUT_AGS_COMMAND) { AboutDialog dialog = new AboutDialog(); dialog.ShowDialog(); dialog.Dispose(); return; } else if (controlID == VISIT_AGS_WEBSITE) { LaunchBrowserAtAGSWebsite(); return; } else if (controlID == VISIT_AGS_FORUMS) { LaunchBrowserAtAGSForums(); return; } else if (controlID == CHECK_FOR_UPDATES) { CheckForUpdates(); return; } else if (!File.Exists(_helpFileName)) { _guiController.ShowMessage("The help file '" + _helpFileName + "' is missing. You may need to reinstall AGS.", MessageBoxIcon.Warning); return; } else if (Utils.AlternateStreams.GetZoneIdentifier(_helpFileName) > Utils.AlternateStreams.URLZONE_LOCAL_MACHINE) { if (_guiController.ShowQuestion("The help file '" + _helpFileName + "' has a restrictive Zone Identifier which needs to be removed." + Environment.NewLine + Environment.NewLine + "Do you want to try unblocking this file?") == DialogResult.Yes) { if (Utils.AlternateStreams.DeleteZoneIdentifier(_helpFileName)) { _guiController.ShowMessage("The help file was unblocked successfully.", MessageBoxIcon.Warning); } else { _guiController.ShowMessage("The help file couldn't be unblocked. Please try running the AGS editor using 'Run as administrator' and try to unblock the file again.", MessageBoxIcon.Warning); return; } } else { return; } } if (controlID == LAUNCH_HELP_COMMAND) { string keyword = string.Empty; if (_guiController.ActivePane != null) { keyword = _guiController.ActivePane.Control.HelpKeyword; } LaunchHelp(_helpFileName, HelpNavigator.KeywordIndex, keyword); } else if (controlID == HELP_CONTENTS_COMMAND) { Help.ShowHelp(GetHelpParentWindow(), _helpFileName); AdjustHelpWindowSize(); } else if (controlID == HELP_INDEX_COMMAND) { Help.ShowHelpIndex(GetHelpParentWindow(), _helpFileName); AdjustHelpWindowSize(); } }
private void _primaryWindowMenuItemAbout_Activated(object o, EventArgs e) { var abouticon = new Pixbuf(Assembly.GetExecutingAssembly().GetManifestResourceStream("amonguscapture_gtk.icon.ico")); string version = String.Empty; string master = String.Empty; string license = String.Empty; List <String> contributorlist = new List <string>(); using (Stream stream = Assembly.GetExecutingAssembly() .GetManifestResourceStream("amonguscapture_gtk.version.txt")) if (stream == null) { version = "Unknown"; } else { using (StreamReader sreader = new StreamReader(stream)) { version = sreader.ReadToEnd(); } } using (Stream stream = Assembly.GetExecutingAssembly() .GetManifestResourceStream("amonguscapture_gtk.master.txt")) { // Contains the original tag/hash from the source build. using (StreamReader sreader = new StreamReader(stream)) { master = sreader.ReadToEnd(); } } using (Stream stream = Assembly.GetExecutingAssembly() .GetManifestResourceStream("amonguscapture_gtk.contributors.txt")) { using (StreamReader reader = new StreamReader(stream)) { string contrib; while ((contrib = reader.ReadLine()) != null) { contributorlist.Add(contrib); } } } AboutDialog about = new AboutDialog() { Name = "_amonguscaptureGtkAboutDialog", ProgramName = "Among Us Capture GTK", LicenseType = License.MitX11, Icon = abouticon, Version = version, Authors = contributorlist.ToArray(), Comments = "Capture of the local Among Us executable state, cross-platform rewrite in GTK." + $"\n\nBased on amonguscapture {master}", Website = "https://github.com/TauAkiou/amonguscapture-gtk", Logo = abouticon }; about.Present(); about.Run(); // Make sure the About dialog box is cleaned up. about.Dispose(); }
protected virtual void AboutActivatedEvent(object sender, System.EventArgs e) { AboutDialog AboutBox = new AboutDialog(); AboutBox.ProgramName = "GtkRegexNet"; AboutBox.Copyright = "Copyright (c) 2011\nAll rights reserved."; AboutBox.License = @"Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Warrent Team nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. * This software is free for non-commercial use. You may not use this software, in whole or in part, in support of any commercial product without the express consent of the author. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ""AS IS"" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE WARRENT TEAM BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."; AboutBox.Authors = new string[] { "Marc-Andre Ferland - Madrang" }; AboutBox.Website = @"http://sites.google.com/site/warrentteam/"; AboutBox.Run(); AboutBox.Hide(); AboutBox.Dispose(); }
public override void CommandClick(string controlID) { if (controlID == CRASH_EDITOR_COMMAND) { throw new AGSEditorException("Crash test"); } else if (controlID == ABOUT_AGS_COMMAND) { AboutDialog dialog = new AboutDialog(); dialog.ShowDialog(); dialog.Dispose(); return; } else if (controlID == VISIT_AGS_WEBSITE) { LaunchBrowserAtAGSWebsite(); return; } else if (controlID == VISIT_AGS_FORUMS) { LaunchBrowserAtAGSForums(); return; } else if (controlID == CHECK_FOR_UPDATES) { CheckForUpdates(); return; } else if (!File.Exists(_helpFileName)) { _guiController.ShowMessage("The help file '" + _helpFileName + "' is missing. You may need to reinstall AGS.", MessageBoxIcon.Warning); return; } else if (Utils.AlternateStreams.GetZoneIdentifier(_helpFileName) > Utils.AlternateStreams.URLZONE_LOCAL_MACHINE) { if (_guiController.ShowQuestion("The help file '" + _helpFileName + "' has a restrictive Zone Identifier which needs to be removed." + Environment.NewLine + Environment.NewLine + "Do you want to try unblocking this file?") == DialogResult.Yes) { if (Utils.AlternateStreams.DeleteZoneIdentifier(_helpFileName)) { _guiController.ShowMessage("The help file was unblocked successfully.", MessageBoxIcon.Warning); } else { _guiController.ShowMessage("The help file couldn't be unblocked. Please try running the AGS editor using 'Run as administrator' and try to unblock the file again.", MessageBoxIcon.Warning); return; } } else { return; } } if (controlID == LAUNCH_HELP_COMMAND) { string keyword = string.Empty; if (_guiController.ActivePane != null) { keyword = _guiController.ActivePane.Control.HelpKeyword; } LaunchHelp(_helpFileName, HelpNavigator.KeywordIndex, keyword); } else if (controlID == HELP_CONTENTS_COMMAND) { Help.ShowHelp(GetHelpParentWindow(), _helpFileName); AdjustHelpWindowSize(); } else if (controlID == HELP_INDEX_COMMAND) { Help.ShowHelpIndex(GetHelpParentWindow(), _helpFileName); AdjustHelpWindowSize(); } }