diff --git a/shadowsocks-csharp/View/QRCodeSplashForm.Designer.cs b/shadowsocks-csharp/View/QRCodeSplashForm.Designer.cs new file mode 100755 index 00000000..87f9dd68 --- /dev/null +++ b/shadowsocks-csharp/View/QRCodeSplashForm.Designer.cs @@ -0,0 +1,57 @@ +namespace Shadowsocks.View +{ + partial class QRCodeSplashForm + { + /// + /// 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() + { + this.SuspendLayout(); + // + // QRCodeSplashForm + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.BackColor = System.Drawing.Color.Crimson; + this.ClientSize = new System.Drawing.Size(284, 262); + this.ControlBox = false; + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "QRCodeSplashForm"; + this.Opacity = 0.3D; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; + this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; + this.Text = "QRCodeSplashForm"; + this.TopMost = true; + this.Load += new System.EventHandler(this.QRCodeSplashForm_Load); + this.ResumeLayout(false); + + } + + #endregion + } +} \ No newline at end of file diff --git a/shadowsocks-csharp/View/QRCodeSplashForm.cs b/shadowsocks-csharp/View/QRCodeSplashForm.cs new file mode 100755 index 00000000..3d14785e --- /dev/null +++ b/shadowsocks-csharp/View/QRCodeSplashForm.cs @@ -0,0 +1,64 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +namespace Shadowsocks.View +{ + public partial class QRCodeSplashForm : Form + { + public QRCodeSplashForm() + { + InitializeComponent(); + } + + private Timer timer; + private int step; + + private void QRCodeSplashForm_Load(object sender, EventArgs e) + { + step = 0; + timer = new Timer(); + timer.Interval = 300; + timer.Tick += timer_Tick; + timer.Start(); + } + + void timer_Tick(object sender, EventArgs e) + { + timer.Interval = 40; + if (step == 0) + { + this.Opacity = 0; + } + else if (step == 1) + { + this.Opacity = 0.3; + } + else if (step == 1) + { + this.Opacity = 0.0; + } + else if (step == 2) + { + this.Opacity = 0.3; + } + else if (step == 3) + { + this.Opacity = 0.0; + } + else if (step == 4) + { + this.Opacity = 0.3; + } + else + { + this.Close(); + } + step++; + } + } +} diff --git a/shadowsocks-csharp/View/QRCodeSplashForm.resx b/shadowsocks-csharp/View/QRCodeSplashForm.resx new file mode 100755 index 00000000..5ea0895e --- /dev/null +++ b/shadowsocks-csharp/View/QRCodeSplashForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file