|
//
// This file is part of the source code distribution of SharpPrivacy.
// SharpPrivacy is an Open Source OpenPGP implementation and can be
// found at http://www.sharpprivacy.net
// It is released under Gnu General Public License and can be used
// and modified as long as the result is released under GPL too.
// For a copy of the GPL, please go to www.gnu.org/copyleft/gpl.html
//
// Working.cs:
// GUI for showing that the program is currently working.
//
// Author:
// Daniel Fabian (df@sharpprivacy.net)
//
//
// Version: 0.1.0 (initial release)
//
// Changelog:
// - 02.04.2003: Created this file.
// - 01.06.2003: Added this header for the first beta release.
//
// (C) 2003, Daniel Fabian
//
using System;
using System.Windows.Forms;
namespace SharpPrivacy {
public class Working : System.Windows.Forms.Form {
private System.Windows.Forms.Label label;
private System.Windows.Forms.Button cmdCancel;
private System.Windows.Forms.ProgressBar pbProgress;
private System.Windows.Forms.PictureBox pbIcon;
public Working() {
InitializeComponent();
System.Resources.ResourceManager resources = new System.Resources.ResourceManager("SharpPrivacy", System.Reflection.Assembly.GetExecutingAssembly());
this.pbIcon.Image = ((System.Drawing.Icon)resources.GetObject("iconWorking")).ToBitmap();
this.Icon = (System.Drawing.Icon)resources.GetObject("iconWorking");
this.pbProgress.Minimum = 0;
this.pbProgress.Maximum = 100;
Application.DoEvents();
}
public void Progress(int iProgress) {
this.pbProgress.Increment(iProgress);
Application.DoEvents();
}
private void InitializeComponent() {
this.label = new System.Windows.Forms.Label();
this.cmdCancel = new System.Windows.Forms.Button();
this.pbProgress = new System.Windows.Forms.ProgressBar();
this.pbIcon = new System.Windows.Forms.PictureBox();
this.SuspendLayout();
//
// label
//
this.label.Location = new System.Drawing.Point(16, 8);
this.label.Name = "label";
this.label.Size = new System.Drawing.Size(264, 16);
this.label.TabIndex = 1;
this.label.Text = "Please allow a second for the action to be taken...";
//
// cmdCancel
//
this.cmdCancel.Enabled = false;
this.cmdCancel.Location = new System.Drawing.Point(196, 72);
this.cmdCancel.Name = "cmdCancel";
this.cmdCancel.Size = new System.Drawing.Size(88, 24);
this.cmdCancel.TabIndex = 3;
this.cmdCancel.Text = "Cancel";
//
// pbProgress
//
this.pbProgress.Location = new System.Drawing.Point(68, 40);
this.pbProgress.Name = "pbProgress";
this.pbProgress.Size = new System.Drawing.Size(216, 16);
this.pbProgress.TabIndex = 0;
//
// pbIcon
//
this.pbIcon.Location = new System.Drawing.Point(12, 36);
this.pbIcon.Name = "pbIcon";
this.pbIcon.Size = new System.Drawing.Size(36, 32);
this.pbIcon.TabIndex = 2;
this.pbIcon.TabStop = false;
//
// Working
//
this.Text = "Please wait...";
this.ClientSize = new System.Drawing.Size(292, 105);
this.ShowInTaskbar = false;
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.cmdCancel,
this.pbIcon,
this.label,
this.pbProgress});
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
My name is Daniel and I am from Austria.
When I was in High School, all I wanted to do was programming. After finishing High School, I joined a company for which I wrote a project management utility in Visual Basic 6. It was then that I realised that programming all day long was nothing I wanted to do for the rest of my life.
I quit the job and started to study computer and media security at polytechnical university in Hagenberg/Austria.
As of now, I'm still studying. I still like to program, as long as I can do something else too. Recently I switched my favorite programming language to c#. Together with a friend from university, we started a project where we implement OpenPGP (RFC2440) in c#.