1
0
mirror of https://github.com/chylex/Code-Statistics.git synced 2025-06-13 05:34:04 +02:00

Add a WIP About screen

This commit is contained in:
chylex 2016-03-04 01:21:20 +01:00
parent b1f798399d
commit fe53ff4fee
9 changed files with 109 additions and 0 deletions

View File

@ -63,6 +63,12 @@
<Compile Include="Collections\CharacterRangeSet.cs" />
<Compile Include="Collections\TopElementList.cs" />
<Compile Include="Data\Lang.cs" />
<Compile Include="Forms\AboutForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\AboutForm.Designer.cs">
<DependentUpon>AboutForm.cs</DependentUpon>
</Compile>
<Compile Include="Forms\FormUtils.cs" />
<Compile Include="Forms\GitHubForm.cs">
<SubType>Form</SubType>
@ -182,6 +188,9 @@
<ItemGroup>
<EmbeddedResource Include="Resources\template.html" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\about.rtf" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

View File

@ -8,6 +8,7 @@ namespace CodeStatistics.Data{
static Lang(){ // figure out languages later
Get = new Lang{
{ "Title", "Code Statistics" },
{ "TitleAbout", "About" },
{ "TitleProject", "Code Statistics - Project" },
{ "TitleDebug", "Code Statistics - Project Debug" },

View File

@ -0,0 +1,67 @@
namespace CodeStatistics.Forms {
partial class AboutForm {
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing) {
if (disposing && (components != null)) {
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent() {
this.textContents = new System.Windows.Forms.RichTextBox();
this.SuspendLayout();
//
// textContents
//
this.textContents.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.textContents.BackColor = System.Drawing.Color.White;
this.textContents.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.textContents.Cursor = System.Windows.Forms.Cursors.Default;
this.textContents.DetectUrls = false;
this.textContents.Location = new System.Drawing.Point(12, 12);
this.textContents.Name = "textContents";
this.textContents.ReadOnly = true;
this.textContents.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.None;
this.textContents.ShortcutsEnabled = false;
this.textContents.Size = new System.Drawing.Size(269, 285);
this.textContents.TabIndex = 0;
this.textContents.TabStop = false;
//
// AboutForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(293, 309);
this.Controls.Add(this.textContents);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "AboutForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.RichTextBox textContents;
}
}

View File

@ -0,0 +1,14 @@
using CodeStatistics.Data;
using CodeStatistics.Properties;
using System.Windows.Forms;
namespace CodeStatistics.Forms{
public partial class AboutForm : Form{
public AboutForm(){
InitializeComponent();
Text = Lang.Get["TitleAbout"];
textContents.Rtf = Resources.about;
}
}
}

View File

@ -88,6 +88,7 @@
this.btnViewAbout.Size = new System.Drawing.Size(150, 37);
this.btnViewAbout.TabIndex = 3;
this.btnViewAbout.UseVisualStyleBackColor = false;
this.btnViewAbout.Click += new System.EventHandler(this.btnViewAbout_Click);
//
// tableBottomPanel
//

View File

@ -92,5 +92,9 @@ namespace CodeStatistics.Forms{
private void btnViewSourceCode_Click(object sender, EventArgs e){
Process.Start("https://github.com/chylex/Code-Statistics");
}
private void btnViewAbout_Click(object sender, EventArgs e){
new AboutForm().ShowDialog();
}
}
}

View File

@ -60,6 +60,16 @@ namespace CodeStatistics.Properties {
}
}
/// <summary>
/// </summary>
internal static string about {
get {
return ResourceManager.GetString("about", resourceCulture);
}
}
/// <summary>
/// </summary>
internal static string template {
get {
return ResourceManager.GetString("template", resourceCulture);

View File

@ -118,6 +118,9 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="about" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\about.rtf;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;windows-1250</value>
</data>
<data name="template" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\template.html;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;windows-1250</value>
</data>

Binary file not shown.