diff --git a/Core/FormBrowser.cs b/Core/FormBrowser.cs index abc88fee..6adfe0b2 100644 --- a/Core/FormBrowser.cs +++ b/Core/FormBrowser.cs @@ -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){ diff --git a/Core/Other/FormAbout.Designer.cs b/Core/Other/FormAbout.Designer.cs new file mode 100644 index 00000000..3bd1c16c --- /dev/null +++ b/Core/Other/FormAbout.Designer.cs @@ -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; + } +} \ No newline at end of file diff --git a/Core/Other/FormAbout.cs b/Core/Other/FormAbout.cs new file mode 100644 index 00000000..ba3f0253 --- /dev/null +++ b/Core/Other/FormAbout.cs @@ -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()); + } + } +} diff --git a/TweetDick.csproj b/TweetDick.csproj index 13b13e2d..b85e3bd8 100644 --- a/TweetDick.csproj +++ b/TweetDick.csproj @@ -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>