📄 installerdialog.cs
字号:
//Filename : InstallerDialog.cs
//Part of : Application installer C# example
//Description : Main dialog of CSInstaller.NET example application
//Version : 3.2
//
//This example is only to be used with PC Connectivity API version 3.2.
//Compability ("as is") with future versions is not quaranteed.
//
//Copyright (c) 2007 Nokia Corporation.
//
//This material, including but not limited to documentation and any related
//computer programs, is protected by intellectual property rights of Nokia
//Corporation and/or its licensors.
//All rights are reserved. Reproducing, modifying, translating, or
//distributing any or all of this material requires the prior written consent
//of Nokia Corporation. Nokia Corporation retains the right to make changes
//to this material at any time without notice. A copyright license is hereby
//granted to download and print a copy of this material for personal use only.
//No other license to any other intellectual property rights is granted. The
//material is provided "as is" without warranty of any kind, either express or
//implied, including without limitation, any warranty of non-infringement,
//merchantability and fitness for a particular purpose. In no event shall
//Nokia Corporation be liable for any direct, indirect, special, incidental,
//or consequential loss or damages, including but not limited to, lost profits
//or revenue,loss of use, cost of substitute program, or loss of data or
//equipment arising out of the use or inability to use the material, even if
//Nokia Corporation has been advised of the likelihood of such damages occurring.
using System.Runtime.InteropServices;
using System.Windows.Forms;
using System;
namespace CSInstaller
{
using CONADefinitions;
using PCCSErrors;
using CONADeviceManagement;
using CONAFileSystem;
using PCCAPIUtils;
internal class InstallerDialog : System.Windows.Forms.Form
{
#region "Windows Form Designer generated code "
public InstallerDialog()
: base()
{
//This call is required by the Windows Form Designer.
InitializeComponent();
}
//Common myCommon = new Common();
static bool fTerminateCalled = false;
//Form overrides dispose to clean up the component list.
protected override void Dispose(bool Disposing)
{
if (Disposing)
{
if (!fTerminateCalled)
{
UninitializePCCAPI();
fTerminateCalled = true;
}
if ((components != null))
{
components.Dispose();
}
}
base.Dispose(Disposing);
}
//Required by the Windows Form Designer
private System.ComponentModel.IContainer components;
public System.Windows.Forms.ToolTip ToolTip1;
public System.Windows.Forms.TextBox TextSis;
public System.Windows.Forms.TextBox TextJad;
public System.Windows.Forms.TextBox TextJar;
public System.Windows.Forms.Button CommandJad;
public System.Windows.Forms.Button CommandSis;
public System.Windows.Forms.Button CommandJar;
public System.Windows.Forms.Button CommandCancel;
public System.Windows.Forms.Button CommandInstall;
public System.Windows.Forms.ComboBox ComboType;
public System.Windows.Forms.ComboBox ComboPhone;
public System.Windows.Forms.Label LabelSis;
public System.Windows.Forms.Label LabelJad;
public System.Windows.Forms.Label LabelJar;
public System.Windows.Forms.Label LabelType;
public System.Windows.Forms.Label LabelPhone;
//NOTE: The following procedure is required by the Windows Form Designer
//It can be modified using the Windows Form Designer.
//Do not modify it using the code editor.
internal System.Windows.Forms.ProgressBar ProgressBar1;
internal System.Windows.Forms.Label labelWait;
public System.Windows.Forms.TextBox TextNth;
public System.Windows.Forms.Button CommandNth;
internal System.Windows.Forms.Button CommandList;
public System.Windows.Forms.TextBox TextNGage;
public System.Windows.Forms.Button CommandNGage;
public System.Windows.Forms.Label NGageLabel;
internal System.Windows.Forms.Timer Timer1;
public System.Windows.Forms.Label LabelNth;
[System.Diagnostics.DebuggerStepThrough()]
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(InstallerDialog));
this.ToolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.CommandList = new System.Windows.Forms.Button();
this.TextSis = new System.Windows.Forms.TextBox();
this.TextJad = new System.Windows.Forms.TextBox();
this.TextJar = new System.Windows.Forms.TextBox();
this.CommandJad = new System.Windows.Forms.Button();
this.CommandSis = new System.Windows.Forms.Button();
this.CommandJar = new System.Windows.Forms.Button();
this.CommandCancel = new System.Windows.Forms.Button();
this.CommandInstall = new System.Windows.Forms.Button();
this.ComboType = new System.Windows.Forms.ComboBox();
this.ComboPhone = new System.Windows.Forms.ComboBox();
this.LabelSis = new System.Windows.Forms.Label();
this.LabelJad = new System.Windows.Forms.Label();
this.LabelJar = new System.Windows.Forms.Label();
this.LabelType = new System.Windows.Forms.Label();
this.LabelPhone = new System.Windows.Forms.Label();
this.ProgressBar1 = new System.Windows.Forms.ProgressBar();
this.labelWait = new System.Windows.Forms.Label();
this.TextNth = new System.Windows.Forms.TextBox();
this.CommandNth = new System.Windows.Forms.Button();
this.LabelNth = new System.Windows.Forms.Label();
this.TextNGage = new System.Windows.Forms.TextBox();
this.CommandNGage = new System.Windows.Forms.Button();
this.NGageLabel = new System.Windows.Forms.Label();
this.Timer1 = new System.Windows.Forms.Timer(this.components);
this.SuspendLayout();
//
// CommandList
//
this.CommandList.Location = new System.Drawing.Point(343, 8);
this.CommandList.Name = "CommandList";
this.CommandList.Size = new System.Drawing.Size(75, 25);
this.CommandList.TabIndex = 24;
this.CommandList.Text = "List...";
this.ToolTip1.SetToolTip(this.CommandList, "Lists installed applications");
this.CommandList.UseVisualStyleBackColor = true;
this.CommandList.Click += new System.EventHandler(this.CommandList_Click);
//
// TextSis
//
this.TextSis.AcceptsReturn = true;
this.TextSis.BackColor = System.Drawing.SystemColors.Window;
this.TextSis.Cursor = System.Windows.Forms.Cursors.IBeam;
this.TextSis.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.TextSis.ForeColor = System.Drawing.SystemColors.WindowText;
this.TextSis.Location = new System.Drawing.Point(96, 144);
this.TextSis.MaxLength = 0;
this.TextSis.Name = "TextSis";
this.TextSis.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.TextSis.Size = new System.Drawing.Size(313, 20);
this.TextSis.TabIndex = 13;
//
// TextJad
//
this.TextJad.AcceptsReturn = true;
this.TextJad.BackColor = System.Drawing.SystemColors.Window;
this.TextJad.Cursor = System.Windows.Forms.Cursors.IBeam;
this.TextJad.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.TextJad.ForeColor = System.Drawing.SystemColors.WindowText;
this.TextJad.Location = new System.Drawing.Point(96, 112);
this.TextJad.MaxLength = 0;
this.TextJad.Name = "TextJad";
this.TextJad.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.TextJad.Size = new System.Drawing.Size(313, 20);
this.TextJad.TabIndex = 11;
//
// TextJar
//
this.TextJar.AcceptsReturn = true;
this.TextJar.BackColor = System.Drawing.SystemColors.Window;
this.TextJar.Cursor = System.Windows.Forms.Cursors.IBeam;
this.TextJar.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.TextJar.ForeColor = System.Drawing.SystemColors.WindowText;
this.TextJar.Location = new System.Drawing.Point(96, 80);
this.TextJar.MaxLength = 0;
this.TextJar.Name = "TextJar";
this.TextJar.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.TextJar.Size = new System.Drawing.Size(313, 20);
this.TextJar.TabIndex = 9;
//
// CommandJad
//
this.CommandJad.BackColor = System.Drawing.SystemColors.Control;
this.CommandJad.Cursor = System.Windows.Forms.Cursors.Default;
this.CommandJad.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.CommandJad.ForeColor = System.Drawing.SystemColors.ControlText;
this.CommandJad.Location = new System.Drawing.Point(424, 112);
this.CommandJad.Name = "CommandJad";
this.CommandJad.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.CommandJad.Size = new System.Drawing.Size(73, 25);
this.CommandJad.TabIndex = 8;
this.CommandJad.Text = "Browse...";
this.CommandJad.UseVisualStyleBackColor = false;
this.CommandJad.Click += new System.EventHandler(this.CommandJad_Click);
//
// CommandSis
//
this.CommandSis.BackColor = System.Drawing.SystemColors.Control;
this.CommandSis.Cursor = System.Windows.Forms.Cursors.Default;
this.CommandSis.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.CommandSis.ForeColor = System.Drawing.SystemColors.ControlText;
this.CommandSis.Location = new System.Drawing.Point(424, 144);
this.CommandSis.Name = "CommandSis";
this.CommandSis.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.CommandSis.Size = new System.Drawing.Size(73, 25);
this.CommandSis.TabIndex = 7;
this.CommandSis.Text = "Browse...";
this.CommandSis.UseVisualStyleBackColor = false;
this.CommandSis.Click += new System.EventHandler(this.CommandSis_Click);
//
// CommandJar
//
this.CommandJar.BackColor = System.Drawing.SystemColors.Control;
this.CommandJar.Cursor = System.Windows.Forms.Cursors.Default;
this.CommandJar.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.CommandJar.ForeColor = System.Drawing.SystemColors.ControlText;
this.CommandJar.Location = new System.Drawing.Point(424, 80);
this.CommandJar.Name = "CommandJar";
this.CommandJar.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.CommandJar.Size = new System.Drawing.Size(73, 25);
this.CommandJar.TabIndex = 6;
this.CommandJar.Text = "Browse...";
this.CommandJar.UseVisualStyleBackColor = false;
this.CommandJar.Click += new System.EventHandler(this.CommandJar_Click);
//
// CommandCancel
//
this.CommandCancel.BackColor = System.Drawing.SystemColors.Control;
this.CommandCancel.Cursor = System.Windows.Forms.Cursors.Default;
this.CommandCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.CommandCancel.Enabled = false;
this.CommandCancel.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.CommandCancel.ForeColor = System.Drawing.SystemColors.ControlText;
this.CommandCancel.Location = new System.Drawing.Point(424, 40);
this.CommandCancel.Name = "CommandCancel";
this.CommandCancel.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.CommandCancel.Size = new System.Drawing.Size(73, 25);
this.CommandCancel.TabIndex = 5;
this.CommandCancel.Text = "Cancel";
this.CommandCancel.UseVisualStyleBackColor = false;
this.CommandCancel.Click += new System.EventHandler(this.CommandCancel_Click);
//
// CommandInstall
//
this.CommandInstall.BackColor = System.Drawing.SystemColors.Control;
this.CommandInstall.Cursor = System.Windows.Forms.Cursors.Default;
this.CommandInstall.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.CommandInstall.ForeColor = System.Drawing.SystemColors.ControlText;
this.CommandInstall.Location = new System.Drawing.Point(424, 8);
this.CommandInstall.Name = "CommandInstall";
this.CommandInstall.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.CommandInstall.Size = new System.Drawing.Size(73, 25);
this.CommandInstall.TabIndex = 4;
this.CommandInstall.Text = "Install";
this.CommandInstall.UseVisualStyleBackColor = false;
this.CommandInstall.Click += new System.EventHandler(this.CommandInstall_Click);
//
// ComboType
//
this.ComboType.BackColor = System.Drawing.SystemColors.Window;
this.ComboType.Cursor = System.Windows.Forms.Cursors.Default;
this.ComboType.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.ComboType.ForeColor = System.Drawing.SystemColors.WindowText;
this.ComboType.Location = new System.Drawing.Point(96, 40);
this.ComboType.Name = "ComboType";
this.ComboType.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.ComboType.Size = new System.Drawing.Size(209, 22);
this.ComboType.TabIndex = 2;
this.ComboType.SelectedIndexChanged += new System.EventHandler(this.ComboType_SelectedIndexChanged);
//
// ComboPhone
//
this.ComboPhone.BackColor = System.Drawing.SystemColors.Window;
this.ComboPhone.Cursor = System.Windows.Forms.Cursors.Default;
this.ComboPhone.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.ComboPhone.ForeColor = System.Drawing.SystemColors.WindowText;
this.ComboPhone.Location = new System.Drawing.Point(96, 8);
this.ComboPhone.Name = "ComboPhone";
this.ComboPhone.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.ComboPhone.Size = new System.Drawing.Size(209, 22);
this.ComboPhone.TabIndex = 0;
this.ComboPhone.SelectedIndexChanged += new System.EventHandler(this.ComboPhone_SelectedIndexChanged);
//
// LabelSis
//
this.LabelSis.BackColor = System.Drawing.SystemColors.Control;
this.LabelSis.Cursor = System.Windows.Forms.Cursors.Default;
this.LabelSis.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -