예제 #1
0
        private void CommandAbout()
        {
            string description = System.Reflection.Assembly.GetExecutingAssembly().GetAttribute <System.Reflection.AssemblyDescriptionAttribute>().Description;
            string copyright   = System.Reflection.Assembly.GetExecutingAssembly().GetAttribute <System.Reflection.AssemblyCopyrightAttribute>().Copyright;

            StringBuilder aboutBuilder = new StringBuilder();

            aboutBuilder.AppendFormat("{0} - {1}\n", Program.TitleString, description);
            aboutBuilder.AppendLine();
            aboutBuilder.AppendLine(copyright);

            StringBuilder buildInfoBuilder = new StringBuilder();

            buildInfoBuilder.AppendFormat("{0} ({1}), {2}-{3}{4}", Program.TitleString, Application.ProductVersion, BuildInformation.Properties["GitBranch"], BuildInformation.Properties["LatestCommitHash"], (BuildInformation.Properties["GitPendingChanges"] ? "-dirty" : string.Empty));
            buildInfoBuilder.AppendLine();
            buildInfoBuilder.AppendFormat(System.Globalization.CultureInfo.InvariantCulture, "{0} UTC; {1} ({2}, {3} v{4})",
                                          BuildInformation.Properties["BuildDate"], BuildInformation.Properties["BuildMachineName"],
                                          BuildInformation.Properties["BuildMachineProcessorArchitecture"], BuildInformation.Properties["BuildMachineOSPlatform"], BuildInformation.Properties["BuildMachineOSVersion"]);

            GUIHelpers.ShowInformationMessage("About", string.Format("About {0}", Application.ProductName), aboutBuilder.ToString().TrimEnd('\r', '\n'), string.Empty, buildInfoBuilder.ToString(), this.Handle);
        }