Esempio n. 1
0
 public void handleAbout(object sender, EventArgs a)
 {
     Gtk.AboutDialog ab = new Gtk.AboutDialog();
     ab.Authors  = CS_Info.Authors();
     ab.Version  = CS_Info.Version();
     ab.Comments = CS_Info.Info();
     ab.Website  = CS_Info.Website();
     ab.Run();
     ab.Destroy();
 }
Esempio n. 2
0
        //Event handler for the about button
        //shows the about dialog
        protected void OnAboutSelected(object sender, EventArgs e)
        {
            // Create a new About dialog
            Gtk.AboutDialog about = new Gtk.AboutDialog();

            // Change the Dialog's properties to the appropriate values.
            about.ProgramName = "Team Raspberry's Video Aggregator";
            about.Authors     = new string[] { "Michael Hendrick", "Thomas Martin", "Elizabeth Razo" };
            about.Comments    = "UHCL Senior Project Spring 2016.\nPowered by Gtk# and Guidebox.";
            about.Version     = "1.0.0";

            // Show the Dialog and pass it control
            about.Run();

            // Destroy the dialog
            about.Destroy();
        }
Esempio n. 3
0
        private void OnAbout()
        {
            var dlg = new Gtk.AboutDialog {
                TransientFor   = this,
                WindowPosition = Gtk.WindowPosition.CenterOnParent,
                Title          = "About...",
                Authors        = new string[] { "Baltasar" },
                ProgramName    = "Gtk# demo",
                Version        = "v1.0",
                Comments       = "Gtk# Demo for basic features",
                License        = "MIT License",
                Copyright      = "(c) baltasar 2015",
                Website        = "http://github.com/Baltasarq/GTKSharpDemo/"
            };

            dlg.Run();
            dlg.Destroy();
        }
Esempio n. 4
0
        private void OnAbout()
        {
            var dlg = new Gtk.AboutDialog();

            dlg.TransientFor = this;
            dlg.WindowPosition = Gtk.WindowPosition.CenterOnParent;
            dlg.Title = "About...";
            dlg.Authors = new string[]{ "Baltasar" };
            dlg.ProgramName = "Gtk# demo";
            dlg.Version     = "v1.0";
            dlg.Comments    = "Gtk# Demo for basic features";
            dlg.License     = "MIT License";
            dlg.Copyright   = "(c) baltasar 2015";
            dlg.Website     = "http://github.com/Baltasarq/GTKSharpDemo/";

            dlg.Run();
            dlg.Destroy();
        }
Esempio n. 5
0
        private void OnAbout()
        {
            var aboutDlg = new Gtk.AboutDialog();

            aboutDlg.Icon        = this.Icon;
            aboutDlg.Logo        = this.Icon;
            aboutDlg.ProgramName = AppInfo.Name;
            aboutDlg.Version     = AppInfo.Version;
            aboutDlg.Copyright   = "(c) " + AppInfo.Author;
            aboutDlg.Authors     = new string[] { AppInfo.Author };
            aboutDlg.Comments    = AppInfo.Comments;
            aboutDlg.License     = AppInfo.License;
            aboutDlg.Website     = AppInfo.Website;

            aboutDlg.Parent       = this;
            aboutDlg.TransientFor = this;
            aboutDlg.SetPosition(Gtk.WindowPosition.CenterOnParent);
            aboutDlg.Run();
            aboutDlg.Destroy();
        }
 public void handleAbout(object sender,EventArgs a)
 {
     Gtk.AboutDialog ab=new Gtk.AboutDialog();
     ab.Authors=CS_Info.Authors ();
     ab.Version=CS_Info.Version();
     ab.Comments=CS_Info.Info ();
     ab.Website=CS_Info.Website();
     ab.Run ();
     ab.Destroy ();
 }
Esempio n. 7
0
        private void About_Activated(object sender, EventArgs e)
        {
            Gtk.AboutDialog dialog = new Gtk.AboutDialog ();

            dialog.Icon = PintaCore.Resources.GetIcon ("Pinta.png");
            dialog.Version = "0.3";
            dialog.ProgramName = "Pinta";
            dialog.Website = "http://www.pinta-project.com";
            dialog.WebsiteLabel = "Visit Homepage";
            dialog.Copyright = "Copyright \xa9 2010 Jonathan Pobst";
            dialog.Authors = new string[] { "Jonathan Pobst" };
            dialog.Documenters = null;
            dialog.TranslatorCredits = null;
            dialog.Run ();
            dialog.Destroy ();
        }
        private static void OnAbout(object parameter)
        {
            // TODO: put strings in resources.
            var aboutDialog = new Gtk.AboutDialog();

            aboutDialog.Version = SingleInstanceApplication.Version;

            var entryAssembly = Assembly.GetEntryAssembly();

            var attribute = entryAssembly.GetCustomAttributes(typeof(AssemblyTitleAttribute), false).FirstOrDefault();

            if (attribute != null)
            {
                aboutDialog.ProgramName = ((AssemblyTitleAttribute)attribute).Title;
            }
            attribute = entryAssembly.GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false).FirstOrDefault();
            if (attribute != null)
            {
                aboutDialog.Copyright = ((AssemblyCopyrightAttribute)attribute).Copyright;
            }

            var metadataAttributes = entryAssembly.GetCustomAttributes(typeof(AssemblyMetadataAttribute), false).Cast <AssemblyMetadataAttribute>();

            // Too wordy.
            ////attribute = entryAssembly.GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false)[0];
            ////var description = ((AssemblyDescriptionAttribute)attribute).Description;
            var metadataAttribute = metadataAttributes.FirstOrDefault(a => a.Key == INTV.Core.Utility.ResourceHelpers.AboutKey);
            var description       = metadataAttribute == null ? string.Empty : metadataAttribute.Value;

            attribute = entryAssembly.GetCustomAttributes(typeof(AssemblyTrademarkAttribute), false).FirstOrDefault();
            var trademark = attribute == null ? string.Empty : ((AssemblyTrademarkAttribute)attribute).Trademark;

            var comments = description;

            if (string.IsNullOrEmpty(comments))
            {
                comments = trademark;
            }
            else if (!string.IsNullOrEmpty(trademark))
            {
                comments += "\n\n" + trademark;
            }
            if (!string.IsNullOrEmpty(comments))
            {
                aboutDialog.Comments = comments;
            }

            metadataAttribute   = metadataAttributes.FirstOrDefault(a => a.Key == INTV.Core.Utility.ResourceHelpers.WebsiteKey);
            aboutDialog.Website = metadataAttribute == null ? "http://www.intvfunhouse.com/intvfunhouse/" : metadataAttribute.Value;

            metadataAttribute        = metadataAttributes.FirstOrDefault(a => a.Key == INTV.Core.Utility.ResourceHelpers.WebsiteNameKey);
            aboutDialog.WebsiteLabel = metadataAttribute == null ? "INTV Funhouse" : metadataAttribute.Value;

            var authors = new List <string>();

            foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
            {
                var authorAttributes = assembly.GetCustomAttributes(typeof(AssemblyMetadataAttribute), false).Cast <AssemblyMetadataAttribute>().Where(a => a.Key == INTV.Core.Utility.ResourceHelpers.AuthorKey);
                authors.AddRange(authorAttributes.Select(a => a.Value));
            }
            var weightedAuthors = authors.GroupBy(a => a);

            aboutDialog.Authors = weightedAuthors.Select(wa => wa.Key).ToArray();

#if SCALE_DOWN
            var image = SingleInstanceApplication.SplashScreenResourceType.LoadImageResource(SingleInstanceApplication.SplashScreenResource);
            aboutDialog.Logo = image.ScaleSimple(Convert.ToInt32(image.Width * 0.75), Convert.ToInt32(image.Height * 0.75), Gdk.InterpType.Bilinear);
#else
            aboutDialog.Logo = SingleInstanceApplication.SplashScreenResourceType.LoadImageResource(SingleInstanceApplication.SplashScreenResource);
#endif
            try
            {
                // BUG: Should we rely on the file being there and trust nobody hacks it? Anyone care?
                var programDir  = SingleInstanceApplication.Instance.ProgramDirectory;
                var licensePath = System.IO.Path.Combine(programDir, "license.txt");
                aboutDialog.License = System.IO.File.ReadAllText(licensePath);
            }
            catch (Exception)
            {
            }

            var result = aboutDialog.Run();
            VisualHelpers.Close(aboutDialog);
        }
Esempio n. 9
0
        private void OnAbout()
        {
            var aboutDlg = new Gtk.AboutDialog();

            aboutDlg.Icon = this.Icon;
            aboutDlg.Logo = this.Icon;
            aboutDlg.ProgramName = AppInfo.Name;
            aboutDlg.Version = AppInfo.Version;
            aboutDlg.Copyright = "(c) " + AppInfo.Author;
            aboutDlg.Authors = new string[]{ AppInfo.Author };
            aboutDlg.Comments = AppInfo.Comments;
            aboutDlg.License = AppInfo.License;
            aboutDlg.Website = AppInfo.Website;

            aboutDlg.Parent = this;
            aboutDlg.TransientFor = this;
            aboutDlg.SetPosition( Gtk.WindowPosition.CenterOnParent );
            aboutDlg.Run();
            aboutDlg.Destroy();
        }
Esempio n. 10
0
        /// <summary>
        /// Shows the "about" info
        /// </summary>
        private void About()
        {
            var aboutDlg = new Gtk.AboutDialog();

            aboutDlg.ProgramName = AppInfo.Name;
            aboutDlg.Logo = this.Icon;
            aboutDlg.Version = AppInfo.Version;
            aboutDlg.Authors = new []{ AppInfo.Author };
            aboutDlg.Website = AppInfo.Website;
            aboutDlg.Icon = this.Icon;
            aboutDlg.License = "MIT";

            aboutDlg.TransientFor = this;
            aboutDlg.WindowPosition = Gtk.WindowPosition.CenterOnParent;
            aboutDlg.Run();
            aboutDlg.Destroy();
        }