mirror of
https://github.com/riegera2412/UVtools.git
synced 2026-07-11 19:12:31 +02:00
2c514fe260
* (Add) Allow chitubox, phz, pws, pw0 files convert to cws * (Add) Allow convert between cbddlp, ctb and photon * (Add) Allow convert between pws and pw0 * (Improvement) Layers can now have modified heights and independent parameters (#9) * (Improvement) UVtools now generate better gcode and detect the lack of Lift and same z position and optimize the commands * (Fix) zcodex: Wasn't reporting layer decoding progress
109 lines
3.8 KiB
C#
109 lines
3.8 KiB
C#
/*
|
|
* GNU AFFERO GENERAL PUBLIC LICENSE
|
|
* Version 3, 19 November 2007
|
|
* Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
|
* Everyone is permitted to copy and distribute verbatim copies
|
|
* of this license document, but changing it is not allowed.
|
|
*/
|
|
|
|
using System;
|
|
using System.Linq;
|
|
using System.Reflection;
|
|
using System.Windows.Forms;
|
|
using UVtools.Core;
|
|
using UVtools.Core.FileFormats;
|
|
|
|
namespace UVtools.GUI.Forms
|
|
{
|
|
partial class FrmAbout : Form
|
|
{
|
|
public FrmAbout()
|
|
{
|
|
InitializeComponent();
|
|
Text = String.Format("About {0}", AssemblyTitle);
|
|
labelProductName.Text = AssemblyProduct;
|
|
labelVersion.Text = String.Format("Version {0}", AssemblyVersion);
|
|
labelCopyright.Text = AssemblyCopyright;
|
|
labelCompanyName.Text = AssemblyCompany;
|
|
textBoxDescription.Text = AssemblyDescription;
|
|
}
|
|
|
|
#region Assembly Attribute Accessors
|
|
|
|
public static 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);
|
|
}
|
|
}
|
|
|
|
public static string AssemblyVersion => Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
|
|
|
public static string AssemblyDescription
|
|
{
|
|
get
|
|
{
|
|
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false);
|
|
if (attributes.Length == 0)
|
|
{
|
|
return "";
|
|
}
|
|
|
|
string description = ((AssemblyDescriptionAttribute) attributes[0]).Description + $"{Environment.NewLine}{Environment.NewLine}Available File Formats:";
|
|
|
|
return FileFormat.AvaliableFormats.SelectMany(fileFormat => fileFormat.FileExtensions).Aggregate(description, (current, fileExtension) => current + $"{Environment.NewLine}- {fileExtension.Description} (.{fileExtension.Extension})");
|
|
}
|
|
}
|
|
|
|
public static string AssemblyProduct
|
|
{
|
|
get
|
|
{
|
|
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), false);
|
|
if (attributes.Length == 0)
|
|
{
|
|
return "";
|
|
}
|
|
return ((AssemblyProductAttribute)attributes[0]).Product;
|
|
}
|
|
}
|
|
|
|
public static string AssemblyCopyright
|
|
{
|
|
get
|
|
{
|
|
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);
|
|
if (attributes.Length == 0)
|
|
{
|
|
return "";
|
|
}
|
|
return ((AssemblyCopyrightAttribute)attributes[0]).Copyright;
|
|
}
|
|
}
|
|
|
|
public static string AssemblyCompany
|
|
{
|
|
get
|
|
{
|
|
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false);
|
|
if (attributes.Length == 0)
|
|
{
|
|
return "";
|
|
}
|
|
return ((AssemblyCompanyAttribute)attributes[0]).Company;
|
|
}
|
|
}
|
|
#endregion
|
|
}
|
|
}
|