Loading CountDownList/AssemblyInfo.cs +153 −0 Original line number Diff line number Diff line Loading @@ -32,3 +32,156 @@ using System.Windows; // 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值, // 方法是按如下所示使用“*”: [assembly: AssemblyVersion("1.0.0.*")] /// <summary> /// 使用此类前需要把[assembly: ComVisible(false)]改为true /// </summary> class AssemblyInformation { #region 程序集属性访问器 /// <summary> /// 标题 /// </summary> public string AssemblyTitle { get { object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), false); if (attributes.Length > 0) { AssemblyTitleAttribute titleAttribute = (AssemblyTitleAttribute)attributes[0]; if (titleAttribute.Title != "") { return titleAttribute.Title; } } return System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase); } } /// <summary> /// 版本 /// </summary> public string AssemblyVersion { get { return Assembly.GetExecutingAssembly().GetName().Version.ToString(); } } /// <summary> /// 说明 /// </summary> public string AssemblyDescription { get { object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false); if (attributes.Length == 0) { return ""; } return ((AssemblyDescriptionAttribute)attributes[0]).Description; } } /// <summary> /// 产品 /// </summary> public string AssemblyProduct { get { object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), false); if (attributes.Length == 0) { return ""; } return ((AssemblyProductAttribute)attributes[0]).Product; } } /// <summary> /// 版权 /// </summary> public string AssemblyCopyright { get { object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false); if (attributes.Length == 0) { return ""; } return ((AssemblyCopyrightAttribute)attributes[0]).Copyright; } } /// <summary> /// 公司 /// </summary> public string AssemblyCompany { get { object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false); if (attributes.Length == 0) { return ""; } return ((AssemblyCompanyAttribute)attributes[0]).Company; } } /// <summary> /// 配置 /// </summary> public string AssemblyConfiguration { get { object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyConfigurationAttribute), false); if (attributes.Length == 0) { return ""; } return ((AssemblyConfigurationAttribute)attributes[0]).Configuration; } } /// <summary> /// 商标 /// </summary> public string AssemblyTrademark { get { object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTrademarkAttribute), false); if (attributes.Length == 0) { return ""; } return ((AssemblyTrademarkAttribute)attributes[0]).Trademark; } } /// <summary> /// 文化 /// </summary> public string AssemblyCulture { get { object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCultureAttribute), false); if (attributes.Length == 0) { return ""; } return ((AssemblyCultureAttribute)attributes[0]).Culture; } } #endregion } CountDownList/MainWindow.xaml +1 −1 Original line number Diff line number Diff line Loading @@ -158,7 +158,7 @@ </StackPanel> </Expander> <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="#7FF7F7F7" Margin="0,48,0,0"> <TextBlock x:Name="Version" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="#7FF7F7F7" Margin="0,48,0,0"> Count Down List V1.0 </TextBlock> <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="#7FF7F7F7" Margin="0,0,0,48"> Loading CountDownList/MainWindow.xaml.cs +3 −0 Original line number Diff line number Diff line using CountDownList.Class; using CountDownList.Controls; using CountDownList.UI.Window; using Microsoft.VisualBasic.ApplicationServices; using System.Net.Sockets; using System.Security.Cryptography.Xml; using System.Text; Loading Loading @@ -64,6 +65,8 @@ namespace CountDownList border1.CornerRadius = new(8, 8, 0, 0); Height = 500; } Version.Text = $"CountDownList V{new AssemblyInformation().AssemblyVersion}"; } private void Border_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) Loading Loading
CountDownList/AssemblyInfo.cs +153 −0 Original line number Diff line number Diff line Loading @@ -32,3 +32,156 @@ using System.Windows; // 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值, // 方法是按如下所示使用“*”: [assembly: AssemblyVersion("1.0.0.*")] /// <summary> /// 使用此类前需要把[assembly: ComVisible(false)]改为true /// </summary> class AssemblyInformation { #region 程序集属性访问器 /// <summary> /// 标题 /// </summary> public string AssemblyTitle { get { object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), false); if (attributes.Length > 0) { AssemblyTitleAttribute titleAttribute = (AssemblyTitleAttribute)attributes[0]; if (titleAttribute.Title != "") { return titleAttribute.Title; } } return System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase); } } /// <summary> /// 版本 /// </summary> public string AssemblyVersion { get { return Assembly.GetExecutingAssembly().GetName().Version.ToString(); } } /// <summary> /// 说明 /// </summary> public string AssemblyDescription { get { object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false); if (attributes.Length == 0) { return ""; } return ((AssemblyDescriptionAttribute)attributes[0]).Description; } } /// <summary> /// 产品 /// </summary> public string AssemblyProduct { get { object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), false); if (attributes.Length == 0) { return ""; } return ((AssemblyProductAttribute)attributes[0]).Product; } } /// <summary> /// 版权 /// </summary> public string AssemblyCopyright { get { object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false); if (attributes.Length == 0) { return ""; } return ((AssemblyCopyrightAttribute)attributes[0]).Copyright; } } /// <summary> /// 公司 /// </summary> public string AssemblyCompany { get { object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false); if (attributes.Length == 0) { return ""; } return ((AssemblyCompanyAttribute)attributes[0]).Company; } } /// <summary> /// 配置 /// </summary> public string AssemblyConfiguration { get { object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyConfigurationAttribute), false); if (attributes.Length == 0) { return ""; } return ((AssemblyConfigurationAttribute)attributes[0]).Configuration; } } /// <summary> /// 商标 /// </summary> public string AssemblyTrademark { get { object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTrademarkAttribute), false); if (attributes.Length == 0) { return ""; } return ((AssemblyTrademarkAttribute)attributes[0]).Trademark; } } /// <summary> /// 文化 /// </summary> public string AssemblyCulture { get { object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCultureAttribute), false); if (attributes.Length == 0) { return ""; } return ((AssemblyCultureAttribute)attributes[0]).Culture; } } #endregion }
CountDownList/MainWindow.xaml +1 −1 Original line number Diff line number Diff line Loading @@ -158,7 +158,7 @@ </StackPanel> </Expander> <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="#7FF7F7F7" Margin="0,48,0,0"> <TextBlock x:Name="Version" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="#7FF7F7F7" Margin="0,48,0,0"> Count Down List V1.0 </TextBlock> <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="#7FF7F7F7" Margin="0,0,0,48"> Loading
CountDownList/MainWindow.xaml.cs +3 −0 Original line number Diff line number Diff line using CountDownList.Class; using CountDownList.Controls; using CountDownList.UI.Window; using Microsoft.VisualBasic.ApplicationServices; using System.Net.Sockets; using System.Security.Cryptography.Xml; using System.Text; Loading Loading @@ -64,6 +65,8 @@ namespace CountDownList border1.CornerRadius = new(8, 8, 0, 0); Height = 500; } Version.Text = $"CountDownList V{new AssemblyInformation().AssemblyVersion}"; } private void Border_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) Loading