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 OnAbout(object sender, System.EventArgs e) { AboutDialog ad = new AboutDialog(); ad.Present(); }