1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-05-05 02:34:07 +02:00

Add a basic About Form

This commit is contained in:
chylex 2016-04-11 02:08:37 +02:00
parent 10253eed2a
commit e4853b6697
4 changed files with 101 additions and 1 deletions

View File

@ -7,6 +7,7 @@
using System.IO;
using System.Text;
using TweetDick.Core.Handling;
using TweetDick.Core.Other;
namespace TweetDick.Core{
public partial class FormBrowser : Form{
@ -20,6 +21,8 @@ private static UserConfig Config{
private readonly TweetDeckBridge bridge;
private readonly FormNotification notification;
private FormAbout currentFormAbout;
public FormBrowser(){
InitializeComponent();
@ -99,7 +102,14 @@ public void OpenSettings(){
}
public void OpenAbout(){
// TODO
if (currentFormAbout != null){
currentFormAbout.BringToFront();
}
else{
currentFormAbout = new FormAbout();
currentFormAbout.FormClosed += (sender, args) => currentFormAbout = null;
currentFormAbout.Show(this);
}
}
public void OnTweetPopup(string tweetHtml, string tweetColumn){

66
Core/Other/FormAbout.Designer.cs generated Normal file
View File

@ -0,0 +1,66 @@
namespace TweetDick.Core.Other {
partial class FormAbout {
/// <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.labelAbout = new TweetDick.Core.Controls.RichTextLabel();
this.SuspendLayout();
//
// labelAbout
//
this.labelAbout.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.labelAbout.BackColor = System.Drawing.Color.White;
this.labelAbout.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.labelAbout.Location = new System.Drawing.Point(12, 12);
this.labelAbout.Name = "labelAbout";
this.labelAbout.ReadOnly = true;
this.labelAbout.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.None;
this.labelAbout.Size = new System.Drawing.Size(360, 126);
this.labelAbout.TabIndex = 0;
this.labelAbout.TabStop = false;
this.labelAbout.Text = "";
//
// FormAbout
//
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(384, 150);
this.Controls.Add(this.labelAbout);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "FormAbout";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "About TweetDick";
this.ResumeLayout(false);
}
#endregion
private Controls.RichTextLabel labelAbout;
}
}

18
Core/Other/FormAbout.cs Normal file
View File

@ -0,0 +1,18 @@
using System.Text;
using System.Windows.Forms;
using TweetDick.Core.Controls;
namespace TweetDick.Core.Other{
public partial class FormAbout : Form{
public FormAbout(){
InitializeComponent();
StringBuilder build = new StringBuilder();
build.Append(@"\fs22TweetDick was created by chylex as a replacement to the discontinued TweetDeck client for Windows, and is released under the MIT license.\par ");
build.Append(@"Official Website: ").Append(RichTextLabel.AddLink("http://tweetdick.chylex.com")).Append(@"\line ");
build.Append(@"Source Code: ").Append(RichTextLabel.AddLink("https://github.com/chylex/TweetDick"));
labelAbout.Rtf = RichTextLabel.Wrap(build.ToString());
}
}
}

View File

@ -99,6 +99,12 @@
<Compile Include="Core\Controls\RichTextLabel.Designer.cs">
<DependentUpon>RichTextLabel.cs</DependentUpon>
</Compile>
<Compile Include="Core\Other\FormAbout.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Core\Other\FormAbout.Designer.cs">
<DependentUpon>FormAbout.cs</DependentUpon>
</Compile>
<Compile Include="Core\Other\FormBackgroundWork.cs">
<SubType>Form</SubType>
</Compile>