From cc1f9d46199ec747021c2e95e938fb6573fce011 Mon Sep 17 00:00:00 2001 From: Serraniel Date: Sun, 30 Apr 2017 11:29:49 +0200 Subject: [PATCH] Some finalisation --- .../MainForm.Designer.cs | 98 ++++++++++++++----- Discord Media Loader.Application/MainForm.cs | 16 ++- .../Properties/Resources.Designer.cs | 19 ++++ .../Properties/Resources.resx | 14 +++ 4 files changed, 122 insertions(+), 25 deletions(-) diff --git a/Discord Media Loader.Application/MainForm.Designer.cs b/Discord Media Loader.Application/MainForm.Designer.cs index 744c08a..310b0ce 100644 --- a/Discord Media Loader.Application/MainForm.Designer.cs +++ b/Discord Media Loader.Application/MainForm.Designer.cs @@ -46,12 +46,17 @@ this.cbGuild = new System.Windows.Forms.ComboBox(); this.lbGuild = new System.Windows.Forms.Label(); this.statusStrip = new System.Windows.Forms.StatusStrip(); - this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.lbxJobs = new System.Windows.Forms.ListBox(); - this.btnDelete = new System.Windows.Forms.Button(); - this.lbProgress = new System.Windows.Forms.ToolStripStatusLabel(); this.pgbProgress = new System.Windows.Forms.ToolStripProgressBar(); + this.lbProgress = new System.Windows.Forms.ToolStripStatusLabel(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.btnDelete = new System.Windows.Forms.Button(); + this.lbxJobs = new System.Windows.Forms.ListBox(); this.tmrRefreshProgress = new System.Windows.Forms.Timer(this.components); + this.lblVersionPlaceholder = new System.Windows.Forms.ToolStripStatusLabel(); + this.lbVersion = new System.Windows.Forms.ToolStripStatusLabel(); + this.btnDropDown = new System.Windows.Forms.ToolStripSplitButton(); + this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.visitGithubToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.pnlSettings.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.edThreadLimit)).BeginInit(); this.groupBox1.SuspendLayout(); @@ -232,13 +237,26 @@ // this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.pgbProgress, - this.lbProgress}); + this.lbProgress, + this.lblVersionPlaceholder, + this.lbVersion, + this.btnDropDown}); this.statusStrip.Location = new System.Drawing.Point(0, 311); this.statusStrip.Name = "statusStrip"; this.statusStrip.Size = new System.Drawing.Size(553, 22); this.statusStrip.TabIndex = 2; this.statusStrip.Text = "statusStrip1"; // + // pgbProgress + // + this.pgbProgress.Name = "pgbProgress"; + this.pgbProgress.Size = new System.Drawing.Size(100, 16); + // + // lbProgress + // + this.lbProgress.Name = "lbProgress"; + this.lbProgress.Size = new System.Drawing.Size(0, 17); + // // groupBox2 // this.groupBox2.Controls.Add(this.btnDelete); @@ -251,17 +269,6 @@ this.groupBox2.TabStop = false; this.groupBox2.Text = "Jobs"; // - // lbxJobs - // - this.lbxJobs.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.lbxJobs.FormattingEnabled = true; - this.lbxJobs.Location = new System.Drawing.Point(6, 19); - this.lbxJobs.Name = "lbxJobs"; - this.lbxJobs.Size = new System.Drawing.Size(541, 108); - this.lbxJobs.TabIndex = 0; - // // btnDelete // this.btnDelete.Dock = System.Windows.Forms.DockStyle.Bottom; @@ -273,15 +280,16 @@ this.btnDelete.UseVisualStyleBackColor = true; this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click); // - // lbProgress + // lbxJobs // - this.lbProgress.Name = "lbProgress"; - this.lbProgress.Size = new System.Drawing.Size(0, 17); - // - // pgbProgress - // - this.pgbProgress.Name = "pgbProgress"; - this.pgbProgress.Size = new System.Drawing.Size(100, 16); + this.lbxJobs.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.lbxJobs.FormattingEnabled = true; + this.lbxJobs.Location = new System.Drawing.Point(6, 19); + this.lbxJobs.Name = "lbxJobs"; + this.lbxJobs.Size = new System.Drawing.Size(541, 108); + this.lbxJobs.TabIndex = 0; // // tmrRefreshProgress // @@ -289,6 +297,43 @@ this.tmrRefreshProgress.Interval = 500; this.tmrRefreshProgress.Tick += new System.EventHandler(this.tmrRefreshProgress_Tick); // + // lblVersionPlaceholder + // + this.lblVersionPlaceholder.Name = "lblVersionPlaceholder"; + this.lblVersionPlaceholder.Size = new System.Drawing.Size(271, 17); + this.lblVersionPlaceholder.Spring = true; + // + // lbVersion + // + this.lbVersion.Name = "lbVersion"; + this.lbVersion.Size = new System.Drawing.Size(118, 17); + this.lbVersion.Text = "v https://github.com"; + // + // btnDropDown + // + this.btnDropDown.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.btnDropDown.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.visitGithubToolStripMenuItem, + this.aboutToolStripMenuItem}); + this.btnDropDown.ImageTransparentColor = System.Drawing.Color.Magenta; + this.btnDropDown.Name = "btnDropDown"; + this.btnDropDown.Size = new System.Drawing.Size(16, 20); + this.btnDropDown.Text = "Options"; + // + // aboutToolStripMenuItem + // + this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem"; + this.aboutToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.aboutToolStripMenuItem.Text = "About"; + this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click); + // + // visitGithubToolStripMenuItem + // + this.visitGithubToolStripMenuItem.Name = "visitGithubToolStripMenuItem"; + this.visitGithubToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.visitGithubToolStripMenuItem.Text = "Visit Github"; + this.visitGithubToolStripMenuItem.Click += new System.EventHandler(this.visitGithubToolStripMenuItem_Click); + // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -341,5 +386,10 @@ private System.Windows.Forms.ToolStripProgressBar pgbProgress; private System.Windows.Forms.ToolStripStatusLabel lbProgress; private System.Windows.Forms.Timer tmrRefreshProgress; + private System.Windows.Forms.ToolStripStatusLabel lblVersionPlaceholder; + private System.Windows.Forms.ToolStripStatusLabel lbVersion; + private System.Windows.Forms.ToolStripSplitButton btnDropDown; + private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem visitGithubToolStripMenuItem; } } \ No newline at end of file diff --git a/Discord Media Loader.Application/MainForm.cs b/Discord Media Loader.Application/MainForm.cs index 093c4be..066e464 100644 --- a/Discord Media Loader.Application/MainForm.cs +++ b/Discord Media Loader.Application/MainForm.cs @@ -1,4 +1,6 @@ -using System.Linq; +using System.Diagnostics; +using System.Linq; +using System.Reflection; using System.Windows.Forms; using Discord; using DML.Application.Classes; @@ -26,6 +28,8 @@ namespace DML.Application { Debug("Refreshing components..."); + lbVersion.Text = $"v{Assembly.GetExecutingAssembly().GetName().Version} Copyright © by Serraniel"; + Trace("Refreshing operating folder component..."); edOperatingFolder.Text = Core.Settings.OperatingFolder; @@ -230,5 +234,15 @@ namespace DML.Application lbProgress.Text = $"Scanned: {scanned} Downloaded: {done} Open: {totalAttachments - done}"; } + + private void aboutToolStripMenuItem_Click(object sender, System.EventArgs e) + { + MessageBox.Show(Properties.Resources.AboutString); + } + + private void visitGithubToolStripMenuItem_Click(object sender, System.EventArgs e) + { + Process.Start("https://github.com/Serraniel/DiscordMediaLoader/"); + } } } diff --git a/Discord Media Loader.Application/Properties/Resources.Designer.cs b/Discord Media Loader.Application/Properties/Resources.Designer.cs index b02e64d..971d55e 100644 --- a/Discord Media Loader.Application/Properties/Resources.Designer.cs +++ b/Discord Media Loader.Application/Properties/Resources.Designer.cs @@ -60,6 +60,25 @@ namespace DML.Application.Properties { } } + /// + /// Sucht eine lokalisierte Zeichenfolge, die Discord Media Loader by Serraniel - Apache 2.0 License + ///https://github.com/Serraniel/DiscordMediaLoader/ + /// + ///Made with: + ///SweetLib (Copyright (c) 2017 Serraniel - GNU General Public License v3.0) + ///Discord.Net (Copyright (c) 2015 RogueException - MIT License) + ///Newtonsoft.Json (Copyright (c) 2007 James Newton-King - MIT License) + ///Nito.AsyncEx (Copyright (c) 2014 StephenCleary - MIT License) + ///RestSharp (Copyright (c) restsharp - Apache 2.0 License) + ///WebSocket4Net (Copyright (c) kerryjiang - Apache 2.0 License) + /// [Rest der Zeichenfolge wurde abgeschnitten]"; ähnelt. + /// + internal static string AboutString { + get { + return ResourceManager.GetString("AboutString", resourceCulture); + } + } + /// /// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. /// diff --git a/Discord Media Loader.Application/Properties/Resources.resx b/Discord Media Loader.Application/Properties/Resources.resx index 3691894..6c5f149 100644 --- a/Discord Media Loader.Application/Properties/Resources.resx +++ b/Discord Media Loader.Application/Properties/Resources.resx @@ -117,6 +117,20 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Discord Media Loader by Serraniel - Apache 2.0 License +https://github.com/Serraniel/DiscordMediaLoader/ + +Made with: +SweetLib (Copyright (c) 2017 Serraniel - GNU General Public License v3.0) +Discord.Net (Copyright (c) 2015 RogueException - MIT License) +Newtonsoft.Json (Copyright (c) 2007 James Newton-King - MIT License) +Nito.AsyncEx (Copyright (c) 2014 StephenCleary - MIT License) +RestSharp (Copyright (c) restsharp - Apache 2.0 License) +WebSocket4Net (Copyright (c) kerryjiang - Apache 2.0 License) +LiteDB (Copyright (c) 2014 - 2015 Mauricio David - MIT License) +Octokit (Copyright (c) 2012 GitHub, Inc - MIT License) + ..\Resources\Serraniel-Logo4-NO-BG.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a