View Single Post
Old 02-11-2021, 11:46   #6 (permalink)
forhike
No Life Poster
 
forhike's Avatar
 
Join Date: Aug 2002
Location: Up North
Posts: 900
Member: 14934
Status: Offline
Thanks Meter: 79
public class Devicesel : Form
{
// Token: 0x06000520 RID: 1312 RVA: 0x00073DF4 File Offset: 0x00071FF4
public Devicesel()
{
this.devtypelist = new List<UC123.DeviceType>();
this.Haslicensekey = new List<bool>();
this.Licensename = new List<string>();
this.Serialnumber = new List<string>();
this.Wasdisabled = new List<bool>();
this.InitializeComponent();
}

// Token: 0x06000521 RID: 1313 RVA: 0x00073E4C File Offset: 0x0007204C
public void Adddevice(int devtype, int devserial, string licensename, bool Haslicensekey, bool disabledillegal)
{
this.devtypelist.Add((UC123.DeviceType)devtype);
this.Licensename.Add(licensename);
this.Haslicensekey.Add(Haslicensekey);
this.Serialnumber.Add(devserial.ToString("X").ToUp per());
this.Wasdisabled.Add(disabledillegal);
if (Haslicensekey)
{
if (disabledillegal)
{
this.devlistbox.Items.Add(string.Concat(new object[]
{
"Device type: ",
(UC123.DeviceType)devtype,
" serial No.:",
devserial.ToString("X"),
" (Disabled)"
}));
return;
}
this.devlistbox.Items.Add(string.Concat(new object[]
{
"Device type: ",
(UC123.DeviceType)devtype,
" serial No.:",
devserial.ToString("X")
}));
return;
}
else
{
if (devtype <= 0)
{
this.devlistbox.Items.Add("Device type: " + (UC123.DeviceType)devtype);
return;
}
this.devlistbox.Items.Add(string.Concat(new object[]
{
"Device type: ",
(UC123.DeviceType)devtype,
" serial No.:",
devserial.ToString("X"),
" (No license key)"
}));
return;
}
}

// Token: 0x06000522 RID: 1314 RVA: 0x00073FBC File Offset: 0x000721BC
public int SelectitembySerial(string serial)
{
serial = serial.ToUpper();
for (int i = 0; i < this.Serialnumber.Count; i++)
{
if (serial == this.Serialnumber[i])
{
this.selecteddevnumber = i + 1;
this.selecteddevtype = this.devtypelist[i];
return i + 1;
}
}
return -1;
}

// Token: 0x06000523 RID: 1315 RVA: 0x00005309 File Offset: 0x00003509
public void SelectitembyID(int itemnumber)
{
this.devlistbox.SelectedIndex = itemnumber;
this.selecteddevnumber = itemnumber + 1;
this.selecteddevtype = this.devtypelist[itemnumber];
}

// Token: 0x06000524 RID: 1316 RVA: 0x00005332 File Offset: 0x00003532
private void Devicesel_Load(object sender, EventArgs e)
{
this.devlistbox.Focus();
}

// Token: 0x06000525 RID: 1317 RVA: 0x00005340 File Offset: 0x00003540
private void Devicesel_FormClosing(object sender, FormClosingEventArgs e)
{
this.selecteddevnumber = this.devlistbox.SelectedIndex + 1;
this.selecteddevtype = this.devtypelist[this.devlistbox.SelectedIndex];
}

// Token: 0x06000526 RID: 1318 RVA: 0x00005371 File Offset: 0x00003571
private void continuebutton_Click(object sender, EventArgs e)
{
this.OKclicked = true;
base.Close();
}

// Token: 0x06000527 RID: 1319 RVA: 0x00002050 File Offset: 0x00000250
private void devlistbox_SelectedIndexChanged(object sender, EventArgs e)
{
}

// Token: 0x06000528 RID: 1320 RVA: 0x00005380 File Offset: 0x00003580
private void devlistbox_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == '\r')
{
this.OKclicked = true;
base.Close();
}
}

// Token: 0x06000529 RID: 1321 RVA: 0x00005399 File Offset: 0x00003599
private void Devicesel_Shown(object sender, EventArgs e)
{
base.Focus();
base.Activate();
}

// Token: 0x0600052A RID: 1322 RVA: 0x000053A8 File Offset: 0x000035A8
protected override void Dispose(bool disposing)
{
if (disposing && this.components != null)
{
this.components.Dispose();
}
base.Dispose(disposing);
}

// Token: 0x0600052B RID: 1323 RVA: 0x00074020 File Offset: 0x00072220
private void InitializeComponent()
{
ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(Devicesel));
this.devlistbox = new ListBox();
this.continuebutton = new Button();
this.label1 = new Label();
base.SuspendLayout();
this.devlistbox.Font = new Font("Microsoft Sans Serif", 12f, FontStyle.Regular, GraphicsUnit.Point, 238);
this.devlistbox.FormattingEnabled = true;
this.devlistbox.ItemHeight = 20;
this.devlistbox.Location = new Point(12, 39);
this.devlistbox.Name = "devlistbox";
this.devlistbox.Size = new Size(570, 304);
this.devlistbox.TabIndex = 0;
this.devlistbox.SelectedIndexChanged += this.devlistbox_SelectedIndexChanged;
this.devlistbox.KeyPress += this.devlistbox_KeyPress;
this.continuebutton.Font = new Font("Microsoft Sans Serif", 12f, FontStyle.Regular, GraphicsUnit.Point, 238);
this.continuebutton.Location = new Point(225, 355);
this.continuebutton.Name = "continuebutton";
this.continuebutton.Size = new Size(150, 40);
this.continuebutton.TabIndex = 1;
this.continuebutton.Text = "Continue";
this.continuebutton.UseVisualStyleBackColor = true;
this.continuebutton.Click += this.continuebutton_Click;
this.label1.AutoSize = true;
this.label1.Font = new Font("Microsoft Sans Serif", 12f, FontStyle.Regular, GraphicsUnit.Point, 238);
this.label1.Location = new Point(91, 9);
this.label1.Name = "label1";
this.label1.Size = new Size(389, 20);
this.label1.TabIndex = 2;
this.label1.Text = "Select the motion controller device to use from the list:";
base.AutoScaleDimensions = new SizeF(6f, 13f);
base.AutoScaleMode = AutoScaleMode.Font;
base.ClientSize = new Size(594, 404);
base.Controls.Add(this.label1);
base.Controls.Add(this.continuebutton);
base.Controls.Add(this.devlistbox);
base.FormBorderStyle = FormBorderStyle.FixedDialog;
base.Icon = (Icon)componentResourceManager.GetObject("$this.Ic on");
base.Name = "Devicesel";
base.StartPosition = FormStartPosition.CenterScreen;
this.Text = "Device selection";
base.FormClosing += this.Devicesel_FormClosing;
base.Load += this.Devicesel_Load;
base.Shown += this.Devicesel_Shown;
base.ResumeLayout(false);
base.PerformLayout();
}

// Token: 0x0400054F RID: 1359
public bool OKclicked;

// Token: 0x04000550 RID: 1360
public int selecteddevnumber = 1;

// Token: 0x04000551 RID: 1361
public UC100.DeviceType selecteddevtype;

// Token: 0x04000552 RID: 1362
private List<UC100.DeviceType> devtypelist;

// Token: 0x04000553 RID: 1363
public List<bool> Haslicensekey;

// Token: 0x04000554 RID: 1364
public List<string> Licensename;

// Token: 0x04000555 RID: 1365
public List<string> Serialnumber;

// Token: 0x04000556 RID: 1366
public List<bool> Wasdisabled;

// Token: 0x04000557 RID: 1367
private IContainer components;

// Token: 0x04000558 RID: 1368
private ListBox devlistbox;

// Token: 0x04000559 RID: 1369
private Button continuebutton;

// Token: 0x0400055A RID: 1370
private Label label1;
}
  Reply With Quote
 
Page generated in 0.09968 seconds with 7 queries