From 29c9381f3ac411459a86dcde57bc2fbd77761c86 Mon Sep 17 00:00:00 2001 From: Serraniel Date: Sat, 28 Jan 2017 17:17:19 +0100 Subject: [PATCH 1/8] Added Login Form --- Discord Media Loader/LoginForm.Designer.cs | 125 +++++++ Discord Media Loader/LoginForm.cs | 45 +++ Discord Media Loader/LoginForm.resx | 408 +++++++++++++++++++++ 3 files changed, 578 insertions(+) create mode 100644 Discord Media Loader/LoginForm.Designer.cs create mode 100644 Discord Media Loader/LoginForm.cs create mode 100644 Discord Media Loader/LoginForm.resx diff --git a/Discord Media Loader/LoginForm.Designer.cs b/Discord Media Loader/LoginForm.Designer.cs new file mode 100644 index 0000000..2aa16fb --- /dev/null +++ b/Discord Media Loader/LoginForm.Designer.cs @@ -0,0 +1,125 @@ +namespace Discord_Media_Loader +{ + partial class LoginForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LoginForm)); + this.lbEmail = new System.Windows.Forms.Label(); + this.lbPassword = new System.Windows.Forms.Label(); + this.tbxEmail = new System.Windows.Forms.TextBox(); + this.tbxPassword = new System.Windows.Forms.TextBox(); + this.btnLogin = new System.Windows.Forms.Button(); + this.btnAbort = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // lbEmail + // + this.lbEmail.AutoSize = true; + this.lbEmail.Location = new System.Drawing.Point(12, 9); + this.lbEmail.Name = "lbEmail"; + this.lbEmail.Size = new System.Drawing.Size(35, 13); + this.lbEmail.TabIndex = 0; + this.lbEmail.Text = "Email:"; + // + // lbPassword + // + this.lbPassword.AutoSize = true; + this.lbPassword.Location = new System.Drawing.Point(12, 35); + this.lbPassword.Name = "lbPassword"; + this.lbPassword.Size = new System.Drawing.Size(56, 13); + this.lbPassword.TabIndex = 1; + this.lbPassword.Text = "Password:"; + // + // tbxEmail + // + this.tbxEmail.Location = new System.Drawing.Point(79, 6); + this.tbxEmail.Name = "tbxEmail"; + this.tbxEmail.Size = new System.Drawing.Size(204, 20); + this.tbxEmail.TabIndex = 2; + // + // tbxPassword + // + this.tbxPassword.Location = new System.Drawing.Point(79, 32); + this.tbxPassword.Name = "tbxPassword"; + this.tbxPassword.PasswordChar = '•'; + this.tbxPassword.Size = new System.Drawing.Size(204, 20); + this.tbxPassword.TabIndex = 3; + // + // btnLogin + // + this.btnLogin.Location = new System.Drawing.Point(127, 78); + this.btnLogin.Name = "btnLogin"; + this.btnLogin.Size = new System.Drawing.Size(75, 23); + this.btnLogin.TabIndex = 4; + this.btnLogin.Text = "&Login"; + this.btnLogin.UseVisualStyleBackColor = true; + this.btnLogin.Click += new System.EventHandler(this.btnLogin_Click); + // + // btnAbort + // + this.btnAbort.Location = new System.Drawing.Point(208, 78); + this.btnAbort.Name = "btnAbort"; + this.btnAbort.Size = new System.Drawing.Size(75, 23); + this.btnAbort.TabIndex = 5; + this.btnAbort.Text = "&Abort"; + this.btnAbort.UseVisualStyleBackColor = true; + this.btnAbort.Click += new System.EventHandler(this.btnAbort_Click); + // + // LoginForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(296, 114); + this.Controls.Add(this.btnAbort); + this.Controls.Add(this.btnLogin); + this.Controls.Add(this.tbxPassword); + this.Controls.Add(this.tbxEmail); + this.Controls.Add(this.lbPassword); + this.Controls.Add(this.lbEmail); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "LoginForm"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Login"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label lbEmail; + private System.Windows.Forms.Label lbPassword; + private System.Windows.Forms.TextBox tbxEmail; + private System.Windows.Forms.TextBox tbxPassword; + private System.Windows.Forms.Button btnLogin; + private System.Windows.Forms.Button btnAbort; + } +} \ No newline at end of file diff --git a/Discord Media Loader/LoginForm.cs b/Discord Media Loader/LoginForm.cs new file mode 100644 index 0000000..582e364 --- /dev/null +++ b/Discord Media Loader/LoginForm.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Discord_Media_Loader +{ + public partial class LoginForm : Form + { + public static bool Exec(ref string email, out string password) + { + var loginForm = new LoginForm { tbxEmail = { Text = email } }; + password = ""; + + if (loginForm.ShowDialog() == DialogResult.OK) + { + email = loginForm.tbxEmail.Text; + password = loginForm.tbxPassword.Text; + return true; + } + + return false; + } + + public LoginForm() + { + InitializeComponent(); + } + + private void btnAbort_Click(object sender, EventArgs e) + { + DialogResult = DialogResult.Abort; + } + + private void btnLogin_Click(object sender, EventArgs e) + { + DialogResult = DialogResult.OK; + } + } +} diff --git a/Discord Media Loader/LoginForm.resx b/Discord Media Loader/LoginForm.resx new file mode 100644 index 0000000..88e8a1f --- /dev/null +++ b/Discord Media Loader/LoginForm.resx @@ -0,0 +1,408 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAABAAEAQEAAAAEAIAAoQgAAFgAAACgAAABAAAAAgAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8b////VP///3////+m////zP// + /+T////1//////////r////u////3f///8z///+m////f////1T///8b////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////M////5D////b//////// + //////////////////////////////////////////////////////////////////////////////// + /9v///+Q////M////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///w3///90////1v// + //////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////W////dP///w3///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A2K4AANiuAADYrgAA2K4AANiuAADfswAA////EP// + /4D////t////////////////////////////////////////////////9/zq/7XiQ/+340n/w+ho/9Pu + kf/m9b//+Pzt///////////////////////////////////////////////////////////t////gf// + /xCa2AAAmtgAAJrYAACa2AAAmtgAAJrYAAD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////ANiuAADYrgAA2K4AANiu + AAD///8B////Yf///+v//////////////////////////////////////////////////////////+z4 + z/+a2AD/mtgA/5rYAP+a2AD/mtgA/6TcGf+65VL/3fKo//n98P////////////////////////////// + ///////////////////////r////Yf///wGa2AAAmtgAAJrYAACa2AAA////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wDYrgAA2K4AANiuAAD///8k////xP////////////////////////////////////////////////// + ///////////////////h87P/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+n3SD/zOt+//X7 + 5v/////////////////////////////////////////////////////E////I5rYAACa2AAAmtgAAP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A2K4AANiuAAD///9V////8f////////////////////////////////// + ////////////////////////////////////////0+6Q/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rY + AP+a2AD/mtgA/5rYAP+k3Bn/0e2K//v+9v////////////////////////////////////////////// + //H///9VmtgAAJrYAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wH///+M//////////////////////// + /////////////////////////////////////////////////////////////8bpbv+a2AD/mtgA/5rY + AP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+u4DP/5/bD//////////////////// + /////////////////////////////////4z///8B////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wb///+l//////// + //////////////////////////////////////////////////////////////////////////////// + //+55E//mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5zZ + Bv/P7Ib/////////////////////////////////////////////////////pf///wb///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wb///+3//////////////////////////////////////////////////////////////////////// + ///////////////////+//3/rd8x/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rY + AP+a2AD/mtgA/5rYAP+a2AD/mtgA/7zlV//5/fH///////////////////////////////////////// + //////+3////Bv///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wH///+k//////////////////////////////////////////////////////// + ////////////////////////////////////////+f3v/6PcF/+a2AD/mtgA/5rYAP+a2AD/mtgA/5rY + AP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/seE7//X75v////////////// + /////////////////////////////////6T///8B////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///+K//////////////////////////////////////// + /////////////////////////////////////////////////////////////+751f+a2AD/mtgA/5rY + AP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rY + AP+s3y7/9Pvi////////////////////////////////////////////////i////wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///9V//////////////////////// + //////////////////////////////////////////////////////////////////////////////// + ///s+M//rd8w/6XcHf+c2Qb/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rY + AP+a2AD/mtgA/5rYAP+a2AD/mtgA/6zfLv/1++f///////////////////////////////////////// + //////9V////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8j////8P// + //////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////v/6/fL/8PnZ/97yrP/E6Gv/qd4l/5rYAP+a2AD/mtgA/5rY + AP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/suE8//v99P////////////// + ////////////////////////////8P///yP///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8B////xP////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////v9 + 9f/e8qz/s+JA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rY + AP/A51/////////////////////////////////////////////////E////Af///wD///8A////AP// + /wD///8A////AP///wD///8A////Yf////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////f867/rN8t/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rY + AP+a2AD/mtgA/5rYAP+a2AD/mtgA/9jwnP////////////////////////////////////////////// + /2H///8A////AP///wD///8A////AP///wD///8A////EP///+r///////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////r98//I6nX/mtgA/5rY + AP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+h2xL/8/rh//////////////////// + ///////////////////////q////Ev///wD///8A////AP///wD///8A////AP///3////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + /////////////9/yrf+h2xL/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/8Dn + X////////////////////////////////////////////////4D///8A////AP///wD///8A////AP// + /w3////u//////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////7PjQ/6reKP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rY + AP+a2AD/mtgA/5rYAP+c2QX/7vjT///////////////////////////////////////////u////Df// + /wD///8A////AP///wD///90//////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////0++L/qd4n/5rY + AP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/8PoaP////////////////////////////// + /////////////////3T///8A////AP///wD///8B////2/////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + /////////////+360P+k4g3/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+j2xb/+Pzu//// + ///////////////////////////////////////b////Af///wD///8A////O/////////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////wNCY/53dAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rY + AP+a2AD/mtgA/9/zr////////////////////////////////////////////////zv///8A////AP// + /5D///////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////f39/+Puin/n+AA/5rY + AP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP/F6W3///////////////////////////////////////// + //////+Q////AP///wD////Y//////////////////////////////////////////////////////// + /////////////////////////////+3t7f+3t7f/jIyM/3Nzc/9oaGj/a2tr/35+fv+dnZ3/xsbG//Hx + 8f////////////////////////////////////////////////////////////////////////////// + ////////iZNy/5zbAP+b2QD/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/s+JA//////////////////// + ////////////////////////////2f///wD///8d//////////////////////////////////////// + ////////////////////////////////////////9fTx/46Pk/9BQUH/Li4u/y4uLv8uLi7/Li4u/y4u + Lv8uLi7/Li4u/y4uLv9ERET/fn5+/8rKyv////////////////////////////////////////////// + /////////////////////////////4iHjP98qA3/n+AA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/6ne + J/////////////////////////////////////////////////////8e////Vv////////////////// + ////////////////////////////////////////////////////////+fDL/45/Qv8kJjH/Li4u/y4u + Lv8uLi7/Li4u/y4uLv8uLi7/Li4u/y4uLv8uLi7/Li4u/y4uLv8uLi7/Xl5e/7e3t//+/v7///////// + //////////////////////////////////////////////////9vbXX/T2Ig/57fAP+a2QD/mtgA/5rY + AP+a2AD/mtgA/5rYAP+l3Bz/////////////////////////////////////////////////////Vv// + /4T/////////////////////////////////////////////////////////////////////8+ax/+O5 + D/92ZBv/JCYx/y4uLv8uLi7/Li4u/y4uLv8uLi7/Li4u/y4uLv8uLi7/Li4u/y4uLv8uLi7/Li4u/y4u + Lv8uLi7/YGBg/8jIyP/////////////////////////////////////////////////09PT/QkJE/zEz + Lf+Mwgb/nd0A/5rYAP+a2AD/mtgA/5rYAP+a2AD/pdwb//////////////////////////////////// + /////////////////4T///+t//////////////////////////////////////////////////////// + ////////8+ez/9mwB//htQD/dWMb/yQnMf8uLi7/Li4u/y4uLv8uLi7/Li4u/y4uLv8uLi7/Li4u/y4u + Lv8uLi7/Li4u/y4uLv8uLi7/Li4u/y4uLv8uLi7/dHR0/97e3v////////////////////////////// + ////////r6+v/y4uLv8nIzH/bZET/6HiAP+a2AD/mtgA/5rYAP+a2AD/mtgA/6neJv////////////// + //////////////////////////////////////+t////zP////////////////////////////////// + ////////////////////////+PHS/9qyDv/YrgD/4rUA/3lmGf8kJjH/Li4u/y4uLv8uLi7/Li4u/y4u + Lv8uLi7/Li4u/y4uLv8uLi7/Li4u/y4uLv8uLi7/Ozs7/1ZWVv90dHT/jo6O/5mZmf/Hx8f//v7+//// + ////////////////////////7+/v/0dHR/8uLi7/KCUw/1BkH/+f4AD/mtgA/5rYAP+a2AD/mtgA/5rY + AP+z4T7/////////////////////////////////////////////////////zP///+X///////////// + /////////////////////////////////////////v35/+C/N//YrgD/2K4A/+O2AP+Dbhf/IyYx/y4u + Lv8uLi7/Li4u/y4uLv8uLi7/Li4u/y4uLv8uLi7/Li4u/1VVVf+QkJD/xsbG/+rq6v////////////// + ////////////////////////////////////////+vr6/2tra/8uLi7/Li4u/yspL/86Qij/ltEC/5va + AP+a2AD/mtgA/5rYAP+a2AD/x+ly//////////////////////////////////////////////////// + /+D////y//////////////////////////////////////////////////////Dfm//YrgD/2K4A/9iu + AP/itQD/k3oT/yUnMf8uLi7/Li4u/y4uLv8uLi7/Li4u/y4uLv8uLi7/cHBw/8bGxv/8/Pz///////// + ////////////////////////////////////////////////////////7+/v/3BwcP8uLi7/Li4u/y4u + Lv8tLC7/Ly8u/4e7CP+e3gD/mtgA/5rYAP+a2AD/mtgA/+X1vf////////////////////////////// + ///////////////////////s//////////////////////////////////////////////////////79 + +f/euyr/2K4A/9iuAP/YrgD/4LQA/6iKDf8oKTD/Li4u/y4uLv8uLi7/Li4u/y4uLv9QUFD/xMTE//// + ////////////////////////////////////////////////////////////////////////w8PD/1BQ + UP8uLi7/Li4u/y4uLv8uLi7/Li4u/yknMP95pA7/n+EA/5rYAP+a2AD/mtgA/6neJ//8/vj///////// + ////////////////////////////////////////////+f////////////////////////////////// + ///////////////////168D/2K4A/9iuAP/YrgD/2K4A/92yAP+/mwf/MTAt/ywtLv8uLi7/Li4u/y4u + Lv9wcHD/8PDw//////////////////////////////////////////////////////////////////r6 + +v/ExMT/bm5u/y4uLv8uLi7/Li4u/y4uLv8uLi7/Li4u/y4uLv8oJDH/a44U/6HiAP+a2AD/mtgA/5rY + AP/W75j///////////////////////////////////////////////////////////n////y//////// + ////////////////////////////////////////6tR3/9iuAP/YrgD/2K4A/9iuAP/arwD/06oB/0VA + J/8pKi//Li4u/y4uLv9ra2v/+vr6//////////////////////////////////////////////////39 + /f/n5+f/wsLC/4yMjP9SUlL/Li4u/y4uLv8uLi7/Li4u/y4uLv8uLi7/Li4u/y4uLv8uLi7/JyMx/2F+ + GP+h4wD/mtgA/5rYAP+v4DX//P74//////////////////////////////////////////////////// + ///////s////5f///////////////////////////////////////////////+LDQv/YrgD/2K4A/9iu + AP/YrgD/2K4A/+C0AP9oWh7/JCcx/y4uLv9GRkb/7u7u/////////////////////////////v7+/8fH + x/+VlZX/iYmJ/3BwcP9TU1P/OTk5/y4uLv8uLi7/Li4u/y4uLv8uLi7/Li4u/y4uLv8uLi7/Li4u/y4u + Lv8uLi7/Li4u/ygkMf9bdRv/oOEA/5rYAP+g2g7/7fjR//////////////////////////////////// + ////////////////////////////4P///8z///////////////////////////////////////////// + ///euyj/2K4A/9iuAP/YrgD/2K4A/9iuAP/itQD/ln0S/yQnMf8uLi7/ra2t//////////////////// + ///////////////////i4uL/e3t7/y4uLv8uLi7/Li4u/y4uLv8uLi7/Li4u/y4uLv8uLi7/Li4u/y4u + Lv8uLi7/Li4u/y4uLv8uLi7/Li4u/y4uLv8oJDH/WXEc/6DhAP+d2Qf/4fOy//////////////////// + /////////////////////////////////////////////////8z///+t//////////////////////// + ////////////////////////3Lcc/9iuAP/YrgD/2K4A/9iuAP/YrgD/3LEA/8agBf82NCz/Pj9C//T0 + 9P/////////////////////////////////////////////////Ozs7/ZmZm/y4uLv8uLi7/Li4u/y4u + Lv8uLi7/Li4u/y4uLv8uLi7/Li4u/y4uLv8uLi7/Li4u/y4uLv8uLi7/KCQx/1pzHP+m4w//4POx//// + //////////////////////////////////////////////////////////////////////+t////hP// + /////////////////////////////////////////////9y3Hf/YrgD/2K4A/9iuAP/YrgD/2K4A/9iu + AP/gtAD/Z1ke/2lrcv////////////////////////////////////////////////////////////// + //++vr7/ZGRk/y4uLv8uLi7/Li4u/y4uLv8uLi7/Li4u/y4uLv8uLi7/Li4u/y4uLv8uLi7/Li4u/ygk + Mf93i0X/7PnL//////////////////////////////////////////////////////////////////// + ////////////hP///1T////////////////////////////////////////////////euyr/2K4A/9iu + AP/YrgD/2K4A/9iuAP/YrgD/4LQA/66OC/+Dg4b///////////////////////////////////////// + ///////////////////////////////////Pz8//hISE/0hISP8uLi7/Li4u/y4uLv8uLi7/Li4u/y4u + Lv8uLi7/Li4u/0JCQv+RkJX/9PXy//////////////////////////////////////////////////// + /////////////////////////////////1b///8c//////////////////////////////////////// + ////////48RG/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9mvAP/dsgD/kopq//////////////////// + ///////////////////////////////////////////////////////////////////09PT/y8vL/6Ki + ov+Dg4P/cXFx/21tbf94eHj/kJCQ/7q6uv/v7+////////////////////////////////////////// + //////////////////////////////////////////////////////8d////AP///9f///////////// + /////////////////////////////+rTdP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/4LQA/72f + Iv/09PT///////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////Y////AP// + /wD///+P///////////////////////////////////////////06Lb/2K4A/9iuAP/YrgD/2K4A/9iu + AP/YrgD/2K4A/9iuAP/esgD/zsKO//////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + ////////////kP///wD///8A////Ov///////////////////////////////////////////fvx/9y2 + Gv/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/+G3Cf/578j///////////////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////zr///8A////AP///wH////a//////////////////////// + ///////////////////p0nD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/3bgh//r0 + 3P////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////9v///8B////AP///wD///8A////dP// + ////////////////////////////////////////+fPZ/9mxCP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iu + AP/YrgD/2K4A/9iuAP/duCH/9+7I//////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////90////AP// + /wD///8A////AP///wz////t///////////////////////////////////////////oz2n/2K4A/9iu + AP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9qyDf/x4qT///////////////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + ///////t////Df///wD///8A////AP///wD///8A////f/////////////////////////////////// + ////////+/fm/9u1Fv/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/+nQ + bP/8+u7///////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + ////////////////////////////f////wD///8A////AP///wD///8A////AP///xD////q//////// + ///////////////////////////////////x4qX/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iu + AP/YrgD/2K4A/9iuAP/YrgD/3ron//Hipf///v3///////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////6v///xD///8A////AP///wD///8A////AP// + /wD///8A////YP///////////////////////////////////////////////+jPaf/YrgD/2K4A/9iu + AP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/4cA5//HipP/9+/H///////// + //////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////2H///8A////AP// + /wD///8A////AP///wD///8A////AP///wH////D//////////////////////////////////////// + ///+/fj/4sRE/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iu + AP/YrgD/3bgf/+fNY//x4qX/+PHT//367//+/vv////+//////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + /8P///8B////AP///wD///8A////AP///wD///8A////AP///wD///8A////Iv////D///////////// + //////////////////////////////z57f/gvzX/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iu + AP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9ivA//cthj/37wr//fuyv////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////D///8i////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///9U////////////////////////////////////////////////+/jo/+C/Nf/YrgD/2K4A/9iu + AP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iu + AP/48NH///////////////////////////////////////////////////////////////////////// + //////////////////////////////////////9V////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///4j///////////////////////////////////////////// + ///8+ev/4sND/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iu + AP/YrgD/2K4A/9iuAP/btBP//Pns//////////////////////////////////////////////////// + //////////////////////////////////////////////////////+J////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8B////pP////////////////// + //////////////////////////////789v/nzGD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iu + AP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/37wt///+/P////////////////////////////// + //////////////////////////////////////////////////////////////////////+k////Af// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wb///+3/////////////////////////////////////////////////////+7bj//asQr/2K4A/9iu + AP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/+PGSv////////////// + //////////////////////////////////////////////////////////////////////////////// + //////+3////Bv///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////Bv///6X///////////////////////////////////////////// + ////////9+7K/+HBO//YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iu + AP/oz2n///////////////////////////////////////////////////////////////////////// + //////////////////////+l////Bv///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8B////jP////////////////// + ///////////////////////////////////+/fr/7t2T/924Hv/YrgD/2K4A/9iuAP/YrgD/2K4A/9iu + AP/YrgD/2K4A/9iuAP/YrgD/7dqL//////////////////////////////////////////////////// + //////////////////////////////////////+M////Af///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A2K4AANiu + AAD///9V////8f/////////////////////////////////////////////////////8+ev/7dmH/966 + Jv/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A//Plrv////////////////////////////// + //////////////////////////////////////////////////H///9VmtgAAJrYAAD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////ANiuAADYrgAA2K4AAP///yT////E//////////////////////////////////////// + ///////////////////9/PT/8+av/+bLWv/duB7/2K4A/9iuAP/YrgD/2K4A/9iuAP/37sv///////// + /////////////////////////////////////////////////////////////////8T///8jmtgAAJrY + AACa2AAA////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wDYrgAA2K4AANiuAADYrgAA////Af///2D////r//////// + /////////////////////////////////////////////////////////fvx//btxv/v3pf/6dJw/+TH + T//jxEX/+/jo////////////////////////////////////////////////////////////////6/// + /2D///8BmtgAAJrYAACa2AAAmtgAAP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////EP///3/////t//////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + ///////t////f////xD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////Df///3T////V//////////////////////// + //////////////////////////////////////////////////////////////////////////////// + /////////////////9X///90////Df///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /zP///+N////1/////////////////////////////////////////////////////////////////// + ///////////////////////X////jf///zP///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8b////VP///33///+l////y////+P////y//////// + ///////y////4////8v///+l////ff///1T///8b////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////4Af///////wAAD//////8AAAD/////+AAAAB/////wAAAAD////8AAAAAD////gAAAAA + H///4AAAAAAH///AAAAAAAP//4AAAAAAAf//AAAAAAAA//4AAAAAAAB//gAAAAAAAH/8AAAAAAAAP/gA + AAAAAAAf+AAAAAAAAB/wAAAAAAAAD/AAAAAAAAAH4AAAAAAAAAfgAAAAAAAAB8AAAAAAAAADwAAAAAAA + AAOAAAAAAAAAAYAAAAAAAAABgAAAAAAAAAGAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAIAAAAAAAAABgAAAAAAAAAGAAAAAAAAAAYAAAAAAAAABwAAAAAAAAAPAAAAAAAAAA+AA + AAAAAAAH4AAAAAAAAAfwAAAAAAAAD/AAAAAAAAAP+AAAAAAAAB/4AAAAAAAAH/wAAAAAAAA//gAAAAAA + AH/+AAAAAAAAf/8AAAAAAAD//4AAAAAAAf//wAAAAAAD///gAAAAAAf///gAAAAAH////AAAAAA///// + AAAAAP/////AAAAD//////AAAA///////AAAP///////4Af///8= + + + \ No newline at end of file From 0e47254e87560ff00f4d2ceffe5f265e432e6156 Mon Sep 17 00:00:00 2001 From: Serraniel Date: Sat, 28 Jan 2017 17:50:56 +0100 Subject: [PATCH 2/8] Adjusted Login Form --- Discord Media Loader/LoginForm.Designer.cs | 2 ++ Discord Media Loader/LoginForm.cs | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/Discord Media Loader/LoginForm.Designer.cs b/Discord Media Loader/LoginForm.Designer.cs index 2aa16fb..fddb86d 100644 --- a/Discord Media Loader/LoginForm.Designer.cs +++ b/Discord Media Loader/LoginForm.Designer.cs @@ -61,6 +61,7 @@ this.tbxEmail.Name = "tbxEmail"; this.tbxEmail.Size = new System.Drawing.Size(204, 20); this.tbxEmail.TabIndex = 2; + this.tbxEmail.KeyUp += new System.Windows.Forms.KeyEventHandler(this.tbx_KeyUp); // // tbxPassword // @@ -69,6 +70,7 @@ this.tbxPassword.PasswordChar = '•'; this.tbxPassword.Size = new System.Drawing.Size(204, 20); this.tbxPassword.TabIndex = 3; + this.tbxPassword.KeyUp += new System.Windows.Forms.KeyEventHandler(this.tbx_KeyUp); // // btnLogin // diff --git a/Discord Media Loader/LoginForm.cs b/Discord Media Loader/LoginForm.cs index 582e364..2bd512e 100644 --- a/Discord Media Loader/LoginForm.cs +++ b/Discord Media Loader/LoginForm.cs @@ -41,5 +41,13 @@ namespace Discord_Media_Loader { DialogResult = DialogResult.OK; } + + private void tbx_KeyUp(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Return) + DialogResult = DialogResult.OK; + else if (e.KeyCode == Keys.Escape) + DialogResult = DialogResult.Abort; + } } } From 2c27aa139c6e168e411a1c42e0fac334117031ef Mon Sep 17 00:00:00 2001 From: Serraniel Date: Sat, 28 Jan 2017 18:13:30 +0100 Subject: [PATCH 3/8] Prepared Main Form --- Discord Media Loader/App.config | 12 + .../Discord Media Loader.csproj | 18 + Discord Media Loader/MainForm.Designer.cs | 149 ++++++- Discord Media Loader/MainForm.cs | 96 +++++ Discord Media Loader/MainForm.resx | 408 ++++++++++++++++++ .../Properties/AssemblyInfo.cs | 6 +- .../Properties/Settings.Designer.cs | 42 +- .../Properties/Settings.settings | 14 +- Discord Media Loader/Serraniel-64x64.ico | Bin 0 -> 16958 bytes 9 files changed, 717 insertions(+), 28 deletions(-) create mode 100644 Discord Media Loader/MainForm.resx create mode 100644 Discord Media Loader/Serraniel-64x64.ico diff --git a/Discord Media Loader/App.config b/Discord Media Loader/App.config index 731f6de..ca5f785 100644 --- a/Discord Media Loader/App.config +++ b/Discord Media Loader/App.config @@ -1,6 +1,18 @@  + + +
+ + + + + + + + + \ No newline at end of file diff --git a/Discord Media Loader/Discord Media Loader.csproj b/Discord Media Loader/Discord Media Loader.csproj index 0245593..1977f71 100644 --- a/Discord Media Loader/Discord Media Loader.csproj +++ b/Discord Media Loader/Discord Media Loader.csproj @@ -32,6 +32,9 @@ prompt 4 + + Serraniel-64x64.ico + ..\packages\Discord.Net.0.9.6\lib\net45\Discord.Net.dll @@ -74,6 +77,12 @@ + + Form + + + LoginForm.cs + Form @@ -82,6 +91,12 @@ + + LoginForm.cs + + + MainForm.cs + ResXFileCodeGenerator Resources.Designer.cs @@ -105,6 +120,9 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAABAAEAQEAAAAEAIAAoQgAAFgAAACgAAABAAAAAgAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8b////VP///3////+m////zP// + /+T////1//////////r////u////3f///8z///+m////f////1T///8b////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////M////5D////b//////// + //////////////////////////////////////////////////////////////////////////////// + /9v///+Q////M////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///w3///90////1v// + //////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////W////dP///w3///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A2K4AANiuAADYrgAA2K4AANiuAADfswAA////EP// + /4D////t////////////////////////////////////////////////9/zq/7XiQ/+340n/w+ho/9Pu + kf/m9b//+Pzt///////////////////////////////////////////////////////////t////gf// + /xCa2AAAmtgAAJrYAACa2AAAmtgAAJrYAAD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////ANiuAADYrgAA2K4AANiu + AAD///8B////Yf///+v//////////////////////////////////////////////////////////+z4 + z/+a2AD/mtgA/5rYAP+a2AD/mtgA/6TcGf+65VL/3fKo//n98P////////////////////////////// + ///////////////////////r////Yf///wGa2AAAmtgAAJrYAACa2AAA////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wDYrgAA2K4AANiuAAD///8k////xP////////////////////////////////////////////////// + ///////////////////h87P/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+n3SD/zOt+//X7 + 5v/////////////////////////////////////////////////////E////I5rYAACa2AAAmtgAAP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A2K4AANiuAAD///9V////8f////////////////////////////////// + ////////////////////////////////////////0+6Q/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rY + AP+a2AD/mtgA/5rYAP+k3Bn/0e2K//v+9v////////////////////////////////////////////// + //H///9VmtgAAJrYAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wH///+M//////////////////////// + /////////////////////////////////////////////////////////////8bpbv+a2AD/mtgA/5rY + AP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+u4DP/5/bD//////////////////// + /////////////////////////////////4z///8B////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wb///+l//////// + //////////////////////////////////////////////////////////////////////////////// + //+55E//mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5zZ + Bv/P7Ib/////////////////////////////////////////////////////pf///wb///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wb///+3//////////////////////////////////////////////////////////////////////// + ///////////////////+//3/rd8x/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rY + AP+a2AD/mtgA/5rYAP+a2AD/mtgA/7zlV//5/fH///////////////////////////////////////// + //////+3////Bv///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wH///+k//////////////////////////////////////////////////////// + ////////////////////////////////////////+f3v/6PcF/+a2AD/mtgA/5rYAP+a2AD/mtgA/5rY + AP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/seE7//X75v////////////// + /////////////////////////////////6T///8B////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///+K//////////////////////////////////////// + /////////////////////////////////////////////////////////////+751f+a2AD/mtgA/5rY + AP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rY + AP+s3y7/9Pvi////////////////////////////////////////////////i////wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///9V//////////////////////// + //////////////////////////////////////////////////////////////////////////////// + ///s+M//rd8w/6XcHf+c2Qb/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rY + AP+a2AD/mtgA/5rYAP+a2AD/mtgA/6zfLv/1++f///////////////////////////////////////// + //////9V////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8j////8P// + //////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////v/6/fL/8PnZ/97yrP/E6Gv/qd4l/5rYAP+a2AD/mtgA/5rY + AP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/suE8//v99P////////////// + ////////////////////////////8P///yP///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8B////xP////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////v9 + 9f/e8qz/s+JA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rY + AP/A51/////////////////////////////////////////////////E////Af///wD///8A////AP// + /wD///8A////AP///wD///8A////Yf////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////f867/rN8t/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rY + AP+a2AD/mtgA/5rYAP+a2AD/mtgA/9jwnP////////////////////////////////////////////// + /2H///8A////AP///wD///8A////AP///wD///8A////EP///+r///////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////r98//I6nX/mtgA/5rY + AP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+h2xL/8/rh//////////////////// + ///////////////////////q////Ev///wD///8A////AP///wD///8A////AP///3////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + /////////////9/yrf+h2xL/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/8Dn + X////////////////////////////////////////////////4D///8A////AP///wD///8A////AP// + /w3////u//////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////7PjQ/6reKP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rY + AP+a2AD/mtgA/5rYAP+c2QX/7vjT///////////////////////////////////////////u////Df// + /wD///8A////AP///wD///90//////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////0++L/qd4n/5rY + AP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/8PoaP////////////////////////////// + /////////////////3T///8A////AP///wD///8B////2/////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + /////////////+360P+k4g3/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP+j2xb/+Pzu//// + ///////////////////////////////////////b////Af///wD///8A////O/////////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////wNCY/53dAP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rY + AP+a2AD/mtgA/9/zr////////////////////////////////////////////////zv///8A////AP// + /5D///////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////f39/+Puin/n+AA/5rY + AP+a2AD/mtgA/5rYAP+a2AD/mtgA/5rYAP/F6W3///////////////////////////////////////// + //////+Q////AP///wD////Y//////////////////////////////////////////////////////// + /////////////////////////////+3t7f+3t7f/jIyM/3Nzc/9oaGj/a2tr/35+fv+dnZ3/xsbG//Hx + 8f////////////////////////////////////////////////////////////////////////////// + ////////iZNy/5zbAP+b2QD/mtgA/5rYAP+a2AD/mtgA/5rYAP+a2AD/s+JA//////////////////// + ////////////////////////////2f///wD///8d//////////////////////////////////////// + ////////////////////////////////////////9fTx/46Pk/9BQUH/Li4u/y4uLv8uLi7/Li4u/y4u + Lv8uLi7/Li4u/y4uLv9ERET/fn5+/8rKyv////////////////////////////////////////////// + /////////////////////////////4iHjP98qA3/n+AA/5rYAP+a2AD/mtgA/5rYAP+a2AD/mtgA/6ne + J/////////////////////////////////////////////////////8e////Vv////////////////// + ////////////////////////////////////////////////////////+fDL/45/Qv8kJjH/Li4u/y4u + Lv8uLi7/Li4u/y4uLv8uLi7/Li4u/y4uLv8uLi7/Li4u/y4uLv8uLi7/Xl5e/7e3t//+/v7///////// + //////////////////////////////////////////////////9vbXX/T2Ig/57fAP+a2QD/mtgA/5rY + AP+a2AD/mtgA/5rYAP+l3Bz/////////////////////////////////////////////////////Vv// + /4T/////////////////////////////////////////////////////////////////////8+ax/+O5 + D/92ZBv/JCYx/y4uLv8uLi7/Li4u/y4uLv8uLi7/Li4u/y4uLv8uLi7/Li4u/y4uLv8uLi7/Li4u/y4u + Lv8uLi7/YGBg/8jIyP/////////////////////////////////////////////////09PT/QkJE/zEz + Lf+Mwgb/nd0A/5rYAP+a2AD/mtgA/5rYAP+a2AD/pdwb//////////////////////////////////// + /////////////////4T///+t//////////////////////////////////////////////////////// + ////////8+ez/9mwB//htQD/dWMb/yQnMf8uLi7/Li4u/y4uLv8uLi7/Li4u/y4uLv8uLi7/Li4u/y4u + Lv8uLi7/Li4u/y4uLv8uLi7/Li4u/y4uLv8uLi7/dHR0/97e3v////////////////////////////// + ////////r6+v/y4uLv8nIzH/bZET/6HiAP+a2AD/mtgA/5rYAP+a2AD/mtgA/6neJv////////////// + //////////////////////////////////////+t////zP////////////////////////////////// + ////////////////////////+PHS/9qyDv/YrgD/4rUA/3lmGf8kJjH/Li4u/y4uLv8uLi7/Li4u/y4u + Lv8uLi7/Li4u/y4uLv8uLi7/Li4u/y4uLv8uLi7/Ozs7/1ZWVv90dHT/jo6O/5mZmf/Hx8f//v7+//// + ////////////////////////7+/v/0dHR/8uLi7/KCUw/1BkH/+f4AD/mtgA/5rYAP+a2AD/mtgA/5rY + AP+z4T7/////////////////////////////////////////////////////zP///+X///////////// + /////////////////////////////////////////v35/+C/N//YrgD/2K4A/+O2AP+Dbhf/IyYx/y4u + Lv8uLi7/Li4u/y4uLv8uLi7/Li4u/y4uLv8uLi7/Li4u/1VVVf+QkJD/xsbG/+rq6v////////////// + ////////////////////////////////////////+vr6/2tra/8uLi7/Li4u/yspL/86Qij/ltEC/5va + AP+a2AD/mtgA/5rYAP+a2AD/x+ly//////////////////////////////////////////////////// + /+D////y//////////////////////////////////////////////////////Dfm//YrgD/2K4A/9iu + AP/itQD/k3oT/yUnMf8uLi7/Li4u/y4uLv8uLi7/Li4u/y4uLv8uLi7/cHBw/8bGxv/8/Pz///////// + ////////////////////////////////////////////////////////7+/v/3BwcP8uLi7/Li4u/y4u + Lv8tLC7/Ly8u/4e7CP+e3gD/mtgA/5rYAP+a2AD/mtgA/+X1vf////////////////////////////// + ///////////////////////s//////////////////////////////////////////////////////79 + +f/euyr/2K4A/9iuAP/YrgD/4LQA/6iKDf8oKTD/Li4u/y4uLv8uLi7/Li4u/y4uLv9QUFD/xMTE//// + ////////////////////////////////////////////////////////////////////////w8PD/1BQ + UP8uLi7/Li4u/y4uLv8uLi7/Li4u/yknMP95pA7/n+EA/5rYAP+a2AD/mtgA/6neJ//8/vj///////// + ////////////////////////////////////////////+f////////////////////////////////// + ///////////////////168D/2K4A/9iuAP/YrgD/2K4A/92yAP+/mwf/MTAt/ywtLv8uLi7/Li4u/y4u + Lv9wcHD/8PDw//////////////////////////////////////////////////////////////////r6 + +v/ExMT/bm5u/y4uLv8uLi7/Li4u/y4uLv8uLi7/Li4u/y4uLv8oJDH/a44U/6HiAP+a2AD/mtgA/5rY + AP/W75j///////////////////////////////////////////////////////////n////y//////// + ////////////////////////////////////////6tR3/9iuAP/YrgD/2K4A/9iuAP/arwD/06oB/0VA + J/8pKi//Li4u/y4uLv9ra2v/+vr6//////////////////////////////////////////////////39 + /f/n5+f/wsLC/4yMjP9SUlL/Li4u/y4uLv8uLi7/Li4u/y4uLv8uLi7/Li4u/y4uLv8uLi7/JyMx/2F+ + GP+h4wD/mtgA/5rYAP+v4DX//P74//////////////////////////////////////////////////// + ///////s////5f///////////////////////////////////////////////+LDQv/YrgD/2K4A/9iu + AP/YrgD/2K4A/+C0AP9oWh7/JCcx/y4uLv9GRkb/7u7u/////////////////////////////v7+/8fH + x/+VlZX/iYmJ/3BwcP9TU1P/OTk5/y4uLv8uLi7/Li4u/y4uLv8uLi7/Li4u/y4uLv8uLi7/Li4u/y4u + Lv8uLi7/Li4u/ygkMf9bdRv/oOEA/5rYAP+g2g7/7fjR//////////////////////////////////// + ////////////////////////////4P///8z///////////////////////////////////////////// + ///euyj/2K4A/9iuAP/YrgD/2K4A/9iuAP/itQD/ln0S/yQnMf8uLi7/ra2t//////////////////// + ///////////////////i4uL/e3t7/y4uLv8uLi7/Li4u/y4uLv8uLi7/Li4u/y4uLv8uLi7/Li4u/y4u + Lv8uLi7/Li4u/y4uLv8uLi7/Li4u/y4uLv8oJDH/WXEc/6DhAP+d2Qf/4fOy//////////////////// + /////////////////////////////////////////////////8z///+t//////////////////////// + ////////////////////////3Lcc/9iuAP/YrgD/2K4A/9iuAP/YrgD/3LEA/8agBf82NCz/Pj9C//T0 + 9P/////////////////////////////////////////////////Ozs7/ZmZm/y4uLv8uLi7/Li4u/y4u + Lv8uLi7/Li4u/y4uLv8uLi7/Li4u/y4uLv8uLi7/Li4u/y4uLv8uLi7/KCQx/1pzHP+m4w//4POx//// + //////////////////////////////////////////////////////////////////////+t////hP// + /////////////////////////////////////////////9y3Hf/YrgD/2K4A/9iuAP/YrgD/2K4A/9iu + AP/gtAD/Z1ke/2lrcv////////////////////////////////////////////////////////////// + //++vr7/ZGRk/y4uLv8uLi7/Li4u/y4uLv8uLi7/Li4u/y4uLv8uLi7/Li4u/y4uLv8uLi7/Li4u/ygk + Mf93i0X/7PnL//////////////////////////////////////////////////////////////////// + ////////////hP///1T////////////////////////////////////////////////euyr/2K4A/9iu + AP/YrgD/2K4A/9iuAP/YrgD/4LQA/66OC/+Dg4b///////////////////////////////////////// + ///////////////////////////////////Pz8//hISE/0hISP8uLi7/Li4u/y4uLv8uLi7/Li4u/y4u + Lv8uLi7/Li4u/0JCQv+RkJX/9PXy//////////////////////////////////////////////////// + /////////////////////////////////1b///8c//////////////////////////////////////// + ////////48RG/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9mvAP/dsgD/kopq//////////////////// + ///////////////////////////////////////////////////////////////////09PT/y8vL/6Ki + ov+Dg4P/cXFx/21tbf94eHj/kJCQ/7q6uv/v7+////////////////////////////////////////// + //////////////////////////////////////////////////////8d////AP///9f///////////// + /////////////////////////////+rTdP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/4LQA/72f + Iv/09PT///////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////Y////AP// + /wD///+P///////////////////////////////////////////06Lb/2K4A/9iuAP/YrgD/2K4A/9iu + AP/YrgD/2K4A/9iuAP/esgD/zsKO//////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + ////////////kP///wD///8A////Ov///////////////////////////////////////////fvx/9y2 + Gv/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/+G3Cf/578j///////////////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////zr///8A////AP///wH////a//////////////////////// + ///////////////////p0nD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/3bgh//r0 + 3P////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////9v///8B////AP///wD///8A////dP// + ////////////////////////////////////////+fPZ/9mxCP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iu + AP/YrgD/2K4A/9iuAP/duCH/9+7I//////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////90////AP// + /wD///8A////AP///wz////t///////////////////////////////////////////oz2n/2K4A/9iu + AP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9qyDf/x4qT///////////////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + ///////t////Df///wD///8A////AP///wD///8A////f/////////////////////////////////// + ////////+/fm/9u1Fv/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/+nQ + bP/8+u7///////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + ////////////////////////////f////wD///8A////AP///wD///8A////AP///xD////q//////// + ///////////////////////////////////x4qX/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iu + AP/YrgD/2K4A/9iuAP/YrgD/3ron//Hipf///v3///////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////6v///xD///8A////AP///wD///8A////AP// + /wD///8A////YP///////////////////////////////////////////////+jPaf/YrgD/2K4A/9iu + AP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/4cA5//HipP/9+/H///////// + //////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////2H///8A////AP// + /wD///8A////AP///wD///8A////AP///wH////D//////////////////////////////////////// + ///+/fj/4sRE/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iu + AP/YrgD/3bgf/+fNY//x4qX/+PHT//367//+/vv////+//////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + /8P///8B////AP///wD///8A////AP///wD///8A////AP///wD///8A////Iv////D///////////// + //////////////////////////////z57f/gvzX/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iu + AP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9ivA//cthj/37wr//fuyv////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////D///8i////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///9U////////////////////////////////////////////////+/jo/+C/Nf/YrgD/2K4A/9iu + AP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iu + AP/48NH///////////////////////////////////////////////////////////////////////// + //////////////////////////////////////9V////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///4j///////////////////////////////////////////// + ///8+ev/4sND/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iu + AP/YrgD/2K4A/9iuAP/btBP//Pns//////////////////////////////////////////////////// + //////////////////////////////////////////////////////+J////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8B////pP////////////////// + //////////////////////////////789v/nzGD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iu + AP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/37wt///+/P////////////////////////////// + //////////////////////////////////////////////////////////////////////+k////Af// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wb///+3/////////////////////////////////////////////////////+7bj//asQr/2K4A/9iu + AP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/+PGSv////////////// + //////////////////////////////////////////////////////////////////////////////// + //////+3////Bv///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////Bv///6X///////////////////////////////////////////// + ////////9+7K/+HBO//YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A/9iu + AP/oz2n///////////////////////////////////////////////////////////////////////// + //////////////////////+l////Bv///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8B////jP////////////////// + ///////////////////////////////////+/fr/7t2T/924Hv/YrgD/2K4A/9iuAP/YrgD/2K4A/9iu + AP/YrgD/2K4A/9iuAP/YrgD/7dqL//////////////////////////////////////////////////// + //////////////////////////////////////+M////Af///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A2K4AANiu + AAD///9V////8f/////////////////////////////////////////////////////8+ev/7dmH/966 + Jv/YrgD/2K4A/9iuAP/YrgD/2K4A/9iuAP/YrgD/2K4A//Plrv////////////////////////////// + //////////////////////////////////////////////////H///9VmtgAAJrYAAD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////ANiuAADYrgAA2K4AAP///yT////E//////////////////////////////////////// + ///////////////////9/PT/8+av/+bLWv/duB7/2K4A/9iuAP/YrgD/2K4A/9iuAP/37sv///////// + /////////////////////////////////////////////////////////////////8T///8jmtgAAJrY + AACa2AAA////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wDYrgAA2K4AANiuAADYrgAA////Af///2D////r//////// + /////////////////////////////////////////////////////////fvx//btxv/v3pf/6dJw/+TH + T//jxEX/+/jo////////////////////////////////////////////////////////////////6/// + /2D///8BmtgAAJrYAACa2AAAmtgAAP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////EP///3/////t//////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + ///////t////f////xD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////Df///3T////V//////////////////////// + //////////////////////////////////////////////////////////////////////////////// + /////////////////9X///90////Df///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /zP///+N////1/////////////////////////////////////////////////////////////////// + ///////////////////////X////jf///zP///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8b////VP///33///+l////y////+P////y//////// + ///////y////4////8v///+l////ff///1T///8b////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP// + /wD///8A////4Af///////wAAD//////8AAAD/////+AAAAB/////wAAAAD////8AAAAAD////gAAAAA + H///4AAAAAAH///AAAAAAAP//4AAAAAAAf//AAAAAAAA//4AAAAAAAB//gAAAAAAAH/8AAAAAAAAP/gA + AAAAAAAf+AAAAAAAAB/wAAAAAAAAD/AAAAAAAAAH4AAAAAAAAAfgAAAAAAAAB8AAAAAAAAADwAAAAAAA + AAOAAAAAAAAAAYAAAAAAAAABgAAAAAAAAAGAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAIAAAAAAAAABgAAAAAAAAAGAAAAAAAAAAYAAAAAAAAABwAAAAAAAAAPAAAAAAAAAA+AA + AAAAAAAH4AAAAAAAAAfwAAAAAAAAD/AAAAAAAAAP+AAAAAAAAB/4AAAAAAAAH/wAAAAAAAA//gAAAAAA + AH/+AAAAAAAAf/8AAAAAAAD//4AAAAAAAf//wAAAAAAD///gAAAAAAf///gAAAAAH////AAAAAA///// + AAAAAP/////AAAAD//////AAAA///////AAAP///////4Af///8= + + + \ No newline at end of file diff --git a/Discord Media Loader/Properties/AssemblyInfo.cs b/Discord Media Loader/Properties/AssemblyInfo.cs index c941cf7..8e8f6ae 100644 --- a/Discord Media Loader/Properties/AssemblyInfo.cs +++ b/Discord Media Loader/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Discord Media Loader")] -[assembly: AssemblyCopyright("Copyright © 2017")] +[assembly: AssemblyCopyright("Copyright © 2017 by Serraniel")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern // übernehmen, indem Sie "*" eingeben: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("0.1.0.22")] +[assembly: AssemblyFileVersion("0.1.0.22")] diff --git a/Discord Media Loader/Properties/Settings.Designer.cs b/Discord Media Loader/Properties/Settings.Designer.cs index c7eab6a..89a3e69 100644 --- a/Discord Media Loader/Properties/Settings.Designer.cs +++ b/Discord Media Loader/Properties/Settings.Designer.cs @@ -1,30 +1,38 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 +// Dieser Code wurde von einem Tool generiert. +// Laufzeitversion:4.0.30319.42000 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +// der Code erneut generiert wird. // //------------------------------------------------------------------------------ -namespace Discord_Media_Loader.Properties -{ - - +namespace Discord_Media_Loader.Properties { + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase - { - + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default - { - get - { + + public static Settings Default { + get { return defaultInstance; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string email { + get { + return ((string)(this["email"])); + } + set { + this["email"] = value; + } + } } } diff --git a/Discord Media Loader/Properties/Settings.settings b/Discord Media Loader/Properties/Settings.settings index 3964565..1b74a55 100644 --- a/Discord Media Loader/Properties/Settings.settings +++ b/Discord Media Loader/Properties/Settings.settings @@ -1,7 +1,9 @@  - - - - - - + + + + + + + + \ No newline at end of file diff --git a/Discord Media Loader/Serraniel-64x64.ico b/Discord Media Loader/Serraniel-64x64.ico new file mode 100644 index 0000000000000000000000000000000000000000..485aa3e9ef03282b9f93d1456faf6617dd18a46f GIT binary patch literal 16958 zcmd5^eNa@_6@S)=q#vlG9h20rG=6}Ipo~pBhE7!CSNo5SMmw=H78}Q!QmjU8Ol^dY zPK<^k)-jD$<3}{rj7ZTa2^ytB(Ge>enpD1)Wl>Oc7Z8x$Wp_`{@4;Qy{d)H;yXtWc z_q}(|J?H$+J@?*s@9wH7z4+hc$qN5{R*6kgltGH3#4__EC7l`10}&A^5$3_H|5fHR z=1-U}F<)nHX9n4sEzH%-sDn%zGuohSr2UJ8{t4`N7IP(YPYF7p3pyj=Yq)eqvwy3Y zzhRCPK{sr`R=E6@(sS*oqIh%7aRqJrGp93~nKh}y(MTsuuTWmyU`QYy1-rTX@> zWOYb27y2RmXXgHYzosbunCql)$;x?S=XSlA7ct*vmZm$_QeuC7_(0V&lz(FmRo^{C zHfOV}KG=p2y}V<<&mxAOb&q5&V%ANyt;c<^d&lD+)z8wU+v}*kvtCv|d>P>x1HO+4 ze%3pWxrI3-Dzjv1;urBiPFyu_rcT#A8C&pao`?ZohZR5TL%wG)_lSybEtAGC;&9YB zfg0`=%G!mG@HL$H`>?))vJM23`{Md6-S`oQUFChK^v=7%RD0IJSNI%`7(h>+r}9v* zUF4+fnuL(>i(EK;;}<+XN)12w+|w8!j}C;2*Snp~*+d^#J=G)ph(m5|qU_uV-+M9^ zHhW{}$-Tw)b&s)&JUCJlPi>th8F$`ip-{#F=J~J^*8c38@pQ0is5+hnmQYK?puMv} z#z$b$6N3>fFZ~iC>?(hPEY>nD|A7%$y>kHP3XdgWoj+`dk%|G%6eI{( zJ@I2+498iOgz3;k%=RmEz!a?+gO4i*@mY#y8UrgZix?z^=GDV(RdD4)+Fk8?cH%uh z)U@WvI0noDf0j&xM=jIQ(Lr1C$Iu>Q@EH92R;rAvz%1}zlW7o4#%wlIUS1w$WMt6F zl`CoK(xsG=l0xg&t)tz$cT;h3F}1Wv?c0Kxp-tP~q+OK??JN%*1H4B`P&vy0|4<3p zfFkW}EtI)s8%>!qh2rDmgYwj=Q`LA}ym&F7KCO!PHfGSD4n+se0nC+>G>qluOUn9) z*_ulzGcAcmj!p=Q+h1H3E?lVQi_7Km(Hrc+?^9RPtY1G%AJuUG2gregRYQWQ@T>#& z4W18VuUqSLsqTw@^oPZRL&7g&lAN4O7cN|oGTYYHMoCFiDPck!Wt{61a4tMpHCRd? z3juq!tgw)4Z8%Ql|BRyA6AG<iy4tXsaprq zK9m1B;ILt|-}ZhU0y{o)lO}7+S5$GVFY)IAWMcepFL@@U{!dIyr1|sb6L4o{X3~xw zJLvrR^Au=2G&MERj2Saj{IR3P)9l5=1I_`*YhRYd1MD|sg?s-{IsWI(n@3q$S?XHQ*eJivvfJ(IS|W1gg)!skrKDK;;Oe(%XN7MLoWJ#^EF>cf z-jx+@uG#6vF8Y7l9|zJXjr?D}e7TC*;c&>Ba?7FL(OzIj88^LT7hIQNs8*8XNcE+K)bK zZpN{bK0>Y|X3Lf>^NU-=Aa-N|rDT5JXAbKAy$MxK~b7|tliBgz7 z$s$R`eya^{PzBJ!LTeNv(f|Q?Y*WV-5V^odItA+1bHgCrl<2tzElT zH(pQdxCZ{$Rt!<`?=I(ek=A3LxMZ(^J-EZ&nyT`K_{Cq9t5EUYC+NpN8cQ!vN+P_Y z$j7fhoz%KRvTa`D|FMcrwe)HNedLu=8-F5qN z=FAydym+zhH~{}!?@yyUwi36l5H5iIRhf3)Yaeh6#vE`o^SiWu{kt-%{K}M;mePg| z8))XtnVPXkN=l-wS=*_tU25v~Yp?qu_CHdarMjZ&ZoC4wD9d>rz*_j%&A$z1OR5gz zr=+BW_V3@%@mxGkKea|vY%bCuO zda67zNIC|H!>ud7BZuApokBFWXtN$ zhf~9UURQI%+EPYNdlR31cCu-Gp9gRQSpp`{&pf^R-ShrAmeoAGaoEg!9{OU)F>uE! zr#HV_JWVyHU!V@lMOi$0jL+g#BJpqpws)+smMc_xtc1AK6>2cQSXrtEp9I7u_5HKe?EFqs|!k35g`zH|x zwuc-`X1>j=i}3Dy&s-9mrndv`7g|x=gKUjMbH6VkNfYR z1I2DI`;NWDJIq*@G0D|2dwzIIR zK#Bi3fD5ix1*|BC6B$u*%L0_WRdKZeZn=T0t4tH6+ME@r%~^pc*&3){cNt~G9V<5S zAEu}RwNQGCGQI1*SD>=1I&yyl*%i+Vx=g$MHFn)ciP8&iKM@B}ia3e5iBjzbbVNE7 ka>o>) Date: Sat, 28 Jan 2017 22:28:23 +0100 Subject: [PATCH 4/8] First Try Download --- Discord Media Loader/MainForm.Designer.cs | 23 +++-- Discord Media Loader/MainForm.cs | 96 ++++++++++++++++++- .../Properties/AssemblyInfo.cs | 4 +- 3 files changed, 107 insertions(+), 16 deletions(-) diff --git a/Discord Media Loader/MainForm.Designer.cs b/Discord Media Loader/MainForm.Designer.cs index 431204a..86d84ba 100644 --- a/Discord Media Loader/MainForm.Designer.cs +++ b/Discord Media Loader/MainForm.Designer.cs @@ -38,7 +38,7 @@ this.dtpLimit = new System.Windows.Forms.DateTimePicker(); this.btnSearch = new System.Windows.Forms.Button(); this.lbPath = new System.Windows.Forms.Label(); - this.textBox1 = new System.Windows.Forms.TextBox(); + this.tbxPath = new System.Windows.Forms.TextBox(); this.btnDownload = new System.Windows.Forms.Button(); this.SuspendLayout(); // @@ -89,12 +89,15 @@ // cbLimitDate // this.cbLimitDate.AutoSize = true; + this.cbLimitDate.Checked = true; + this.cbLimitDate.CheckState = System.Windows.Forms.CheckState.Checked; this.cbLimitDate.Location = new System.Drawing.Point(15, 73); this.cbLimitDate.Name = "cbLimitDate"; this.cbLimitDate.Size = new System.Drawing.Size(137, 17); this.cbLimitDate.TabIndex = 5; this.cbLimitDate.Text = "Only media posted after"; this.cbLimitDate.UseVisualStyleBackColor = true; + this.cbLimitDate.CheckedChanged += new System.EventHandler(this.cbLimitDate_CheckedChanged); // // dtpLimit // @@ -112,6 +115,7 @@ this.btnSearch.TabIndex = 9; this.btnSearch.Text = "..."; this.btnSearch.UseVisualStyleBackColor = true; + this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click); // // lbPath // @@ -122,12 +126,12 @@ this.lbPath.TabIndex = 8; this.lbPath.Text = "Path:"; // - // textBox1 + // tbxPath // - this.textBox1.Location = new System.Drawing.Point(50, 107); - this.textBox1.Name = "textBox1"; - this.textBox1.Size = new System.Drawing.Size(342, 20); - this.textBox1.TabIndex = 7; + this.tbxPath.Location = new System.Drawing.Point(50, 107); + this.tbxPath.Name = "tbxPath"; + this.tbxPath.Size = new System.Drawing.Size(342, 20); + this.tbxPath.TabIndex = 7; // // btnDownload // @@ -137,14 +141,15 @@ this.btnDownload.TabIndex = 10; this.btnDownload.Text = "Start downloading"; this.btnDownload.UseVisualStyleBackColor = true; + this.btnDownload.Click += new System.EventHandler(this.btnDownload_Click); // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(439, 177); + this.ClientSize = new System.Drawing.Size(439, 202); this.Controls.Add(this.btnDownload); - this.Controls.Add(this.textBox1); + this.Controls.Add(this.tbxPath); this.Controls.Add(this.lbPath); this.Controls.Add(this.btnSearch); this.Controls.Add(this.dtpLimit); @@ -177,7 +182,7 @@ private System.Windows.Forms.DateTimePicker dtpLimit; private System.Windows.Forms.Button btnSearch; private System.Windows.Forms.Label lbPath; - private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.TextBox tbxPath; private System.Windows.Forms.Button btnDownload; } } \ No newline at end of file diff --git a/Discord Media Loader/MainForm.cs b/Discord Media Loader/MainForm.cs index 06669fd..1ac10e2 100644 --- a/Discord Media Loader/MainForm.cs +++ b/Discord Media Loader/MainForm.cs @@ -2,8 +2,11 @@ using System.Collections.Generic; using System.ComponentModel; using System.Data; +using System.Diagnostics; using System.Drawing; +using System.IO; using System.Linq; +using System.Net; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; @@ -72,8 +75,7 @@ namespace Discord_Media_Loader } else { - foreach (var guild in Client.Servers) - cbGuilds.Items.Add(guild.Name); + cbGuilds.Items.AddRange((from g in Client.Servers orderby g.Name select g.Name).ToArray()); cbGuilds.SelectedIndex = 0; @@ -101,10 +103,9 @@ namespace Discord_Media_Loader if (guild != null) { cbChannels.Items.Clear(); - foreach (var channel in guild.TextChannels) - cbChannels.Items.Add(channel.Name); + cbChannels.Items.AddRange((from c in guild.TextChannels orderby c.Position select c.Name).ToArray()); - cbChannels.Text = guild.TextChannels.First()?.Name; + cbChannels.SelectedIndex = 0; } } finally @@ -112,5 +113,90 @@ namespace Discord_Media_Loader Cursor = Cursors.Default; } } + + private void cbLimitDate_CheckedChanged(object sender, EventArgs e) + { + dtpLimit.Enabled = cbLimitDate.Checked; + } + + private void btnSearch_Click(object sender, EventArgs e) + { + var dlg = new FolderBrowserDialog(); + if (dlg.ShowDialog() == DialogResult.OK) + { + tbxPath.Text = dlg.SelectedPath; + } + } + + private async void btnDownload_Click(object sender, EventArgs e) + { + var path = tbxPath.Text; + var useStopDate = cbLimitDate.Checked; + var stopDate = dtpLimit.Value; + + if (!Directory.Exists(path)) + { + MessageBox.Show("Please enter an existing directory."); + return; + } + + Enabled = false; + + var guild = FindServerByName(cbGuilds.Text); + var channel = FindChannelByName(guild, cbChannels.Text); + + var clients = new List(); + + var limit = 100; + var stop = false; + ulong lastId = ulong.MaxValue; + var isFirst = true; + + while (!stop) + { + Discord.Message[] messages; + + if (isFirst) + messages = await channel.DownloadMessages(limit, null, Relative.Before, true); + else + messages = await channel.DownloadMessages(limit, lastId, Relative.Before, true); + + isFirst = false; + + foreach (var m in messages) + { + if (m.Id < lastId) + lastId = m.Id; + + if (useStopDate && m.Timestamp < stopDate.Date) + { + stop = true; + continue; + } + + foreach (var a in m.Attachments) + { + var wc = new WebClient(); + clients.Add(wc); + + wc.DownloadFileCompleted += (wcSender, wcE) => clients.Remove((WebClient)wcSender); + wc.DownloadFile(new Uri(a.Url), $@"{path}\{a.Filename}"); + } + } + + stop = stop || messages.Length < limit; + } + + await Task.Run(() => + { + while (clients.Count > 0) + { + // wait until download finished + } + }); + + Enabled = true; + Process.Start(path); + } } } diff --git a/Discord Media Loader/Properties/AssemblyInfo.cs b/Discord Media Loader/Properties/AssemblyInfo.cs index 8e8f6ae..f5e729e 100644 --- a/Discord Media Loader/Properties/AssemblyInfo.cs +++ b/Discord Media Loader/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern // übernehmen, indem Sie "*" eingeben: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.1.0.22")] -[assembly: AssemblyFileVersion("0.1.0.22")] +[assembly: AssemblyVersion("0.1.0.28")] +[assembly: AssemblyFileVersion("0.1.0.28")] From a7c60b23e0d9ed5dfab3a025db794e4b32f00968 Mon Sep 17 00:00:00 2001 From: Serraniel Date: Sat, 28 Jan 2017 22:44:17 +0100 Subject: [PATCH 5/8] Doing this with threads --- Discord Media Loader/MainForm.cs | 13 +++++++++++-- Discord Media Loader/Properties/AssemblyInfo.cs | 4 ++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Discord Media Loader/MainForm.cs b/Discord Media Loader/MainForm.cs index 1ac10e2..138fc66 100644 --- a/Discord Media Loader/MainForm.cs +++ b/Discord Media Loader/MainForm.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -14,6 +15,7 @@ using Discord; using Discord.Net; using Nito.AsyncEx; using ConnectionState = Discord.ConnectionState; +using Message = Discord.Message; namespace Discord_Media_Loader { @@ -176,11 +178,18 @@ namespace Discord_Media_Loader foreach (var a in m.Attachments) { + while (clients.Count > 50) + { + // wait + } var wc = new WebClient(); clients.Add(wc); - wc.DownloadFileCompleted += (wcSender, wcE) => clients.Remove((WebClient)wcSender); - wc.DownloadFile(new Uri(a.Url), $@"{path}\{a.Filename}"); + wc.DownloadFileCompleted += (wcSender, wcE) => + { + clients.Remove(wc); + }; + wc.DownloadFileAsync(new Uri(a.Url), $@"{path}\{a.Filename}"); } } diff --git a/Discord Media Loader/Properties/AssemblyInfo.cs b/Discord Media Loader/Properties/AssemblyInfo.cs index f5e729e..1719601 100644 --- a/Discord Media Loader/Properties/AssemblyInfo.cs +++ b/Discord Media Loader/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern // übernehmen, indem Sie "*" eingeben: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.1.0.28")] -[assembly: AssemblyFileVersion("0.1.0.28")] +[assembly: AssemblyVersion("0.1.0.31")] +[assembly: AssemblyFileVersion("0.1.0.31")] From c25f5bbb0adfff5cee1342bfdfdbb1a63101d928 Mon Sep 17 00:00:00 2001 From: Serraniel Date: Sun, 29 Jan 2017 09:34:04 +0100 Subject: [PATCH 6/8] Things I have done over night --- Discord Media Loader/MainForm.Designer.cs | 233 +++++++++++------- Discord Media Loader/MainForm.cs | 166 +++++++++---- .../Properties/AssemblyInfo.cs | 4 +- 3 files changed, 274 insertions(+), 129 deletions(-) diff --git a/Discord Media Loader/MainForm.Designer.cs b/Discord Media Loader/MainForm.Designer.cs index 86d84ba..13cf921 100644 --- a/Discord Media Loader/MainForm.Designer.cs +++ b/Discord Media Loader/MainForm.Designer.cs @@ -29,62 +29,68 @@ private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); - this.lbGuild = new System.Windows.Forms.Label(); - this.cbGuilds = new System.Windows.Forms.ComboBox(); - this.lbUsername = new System.Windows.Forms.Label(); - this.cbChannels = new System.Windows.Forms.ComboBox(); - this.lbChannel = new System.Windows.Forms.Label(); - this.cbLimitDate = new System.Windows.Forms.CheckBox(); - this.dtpLimit = new System.Windows.Forms.DateTimePicker(); - this.btnSearch = new System.Windows.Forms.Button(); this.lbPath = new System.Windows.Forms.Label(); + this.btnSearch = new System.Windows.Forms.Button(); this.tbxPath = new System.Windows.Forms.TextBox(); + this.dtpLimit = new System.Windows.Forms.DateTimePicker(); this.btnDownload = new System.Windows.Forms.Button(); + this.cbLimitDate = new System.Windows.Forms.CheckBox(); + this.lbThread = new System.Windows.Forms.Label(); + this.cbChannels = new System.Windows.Forms.ComboBox(); + this.nupThreadCount = new System.Windows.Forms.NumericUpDown(); + this.lbChannel = new System.Windows.Forms.Label(); + this.lbScanCount = new System.Windows.Forms.Label(); + this.lbUsername = new System.Windows.Forms.Label(); + this.lbDownload = new System.Windows.Forms.Label(); + this.cbGuilds = new System.Windows.Forms.ComboBox(); + this.lbGuild = new System.Windows.Forms.Label(); + this.pgbProgress = new System.Windows.Forms.ProgressBar(); + ((System.ComponentModel.ISupportInitialize)(this.nupThreadCount)).BeginInit(); this.SuspendLayout(); // - // lbGuild + // lbPath // - this.lbGuild.AutoSize = true; - this.lbGuild.Location = new System.Drawing.Point(12, 35); - this.lbGuild.Name = "lbGuild"; - this.lbGuild.Size = new System.Drawing.Size(34, 13); - this.lbGuild.TabIndex = 0; - this.lbGuild.Text = "Guild:"; + this.lbPath.AutoSize = true; + this.lbPath.Location = new System.Drawing.Point(12, 110); + this.lbPath.Name = "lbPath"; + this.lbPath.Size = new System.Drawing.Size(32, 13); + this.lbPath.TabIndex = 8; + this.lbPath.Text = "Path:"; // - // cbGuilds + // btnSearch // - this.cbGuilds.FormattingEnabled = true; - this.cbGuilds.Location = new System.Drawing.Point(52, 32); - this.cbGuilds.Name = "cbGuilds"; - this.cbGuilds.Size = new System.Drawing.Size(164, 21); - this.cbGuilds.TabIndex = 1; - this.cbGuilds.SelectedIndexChanged += new System.EventHandler(this.cbGuilds_SelectedIndexChanged); + this.btnSearch.Location = new System.Drawing.Point(403, 105); + this.btnSearch.Name = "btnSearch"; + this.btnSearch.Size = new System.Drawing.Size(25, 23); + this.btnSearch.TabIndex = 9; + this.btnSearch.Text = "..."; + this.btnSearch.UseVisualStyleBackColor = true; + this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click); // - // lbUsername + // tbxPath // - this.lbUsername.AutoSize = true; - this.lbUsername.Location = new System.Drawing.Point(12, 9); - this.lbUsername.Name = "lbUsername"; - this.lbUsername.Size = new System.Drawing.Size(58, 13); - this.lbUsername.TabIndex = 2; - this.lbUsername.Text = "Username:"; + this.tbxPath.Location = new System.Drawing.Point(50, 107); + this.tbxPath.Name = "tbxPath"; + this.tbxPath.Size = new System.Drawing.Size(342, 20); + this.tbxPath.TabIndex = 7; // - // cbChannels + // dtpLimit // - this.cbChannels.FormattingEnabled = true; - this.cbChannels.Location = new System.Drawing.Point(264, 32); - this.cbChannels.Name = "cbChannels"; - this.cbChannels.Size = new System.Drawing.Size(164, 21); - this.cbChannels.TabIndex = 4; + this.dtpLimit.Format = System.Windows.Forms.DateTimePickerFormat.Short; + this.dtpLimit.Location = new System.Drawing.Point(158, 70); + this.dtpLimit.Name = "dtpLimit"; + this.dtpLimit.Size = new System.Drawing.Size(95, 20); + this.dtpLimit.TabIndex = 6; // - // lbChannel + // btnDownload // - this.lbChannel.AutoSize = true; - this.lbChannel.Location = new System.Drawing.Point(224, 38); - this.lbChannel.Name = "lbChannel"; - this.lbChannel.Size = new System.Drawing.Size(34, 13); - this.lbChannel.TabIndex = 3; - this.lbChannel.Text = "Guild:"; + this.btnDownload.Location = new System.Drawing.Point(12, 167); + this.btnDownload.Name = "btnDownload"; + this.btnDownload.Size = new System.Drawing.Size(415, 23); + this.btnDownload.TabIndex = 10; + this.btnDownload.Text = "Start downloading"; + this.btnDownload.UseVisualStyleBackColor = true; + this.btnDownload.Click += new System.EventHandler(this.btnDownload_Click); // // cbLimitDate // @@ -99,55 +105,106 @@ this.cbLimitDate.UseVisualStyleBackColor = true; this.cbLimitDate.CheckedChanged += new System.EventHandler(this.cbLimitDate_CheckedChanged); // - // dtpLimit + // lbThread // - this.dtpLimit.Format = System.Windows.Forms.DateTimePickerFormat.Short; - this.dtpLimit.Location = new System.Drawing.Point(158, 70); - this.dtpLimit.Name = "dtpLimit"; - this.dtpLimit.Size = new System.Drawing.Size(95, 20); - this.dtpLimit.TabIndex = 6; + this.lbThread.AutoSize = true; + this.lbThread.Location = new System.Drawing.Point(12, 141); + this.lbThread.Name = "lbThread"; + this.lbThread.Size = new System.Drawing.Size(64, 13); + this.lbThread.TabIndex = 11; + this.lbThread.Text = "Thread limit:"; // - // btnSearch + // cbChannels // - this.btnSearch.Location = new System.Drawing.Point(403, 105); - this.btnSearch.Name = "btnSearch"; - this.btnSearch.Size = new System.Drawing.Size(25, 23); - this.btnSearch.TabIndex = 9; - this.btnSearch.Text = "..."; - this.btnSearch.UseVisualStyleBackColor = true; - this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click); + this.cbChannels.FormattingEnabled = true; + this.cbChannels.Location = new System.Drawing.Point(264, 32); + this.cbChannels.Name = "cbChannels"; + this.cbChannels.Size = new System.Drawing.Size(164, 21); + this.cbChannels.TabIndex = 4; // - // lbPath + // nupThreadCount // - this.lbPath.AutoSize = true; - this.lbPath.Location = new System.Drawing.Point(12, 110); - this.lbPath.Name = "lbPath"; - this.lbPath.Size = new System.Drawing.Size(32, 13); - this.lbPath.TabIndex = 8; - this.lbPath.Text = "Path:"; + this.nupThreadCount.Location = new System.Drawing.Point(82, 139); + this.nupThreadCount.Name = "nupThreadCount"; + this.nupThreadCount.Size = new System.Drawing.Size(70, 20); + this.nupThreadCount.TabIndex = 12; + this.nupThreadCount.Value = new decimal(new int[] { + 50, + 0, + 0, + 0}); // - // tbxPath + // lbChannel // - this.tbxPath.Location = new System.Drawing.Point(50, 107); - this.tbxPath.Name = "tbxPath"; - this.tbxPath.Size = new System.Drawing.Size(342, 20); - this.tbxPath.TabIndex = 7; + this.lbChannel.AutoSize = true; + this.lbChannel.Location = new System.Drawing.Point(224, 38); + this.lbChannel.Name = "lbChannel"; + this.lbChannel.Size = new System.Drawing.Size(34, 13); + this.lbChannel.TabIndex = 3; + this.lbChannel.Text = "Guild:"; // - // btnDownload + // lbScanCount // - this.btnDownload.Location = new System.Drawing.Point(12, 142); - this.btnDownload.Name = "btnDownload"; - this.btnDownload.Size = new System.Drawing.Size(416, 23); - this.btnDownload.TabIndex = 10; - this.btnDownload.Text = "Start downloading"; - this.btnDownload.UseVisualStyleBackColor = true; - this.btnDownload.Click += new System.EventHandler(this.btnDownload_Click); + this.lbScanCount.AutoSize = true; + this.lbScanCount.Location = new System.Drawing.Point(12, 203); + this.lbScanCount.Name = "lbScanCount"; + this.lbScanCount.Size = new System.Drawing.Size(102, 13); + this.lbScanCount.TabIndex = 13; + this.lbScanCount.Text = "Messages scanned:"; + // + // lbUsername + // + this.lbUsername.AutoSize = true; + this.lbUsername.Location = new System.Drawing.Point(12, 9); + this.lbUsername.Name = "lbUsername"; + this.lbUsername.Size = new System.Drawing.Size(58, 13); + this.lbUsername.TabIndex = 2; + this.lbUsername.Text = "Username:"; + // + // lbDownload + // + this.lbDownload.AutoSize = true; + this.lbDownload.Location = new System.Drawing.Point(234, 203); + this.lbDownload.Name = "lbDownload"; + this.lbDownload.Size = new System.Drawing.Size(92, 13); + this.lbDownload.TabIndex = 14; + this.lbDownload.Text = "Files downloaded:"; + // + // cbGuilds + // + this.cbGuilds.FormattingEnabled = true; + this.cbGuilds.Location = new System.Drawing.Point(52, 32); + this.cbGuilds.Name = "cbGuilds"; + this.cbGuilds.Size = new System.Drawing.Size(164, 21); + this.cbGuilds.TabIndex = 1; + this.cbGuilds.SelectedIndexChanged += new System.EventHandler(this.cbGuilds_SelectedIndexChanged); + // + // lbGuild + // + this.lbGuild.AutoSize = true; + this.lbGuild.Location = new System.Drawing.Point(12, 35); + this.lbGuild.Name = "lbGuild"; + this.lbGuild.Size = new System.Drawing.Size(34, 13); + this.lbGuild.TabIndex = 0; + this.lbGuild.Text = "Guild:"; + // + // pgbProgress + // + this.pgbProgress.Location = new System.Drawing.Point(15, 219); + this.pgbProgress.Name = "pgbProgress"; + this.pgbProgress.Size = new System.Drawing.Size(413, 23); + this.pgbProgress.TabIndex = 15; // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(439, 202); + this.ClientSize = new System.Drawing.Size(439, 253); + this.Controls.Add(this.pgbProgress); + this.Controls.Add(this.lbDownload); + this.Controls.Add(this.lbScanCount); + this.Controls.Add(this.nupThreadCount); + this.Controls.Add(this.lbThread); this.Controls.Add(this.btnDownload); this.Controls.Add(this.tbxPath); this.Controls.Add(this.lbPath); @@ -166,6 +223,7 @@ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Discord Media Loader"; this.Shown += new System.EventHandler(this.MainForm_Shown); + ((System.ComponentModel.ISupportInitialize)(this.nupThreadCount)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -173,16 +231,21 @@ #endregion - private System.Windows.Forms.Label lbGuild; - private System.Windows.Forms.ComboBox cbGuilds; - private System.Windows.Forms.Label lbUsername; - private System.Windows.Forms.ComboBox cbChannels; - private System.Windows.Forms.Label lbChannel; - private System.Windows.Forms.CheckBox cbLimitDate; - private System.Windows.Forms.DateTimePicker dtpLimit; - private System.Windows.Forms.Button btnSearch; private System.Windows.Forms.Label lbPath; + private System.Windows.Forms.Button btnSearch; private System.Windows.Forms.TextBox tbxPath; + private System.Windows.Forms.DateTimePicker dtpLimit; private System.Windows.Forms.Button btnDownload; + private System.Windows.Forms.CheckBox cbLimitDate; + private System.Windows.Forms.Label lbThread; + private System.Windows.Forms.ComboBox cbChannels; + private System.Windows.Forms.NumericUpDown nupThreadCount; + private System.Windows.Forms.Label lbChannel; + private System.Windows.Forms.Label lbScanCount; + private System.Windows.Forms.Label lbUsername; + private System.Windows.Forms.Label lbDownload; + private System.Windows.Forms.ComboBox cbGuilds; + private System.Windows.Forms.Label lbGuild; + private System.Windows.Forms.ProgressBar pgbProgress; } } \ No newline at end of file diff --git a/Discord Media Loader/MainForm.cs b/Discord Media Loader/MainForm.cs index 138fc66..42ab05a 100644 --- a/Discord Media Loader/MainForm.cs +++ b/Discord Media Loader/MainForm.cs @@ -8,6 +8,7 @@ using System.Drawing; using System.IO; using System.Linq; using System.Net; +using System.Reflection; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; @@ -22,9 +23,34 @@ namespace Discord_Media_Loader public partial class MainForm : Form { private DiscordClient Client { get; } = new DiscordClient(); + private event EventHandler UpdateProgress; public MainForm() { InitializeComponent(); + + UpdateProgress += (s, e) => + { + SetControlPropertyThreadSafe(lbDownload, "Text", $"Files downloaded: {e.Downloaded}"); + SetControlPropertyThreadSafe(lbScanCount, "Text", $"Messages scanned: {e.Scanned}"); + //SetControlPropertyThreadSafe(pgbProgress, "Max", e.MaxProgress); + //SetControlPropertyThreadSafe(pgbProgress, "Value", e.Progress); + }; + } + + private delegate void SetControlPropertyThreadSafeDelegate(Control control, string propertyName, object propertyValue); + + private static void SetControlPropertyThreadSafe(Control control, string propertyName, object propertyValue) + { + if (control.InvokeRequired) + { + control.Invoke(new SetControlPropertyThreadSafeDelegate(SetControlPropertyThreadSafe), + new object[] { control, propertyName, propertyValue }); + + } + else + { + control.GetType().InvokeMember(propertyName, BindingFlags.SetProperty, null, control, new object[] { propertyValue }); + } } public async Task Login() @@ -69,7 +95,7 @@ namespace Discord_Media_Loader private async void MainForm_Shown(object sender, EventArgs e) { - Enabled = false; + SetEnabled(false); if (!await Login()) { @@ -78,10 +104,10 @@ namespace Discord_Media_Loader else { cbGuilds.Items.AddRange((from g in Client.Servers orderby g.Name select g.Name).ToArray()); - cbGuilds.SelectedIndex = 0; + lbUsername.Text = $"Username: {Client.CurrentUser.Name}#{Client.CurrentUser.Discriminator}"; - Enabled = true; + SetEnabled(true); } } @@ -95,6 +121,15 @@ namespace Discord_Media_Loader return (from c in server.TextChannels where c.Name == name select c).FirstOrDefault(); } + private void SetEnabled(bool enabled) + { + foreach (Control c in Controls) + { + SetControlPropertyThreadSafe(c, "Enabled", enabled); + //c.Enabled = enabled; + } + } + private void cbGuilds_SelectedIndexChanged(object sender, EventArgs e) { Cursor = Cursors.WaitCursor; @@ -130,11 +165,21 @@ namespace Discord_Media_Loader } } - private async void btnDownload_Click(object sender, EventArgs e) + private void OnUpdateProgress(UpdateProgessEventArgs e) + { + EventHandler handler = UpdateProgress; + if (handler != null) + { + handler(this, e); + } + } + + private void btnDownload_Click(object sender, EventArgs e) { var path = tbxPath.Text; var useStopDate = cbLimitDate.Checked; var stopDate = dtpLimit.Value; + var threadLimit = nupThreadCount.Value; if (!Directory.Exists(path)) { @@ -142,7 +187,7 @@ namespace Discord_Media_Loader return; } - Enabled = false; + SetEnabled(false); var guild = FindServerByName(cbGuilds.Text); var channel = FindChannelByName(guild, cbChannels.Text); @@ -154,58 +199,95 @@ namespace Discord_Media_Loader ulong lastId = ulong.MaxValue; var isFirst = true; - while (!stop) + ulong msgScanCount = 0; + ulong fileFound = 0; + ulong downloadCount = 0; + var locker = new object(); + + var timeDiffSteps = (uint)Math.Floor(int.MaxValue / 2 / (DateTime.Now - dtpLimit.Value.Date).TotalHours); + uint progress = 0; + + Task.Run(async () => { - Discord.Message[] messages; - if (isFirst) - messages = await channel.DownloadMessages(limit, null, Relative.Before, true); - else - messages = await channel.DownloadMessages(limit, lastId, Relative.Before, true); - - isFirst = false; - - foreach (var m in messages) + while (!stop) { - if (m.Id < lastId) - lastId = m.Id; + Discord.Message[] messages; - if (useStopDate && m.Timestamp < stopDate.Date) - { - stop = true; - continue; - } + if (isFirst) + messages = await channel.DownloadMessages(limit, null, Relative.Before, true); + else + messages = await channel.DownloadMessages(limit, lastId, Relative.Before, true); - foreach (var a in m.Attachments) + isFirst = false; + + foreach (var m in messages) { - while (clients.Count > 50) + if (m.Id < lastId) + lastId = m.Id; + + if (useStopDate && m.Timestamp < stopDate.Date) { - // wait + stop = true; + continue; } - var wc = new WebClient(); - clients.Add(wc); - wc.DownloadFileCompleted += (wcSender, wcE) => + foreach (var a in m.Attachments) { - clients.Remove(wc); - }; - wc.DownloadFileAsync(new Uri(a.Url), $@"{path}\{a.Filename}"); + fileFound++; + while (clients.Count >= threadLimit) + { + // wait + } + var wc = new WebClient(); + clients.Add(wc); + + wc.DownloadFileCompleted += (wcSender, wcE) => + { + clients.Remove(wc); + lock (locker) + { + downloadCount++; + OnUpdateProgress(new UpdateProgessEventArgs() { Downloaded = downloadCount, Scanned = msgScanCount }); + } + }; + + if (!path.EndsWith(@"\")) + path += @"\"; + + var fname = $"{guild.Name}_{channel.Name}_{m.Timestamp}_{a.Filename}"; + fname = Path.GetInvalidFileNameChars().Aggregate(fname, (current, c) => current.Replace(c, '-')); + + + wc.DownloadFileAsync(new Uri(a.Url), $@"{path}{fname}"); + } + + msgScanCount++; + progress += timeDiffSteps; + OnUpdateProgress(new UpdateProgessEventArgs() { Downloaded = downloadCount, Scanned = msgScanCount, Progress = progress }); } + + stop = stop || messages.Length < limit; } - stop = stop || messages.Length < limit; - } - - await Task.Run(() => - { - while (clients.Count > 0) + await Task.Run(() => { - // wait until download finished - } - }); + while (clients.Count > 0) + { + // wait until download finished + } + }); - Enabled = true; - Process.Start(path); + SetEnabled(true); + }); } } + + internal class UpdateProgessEventArgs : EventArgs + { + internal ulong Scanned { get; set; } = 0; + internal ulong Downloaded { get; set; } = 0; + internal uint Progress { get; set; } = 0; + internal uint MaxProgress { get; set; } = int.MaxValue; + } } diff --git a/Discord Media Loader/Properties/AssemblyInfo.cs b/Discord Media Loader/Properties/AssemblyInfo.cs index 1719601..1381ac5 100644 --- a/Discord Media Loader/Properties/AssemblyInfo.cs +++ b/Discord Media Loader/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern // übernehmen, indem Sie "*" eingeben: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.1.0.31")] -[assembly: AssemblyFileVersion("0.1.0.31")] +[assembly: AssemblyVersion("0.1.0.42")] +[assembly: AssemblyFileVersion("0.1.0.42")] From 9a4ca60458633f37389b4dbb054fc41b5a840d80 Mon Sep 17 00:00:00 2001 From: Serraniel Date: Sun, 29 Jan 2017 10:02:14 +0100 Subject: [PATCH 7/8] Removed Progress Bar --- Discord Media Loader/MainForm.Designer.cs | 23 ++++++----- Discord Media Loader/MainForm.cs | 40 +++++++++++-------- .../Properties/AssemblyInfo.cs | 4 +- 3 files changed, 40 insertions(+), 27 deletions(-) diff --git a/Discord Media Loader/MainForm.Designer.cs b/Discord Media Loader/MainForm.Designer.cs index 13cf921..0f0caf0 100644 --- a/Discord Media Loader/MainForm.Designer.cs +++ b/Discord Media Loader/MainForm.Designer.cs @@ -44,7 +44,7 @@ this.lbDownload = new System.Windows.Forms.Label(); this.cbGuilds = new System.Windows.Forms.ComboBox(); this.lbGuild = new System.Windows.Forms.Label(); - this.pgbProgress = new System.Windows.Forms.ProgressBar(); + this.cbSkip = new System.Windows.Forms.CheckBox(); ((System.ComponentModel.ISupportInitialize)(this.nupThreadCount)).BeginInit(); this.SuspendLayout(); // @@ -87,7 +87,7 @@ this.btnDownload.Location = new System.Drawing.Point(12, 167); this.btnDownload.Name = "btnDownload"; this.btnDownload.Size = new System.Drawing.Size(415, 23); - this.btnDownload.TabIndex = 10; + this.btnDownload.TabIndex = 20; this.btnDownload.Text = "Start downloading"; this.btnDownload.UseVisualStyleBackColor = true; this.btnDownload.Click += new System.EventHandler(this.btnDownload_Click); @@ -188,19 +188,24 @@ this.lbGuild.TabIndex = 0; this.lbGuild.Text = "Guild:"; // - // pgbProgress + // cbSkip // - this.pgbProgress.Location = new System.Drawing.Point(15, 219); - this.pgbProgress.Name = "pgbProgress"; - this.pgbProgress.Size = new System.Drawing.Size(413, 23); - this.pgbProgress.TabIndex = 15; + this.cbSkip.AutoSize = true; + this.cbSkip.Checked = true; + this.cbSkip.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbSkip.Location = new System.Drawing.Point(227, 141); + this.cbSkip.Name = "cbSkip"; + this.cbSkip.Size = new System.Drawing.Size(106, 17); + this.cbSkip.TabIndex = 16; + this.cbSkip.Text = "Skip existing files"; + this.cbSkip.UseVisualStyleBackColor = true; // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(439, 253); - this.Controls.Add(this.pgbProgress); + this.Controls.Add(this.cbSkip); this.Controls.Add(this.lbDownload); this.Controls.Add(this.lbScanCount); this.Controls.Add(this.nupThreadCount); @@ -246,6 +251,6 @@ private System.Windows.Forms.Label lbDownload; private System.Windows.Forms.ComboBox cbGuilds; private System.Windows.Forms.Label lbGuild; - private System.Windows.Forms.ProgressBar pgbProgress; + private System.Windows.Forms.CheckBox cbSkip; } } \ No newline at end of file diff --git a/Discord Media Loader/MainForm.cs b/Discord Media Loader/MainForm.cs index 42ab05a..8716354 100644 --- a/Discord Media Loader/MainForm.cs +++ b/Discord Media Loader/MainForm.cs @@ -24,6 +24,7 @@ namespace Discord_Media_Loader { private DiscordClient Client { get; } = new DiscordClient(); private event EventHandler UpdateProgress; + private static readonly DateTime Epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); public MainForm() { InitializeComponent(); @@ -32,8 +33,6 @@ namespace Discord_Media_Loader { SetControlPropertyThreadSafe(lbDownload, "Text", $"Files downloaded: {e.Downloaded}"); SetControlPropertyThreadSafe(lbScanCount, "Text", $"Messages scanned: {e.Scanned}"); - //SetControlPropertyThreadSafe(pgbProgress, "Max", e.MaxProgress); - //SetControlPropertyThreadSafe(pgbProgress, "Value", e.Progress); }; } @@ -174,12 +173,20 @@ namespace Discord_Media_Loader } } + private static long DateTimeToUnixTimeStamp(DateTime dateTime) + { + TimeSpan elapsedTime = dateTime - Epoch; + return (long)elapsedTime.TotalSeconds; + } + + private void btnDownload_Click(object sender, EventArgs e) { var path = tbxPath.Text; var useStopDate = cbLimitDate.Checked; var stopDate = dtpLimit.Value; var threadLimit = nupThreadCount.Value; + var skipExisting = cbSkip.Checked; if (!Directory.Exists(path)) { @@ -204,8 +211,8 @@ namespace Discord_Media_Loader ulong downloadCount = 0; var locker = new object(); - var timeDiffSteps = (uint)Math.Floor(int.MaxValue / 2 / (DateTime.Now - dtpLimit.Value.Date).TotalHours); - uint progress = 0; + var timeDiffSteps = (int)Math.Floor(int.MaxValue / 2 / (DateTime.Now - dtpLimit.Value.Date).TotalHours); + int progress = 0; Task.Run(async () => { @@ -235,6 +242,17 @@ namespace Discord_Media_Loader foreach (var a in m.Attachments) { fileFound++; + + if (!path.EndsWith(@"\")) + path += @"\"; + + var fname = $"{guild.Name}_{channel.Name}_{DateTimeToUnixTimeStamp(m.Timestamp)}_{a.Filename}"; + fname = Path.GetInvalidFileNameChars().Aggregate(fname, (current, c) => current.Replace(c, '-')); + fname = path + fname; + + if (skipExisting && File.Exists(fname)) + continue; + while (clients.Count >= threadLimit) { // wait @@ -252,19 +270,11 @@ namespace Discord_Media_Loader } }; - if (!path.EndsWith(@"\")) - path += @"\"; - - var fname = $"{guild.Name}_{channel.Name}_{m.Timestamp}_{a.Filename}"; - fname = Path.GetInvalidFileNameChars().Aggregate(fname, (current, c) => current.Replace(c, '-')); - - - wc.DownloadFileAsync(new Uri(a.Url), $@"{path}{fname}"); + wc.DownloadFileAsync(new Uri(a.Url), fname); } msgScanCount++; - progress += timeDiffSteps; - OnUpdateProgress(new UpdateProgessEventArgs() { Downloaded = downloadCount, Scanned = msgScanCount, Progress = progress }); + OnUpdateProgress(new UpdateProgessEventArgs() { Downloaded = downloadCount, Scanned = msgScanCount}); } stop = stop || messages.Length < limit; @@ -287,7 +297,5 @@ namespace Discord_Media_Loader { internal ulong Scanned { get; set; } = 0; internal ulong Downloaded { get; set; } = 0; - internal uint Progress { get; set; } = 0; - internal uint MaxProgress { get; set; } = int.MaxValue; } } diff --git a/Discord Media Loader/Properties/AssemblyInfo.cs b/Discord Media Loader/Properties/AssemblyInfo.cs index 1381ac5..aacf74e 100644 --- a/Discord Media Loader/Properties/AssemblyInfo.cs +++ b/Discord Media Loader/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern // übernehmen, indem Sie "*" eingeben: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.1.0.42")] -[assembly: AssemblyFileVersion("0.1.0.42")] +[assembly: AssemblyVersion("0.1.0.48")] +[assembly: AssemblyFileVersion("0.1.0.48")] From dc708060fc08e32eee63db1b02027c4ce83127c5 Mon Sep 17 00:00:00 2001 From: Serraniel Date: Sun, 29 Jan 2017 10:20:54 +0100 Subject: [PATCH 8/8] Finalised for first release build --- .../Discord Media Loader.csproj | 1 + Discord Media Loader/LoginForm.cs | 7 -- Discord Media Loader/MainForm.Designer.cs | 56 ++++++++++++++- Discord Media Loader/MainForm.cs | 50 ++++++------- Discord Media Loader/Program.cs | 3 - .../Properties/AssemblyInfo.cs | 5 +- .../Properties/Resources.Designer.cs | 72 ++++++++++--------- .../Properties/Resources.resx | 23 ++++-- 8 files changed, 139 insertions(+), 78 deletions(-) diff --git a/Discord Media Loader/Discord Media Loader.csproj b/Discord Media Loader/Discord Media Loader.csproj index 1977f71..274394d 100644 --- a/Discord Media Loader/Discord Media Loader.csproj +++ b/Discord Media Loader/Discord Media Loader.csproj @@ -105,6 +105,7 @@ True Resources.resx + True diff --git a/Discord Media Loader/LoginForm.cs b/Discord Media Loader/LoginForm.cs index 2bd512e..2286fe2 100644 --- a/Discord Media Loader/LoginForm.cs +++ b/Discord Media Loader/LoginForm.cs @@ -1,11 +1,4 @@ using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Windows.Forms; namespace Discord_Media_Loader diff --git a/Discord Media Loader/MainForm.Designer.cs b/Discord Media Loader/MainForm.Designer.cs index 0f0caf0..879ad82 100644 --- a/Discord Media Loader/MainForm.Designer.cs +++ b/Discord Media Loader/MainForm.Designer.cs @@ -45,6 +45,10 @@ this.cbGuilds = new System.Windows.Forms.ComboBox(); this.lbGuild = new System.Windows.Forms.Label(); this.cbSkip = new System.Windows.Forms.CheckBox(); + this.lbCopyright = new System.Windows.Forms.Label(); + this.lbGithub = new System.Windows.Forms.LinkLabel(); + this.lbAbout = new System.Windows.Forms.LinkLabel(); + this.lbVersion = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.nupThreadCount)).BeginInit(); this.SuspendLayout(); // @@ -116,6 +120,7 @@ // // cbChannels // + this.cbChannels.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cbChannels.FormattingEnabled = true; this.cbChannels.Location = new System.Drawing.Point(264, 32); this.cbChannels.Name = "cbChannels"; @@ -172,6 +177,7 @@ // // cbGuilds // + this.cbGuilds.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cbGuilds.FormattingEnabled = true; this.cbGuilds.Location = new System.Drawing.Point(52, 32); this.cbGuilds.Name = "cbGuilds"; @@ -200,11 +206,55 @@ this.cbSkip.Text = "Skip existing files"; this.cbSkip.UseVisualStyleBackColor = true; // + // lbCopyright + // + this.lbCopyright.AutoSize = true; + this.lbCopyright.Location = new System.Drawing.Point(12, 274); + this.lbCopyright.Name = "lbCopyright"; + this.lbCopyright.Size = new System.Drawing.Size(151, 13); + this.lbCopyright.TabIndex = 22; + this.lbCopyright.Text = "Copyright (c) 2017 by Serraniel"; + // + // lbGithub + // + this.lbGithub.AutoSize = true; + this.lbGithub.Location = new System.Drawing.Point(169, 274); + this.lbGithub.Name = "lbGithub"; + this.lbGithub.Size = new System.Drawing.Size(40, 13); + this.lbGithub.TabIndex = 23; + this.lbGithub.TabStop = true; + this.lbGithub.Text = "GitHub"; + this.lbGithub.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lbGithub_LinkClicked); + // + // lbAbout + // + this.lbAbout.AutoSize = true; + this.lbAbout.Location = new System.Drawing.Point(223, 274); + this.lbAbout.Name = "lbAbout"; + this.lbAbout.Size = new System.Drawing.Size(35, 13); + this.lbAbout.TabIndex = 24; + this.lbAbout.TabStop = true; + this.lbAbout.Text = "About"; + this.lbAbout.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lbAbout_LinkClicked); + // + // lbVersion + // + this.lbVersion.Location = new System.Drawing.Point(328, 274); + this.lbVersion.Name = "lbVersion"; + this.lbVersion.Size = new System.Drawing.Size(100, 13); + this.lbVersion.TabIndex = 25; + this.lbVersion.Text = "version"; + this.lbVersion.TextAlign = System.Drawing.ContentAlignment.TopRight; + // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(439, 253); + this.ClientSize = new System.Drawing.Size(439, 296); + this.Controls.Add(this.lbVersion); + this.Controls.Add(this.lbAbout); + this.Controls.Add(this.lbGithub); + this.Controls.Add(this.lbCopyright); this.Controls.Add(this.cbSkip); this.Controls.Add(this.lbDownload); this.Controls.Add(this.lbScanCount); @@ -252,5 +302,9 @@ private System.Windows.Forms.ComboBox cbGuilds; private System.Windows.Forms.Label lbGuild; private System.Windows.Forms.CheckBox cbSkip; + private System.Windows.Forms.Label lbCopyright; + private System.Windows.Forms.LinkLabel lbGithub; + private System.Windows.Forms.LinkLabel lbAbout; + private System.Windows.Forms.Label lbVersion; } } \ No newline at end of file diff --git a/Discord Media Loader/MainForm.cs b/Discord Media Loader/MainForm.cs index 8716354..957aa1e 100644 --- a/Discord Media Loader/MainForm.cs +++ b/Discord Media Loader/MainForm.cs @@ -1,22 +1,15 @@ using System; -using System.Collections.Concurrent; using System.Collections.Generic; -using System.ComponentModel; -using System.Data; using System.Diagnostics; -using System.Drawing; using System.IO; using System.Linq; using System.Net; using System.Reflection; -using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using Discord; using Discord.Net; -using Nito.AsyncEx; using ConnectionState = Discord.ConnectionState; -using Message = Discord.Message; namespace Discord_Media_Loader { @@ -42,13 +35,12 @@ namespace Discord_Media_Loader { if (control.InvokeRequired) { - control.Invoke(new SetControlPropertyThreadSafeDelegate(SetControlPropertyThreadSafe), - new object[] { control, propertyName, propertyValue }); + control.Invoke(new SetControlPropertyThreadSafeDelegate(SetControlPropertyThreadSafe), control, propertyName, propertyValue); } else { - control.GetType().InvokeMember(propertyName, BindingFlags.SetProperty, null, control, new object[] { propertyValue }); + control.GetType().InvokeMember(propertyName, BindingFlags.SetProperty, null, control, new[] { propertyValue }); } } @@ -59,7 +51,7 @@ namespace Discord_Media_Loader while (Client.State != ConnectionState.Connected && !abort) { - var password = ""; + string password; if (LoginForm.Exec(ref email, out password)) { @@ -78,7 +70,7 @@ namespace Discord_Media_Loader Cursor = Cursors.Default; } } - catch (HttpException ex) + catch (HttpException) { // ignore http exception on invalid login } @@ -94,6 +86,8 @@ namespace Discord_Media_Loader private async void MainForm_Shown(object sender, EventArgs e) { + lbVersion.Text = $"v{Assembly.GetExecutingAssembly().GetName().Version}"; + SetEnabled(false); if (!await Login()) @@ -167,10 +161,7 @@ namespace Discord_Media_Loader private void OnUpdateProgress(UpdateProgessEventArgs e) { EventHandler handler = UpdateProgress; - if (handler != null) - { - handler(this, e); - } + handler?.Invoke(this, e); } private static long DateTimeToUnixTimeStamp(DateTime dateTime) @@ -203,17 +194,13 @@ namespace Discord_Media_Loader var limit = 100; var stop = false; - ulong lastId = ulong.MaxValue; + var lastId = ulong.MaxValue; var isFirst = true; ulong msgScanCount = 0; - ulong fileFound = 0; ulong downloadCount = 0; var locker = new object(); - var timeDiffSteps = (int)Math.Floor(int.MaxValue / 2 / (DateTime.Now - dtpLimit.Value.Date).TotalHours); - int progress = 0; - Task.Run(async () => { @@ -222,9 +209,9 @@ namespace Discord_Media_Loader Discord.Message[] messages; if (isFirst) - messages = await channel.DownloadMessages(limit, null, Relative.Before, true); + messages = await channel.DownloadMessages(limit, null); else - messages = await channel.DownloadMessages(limit, lastId, Relative.Before, true); + messages = await channel.DownloadMessages(limit, lastId); isFirst = false; @@ -241,8 +228,6 @@ namespace Discord_Media_Loader foreach (var a in m.Attachments) { - fileFound++; - if (!path.EndsWith(@"\")) path += @"\"; @@ -288,14 +273,25 @@ namespace Discord_Media_Loader } }); + Process.Start(path); SetEnabled(true); }); } + + private void lbGithub_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + Process.Start("https://github.com/Serraniel/DiscordMediaLoader/releases"); + } + + private void lbAbout_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + MessageBox.Show(Properties.Resources.AboutString); + } } internal class UpdateProgessEventArgs : EventArgs { - internal ulong Scanned { get; set; } = 0; - internal ulong Downloaded { get; set; } = 0; + internal ulong Scanned { get; set; } + internal ulong Downloaded { get; set; } } } diff --git a/Discord Media Loader/Program.cs b/Discord Media Loader/Program.cs index a3a1342..837140a 100644 --- a/Discord Media Loader/Program.cs +++ b/Discord Media Loader/Program.cs @@ -1,7 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using System.Windows.Forms; namespace Discord_Media_Loader diff --git a/Discord Media Loader/Properties/AssemblyInfo.cs b/Discord Media Loader/Properties/AssemblyInfo.cs index aacf74e..5dacbc3 100644 --- a/Discord Media Loader/Properties/AssemblyInfo.cs +++ b/Discord Media Loader/Properties/AssemblyInfo.cs @@ -1,5 +1,4 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // Allgemeine Informationen über eine Assembly werden über die folgenden @@ -32,5 +31,5 @@ using System.Runtime.InteropServices; // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern // übernehmen, indem Sie "*" eingeben: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.1.0.48")] -[assembly: AssemblyFileVersion("0.1.0.48")] +[assembly: AssemblyVersion("0.1.0.51")] +[assembly: AssemblyFileVersion("0.1.0.51")] diff --git a/Discord Media Loader/Properties/Resources.Designer.cs b/Discord Media Loader/Properties/Resources.Designer.cs index 4fb9e89..116551a 100644 --- a/Discord Media Loader/Properties/Resources.Designer.cs +++ b/Discord Media Loader/Properties/Resources.Designer.cs @@ -1,71 +1,79 @@ //------------------------------------------------------------------------------ // // Dieser Code wurde von einem Tool generiert. -// Laufzeitversion: 4.0.30319.42000 +// Laufzeitversion:4.0.30319.42000 // -// Änderungen an dieser Datei können fehlerhaftes Verhalten verursachen und gehen verloren, wenn -// der Code neu generiert wird. +// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +// der Code erneut generiert wird. // //------------------------------------------------------------------------------ -namespace Discord_Media_Loader.Properties -{ - - +namespace Discord_Media_Loader.Properties { + using System; + + /// /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. /// - // Diese Klasse wurde von der StronglyTypedResourceBuilder-Klasse - // über ein Tool wie ResGen oder Visual Studio automatisch generiert. + // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert + // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen - // mit der Option /str erneut aus, oder erstellen Sie Ihr VS-Projekt neu. + // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources - { - + internal class Resources { + private static global::System.Resources.ResourceManager resourceMan; - + private static global::System.Globalization.CultureInfo resourceCulture; - + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() - { + internal Resources() { } - + /// /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager - { - get - { - if ((resourceMan == null)) - { + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Discord_Media_Loader.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; } } - + /// /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle - /// Ressourcenlookups, die diese stark typisierte Ressourcenklasse verwenden. + /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture - { - get - { + internal static global::System.Globalization.CultureInfo Culture { + get { return resourceCulture; } - set - { + set { resourceCulture = value; } } + + /// + /// Sucht eine lokalisierte Zeichenfolge, die Discord Media Loader by Serraniel - Apache 2.0 License + ///https://github.com/Serraniel/DiscordMediaLoader/ + /// + ///Made with: + ///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) + ///WebSocket4Net (Copyright (c) kerryjiang - Apache 2.0 License) ähnelt. + /// + internal static string AboutString { + get { + return ResourceManager.GetString("AboutString", resourceCulture); + } + } } } diff --git a/Discord Media Loader/Properties/Resources.resx b/Discord Media Loader/Properties/Resources.resx index af7dbeb..03f47a6 100644 --- a/Discord Media Loader/Properties/Resources.resx +++ b/Discord Media Loader/Properties/Resources.resx @@ -46,7 +46,7 @@ mimetype: application/x-microsoft.net.object.binary.base64 value : The object must be serialized with - : System.Serialization.Formatters.Binary.BinaryFormatter + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.soap.base64 @@ -60,6 +60,7 @@ : and then encoded with base64 encoding. --> + @@ -68,9 +69,10 @@ - + + @@ -85,9 +87,10 @@ - + + @@ -109,9 +112,19 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + 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: +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) +WebSocket4Net (Copyright (c) kerryjiang - Apache 2.0 License) + \ No newline at end of file