public static void LimpiarIndices(TListView vista, bool todos = false) { if (todos) { LimpiarIndices(); } else { switch (vista) { case TListView.Flags: lecturaFlags.Clear(); break; case TListView.Memoria: lecturaMemoria.Clear(); accesoMemoria.Clear(); break; case TListView.Programa: lecturaPrograma.Clear(); break; case TListView.Registros: lecturaRegistros.Clear(); accesoRegistros.Clear(); break; case TListView.Microinstrucciones: ejecucionMicroInstruccion = -1; break; } } }
public static void AñadirIndices(TListView vista, bool escritura = false, params int[] indices) { switch (vista) { case TListView.Registros: if (escritura) { foreach (int indice in indices) { accesoRegistros.Add(indice); } } else { foreach (int indice in indices) { lecturaRegistros.Add(indice); } } break; case TListView.Memoria: if (escritura) { foreach (int indice in indices) { accesoMemoria.Add(indice); } } else { foreach (int indice in indices) { lecturaMemoria.Add(indice); } } break; case TListView.Programa: lecturaPrograma.Clear(); accesoRegistros.Clear(); accesoMemoria.Clear(); lecturaRegistros.Clear(); lecturaMemoria.Clear(); lecturaFlags.Clear(); accesoFlags.Clear(); foreach (int indice in indices) { lecturaPrograma.Add(indice); } break; case TListView.Flags: if (indices == null) { break; } foreach (int indice in indices) { if (escritura) { accesoFlags.Add(indice); } else { lecturaFlags.Add(indice); } } break; case TListView.Microinstrucciones: ejecucionMicroInstruccion = indices[0]; break; } }
private void InitializeComponent() { components = new System.ComponentModel.Container(); tt = new System.Windows.Forms.ToolTip(components); lAdd = new System.Windows.Forms.Label(); lDel = new System.Windows.Forms.Label(); lEdit = new System.Windows.Forms.Label(); Button1 = new System.Windows.Forms.Button(); tlv = new TSSFL.UIControl.TListView(); chExts = new System.Windows.Forms.ColumnHeader(); chDesc = new System.Windows.Forms.ColumnHeader(); chPredefined = new System.Windows.Forms.ColumnHeader(); SuspendLayout(); tt.IsBalloon = true; lAdd.AccessibleDescription = "add2"; lAdd.AccessibleName = "pic_tip"; lAdd.FlatStyle = System.Windows.Forms.FlatStyle.Flat; lAdd.ForeColor = System.Drawing.Color.White; lAdd.Image = My.Resources.Resources.add32; lAdd.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; lAdd.Location = new System.Drawing.Point(360, 522); lAdd.Name = "lAdd"; lAdd.Size = new System.Drawing.Size(68, 27); lAdd.TabIndex = 180; lAdd.Text = "Add..."; lAdd.TextAlign = System.Drawing.ContentAlignment.MiddleRight; tt.SetToolTip(lAdd, "Adds a custom picture type <Ctrl+N>."); lDel.AccessibleDescription = "del"; lDel.AccessibleName = "pic_tip3"; lDel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; lDel.ForeColor = System.Drawing.Color.White; lDel.Image = My.Resources.Resources.del32_white; lDel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; lDel.Location = new System.Drawing.Point(498, 522); lDel.Name = "lDel"; lDel.Size = new System.Drawing.Size(70, 27); lDel.TabIndex = 181; lDel.Text = "Delete"; lDel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; tt.SetToolTip(lDel, "Deletes the selected custom picture type <Del>."); lEdit.AccessibleDescription = "edit2"; lEdit.AccessibleName = "pic_tip2"; lEdit.FlatStyle = System.Windows.Forms.FlatStyle.Flat; lEdit.ForeColor = System.Drawing.Color.White; lEdit.Image = My.Resources.Resources.edit32; lEdit.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; lEdit.Location = new System.Drawing.Point(430, 522); lEdit.Name = "lEdit"; lEdit.Size = new System.Drawing.Size(66, 27); lEdit.TabIndex = 170; lEdit.Text = "Edit..."; lEdit.TextAlign = System.Drawing.ContentAlignment.MiddleRight; tt.SetToolTip(lEdit, "Edits the selected custom picture type <Ctrl+E or Double-click>."); Button1.DialogResult = System.Windows.Forms.DialogResult.Cancel; Button1.Location = new System.Drawing.Point(359, 1000); Button1.Name = "Button1"; Button1.Size = new System.Drawing.Size(75, 23); Button1.TabIndex = 1; Button1.Text = "Button1"; Button1.UseVisualStyleBackColor = true; tlv.BackColor = System.Drawing.Color.White; tlv.BorderStyle = System.Windows.Forms.BorderStyle.None; tlv.Columns.AddRange(new System.Windows.Forms.ColumnHeader[3] { chExts, chDesc, chPredefined }); tlv.ForeColor = System.Drawing.Color.FromArgb(72, 72, 72); tlv.FullRowSelect = true; tlv.GridLines = true; tlv.HideSelection = false; tlv.Location = new System.Drawing.Point(9, 9); tlv.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); tlv.MultiSelect = false; tlv.Name = "tlv"; tlv.ShowItemToolTips = true; tlv.Size = new System.Drawing.Size(559, 504); tlv.TabIndex = 0; tlv.UseCompatibleStateImageBehavior = false; tlv.View = System.Windows.Forms.View.Details; chExts.Tag = "ext"; chExts.Text = "Extension(s)"; chExts.Width = 136; chDesc.Tag = "desc"; chDesc.Text = "Description"; chDesc.Width = 251; chPredefined.Tag = "pred1"; chPredefined.Text = "Predefined?"; chPredefined.Width = 145; base.AccessibleDescription = "ptm"; base.AutoScaleDimensions = new System.Drawing.SizeF(7f, 15f); base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; BackColor = System.Drawing.Color.FromArgb(103, 103, 103); base.CancelButton = Button1; base.ClientSize = new System.Drawing.Size(578, 559); base.Controls.Add(tlv); base.Controls.Add(lAdd); base.Controls.Add(lDel); base.Controls.Add(Button1); base.Controls.Add(lEdit); Font = new System.Drawing.Font("Segoe UI", 11.9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); ForeColor = System.Drawing.Color.FromArgb(72, 72, 72); base.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; base.KeyPreview = true; base.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); base.MaximizeBox = false; base.MinimizeBox = false; base.Name = "Types"; base.ShowInTaskbar = false; base.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; Text = "Picture types manager"; ResumeLayout(false); }
private void InitializeComponent() { components = new System.ComponentModel.Container(); ilTV = new System.Windows.Forms.ImageList(components); lCancel = new System.Windows.Forms.Label(); lOK = new System.Windows.Forms.Label(); bCancel = new System.Windows.Forms.Button(); bOK = new System.Windows.Forms.Button(); tlv = new TSSFL.UIControl.TListView(); chName = new System.Windows.Forms.ColumnHeader(); pb = new System.Windows.Forms.ProgressBar(); lProgress = new System.Windows.Forms.Label(); lTip = new System.Windows.Forms.Label(); lReport = new System.Windows.Forms.Label(); cms = new System.Windows.Forms.ContextMenuStrip(components); tsmiRemove = new System.Windows.Forms.ToolStripMenuItem(); tsmiRun = new System.Windows.Forms.ToolStripMenuItem(); cms.SuspendLayout(); SuspendLayout(); ilTV.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit; ilTV.ImageSize = new System.Drawing.Size(20, 16); ilTV.TransparentColor = System.Drawing.Color.Transparent; lCancel.AccessibleDescription = "cancel"; lCancel.BackColor = System.Drawing.Color.FromArgb(103, 103, 103); lCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; lCancel.ForeColor = System.Drawing.Color.White; lCancel.Location = new System.Drawing.Point(593, 595); lCancel.Name = "lCancel"; lCancel.Size = new System.Drawing.Size(74, 27); lCancel.TabIndex = 159; lCancel.Text = "Cancel"; lCancel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; lOK.AccessibleDescription = "ok"; lOK.BackColor = System.Drawing.Color.FromArgb(103, 103, 103); lOK.FlatStyle = System.Windows.Forms.FlatStyle.Flat; lOK.ForeColor = System.Drawing.Color.White; lOK.Location = new System.Drawing.Point(517, 595); lOK.Name = "lOK"; lOK.Size = new System.Drawing.Size(74, 27); lOK.TabIndex = 158; lOK.Text = "OK"; lOK.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; bCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; bCancel.Location = new System.Drawing.Point(69, 1000); bCancel.Name = "bCancel"; bCancel.Size = new System.Drawing.Size(75, 23); bCancel.TabIndex = 160; bCancel.Text = "Button1"; bCancel.UseVisualStyleBackColor = true; bOK.Location = new System.Drawing.Point(2, 1000); bOK.Name = "bOK"; bOK.Size = new System.Drawing.Size(75, 23); bOK.TabIndex = 161; bOK.Text = "Button1"; bOK.UseVisualStyleBackColor = true; tlv.BackColor = System.Drawing.Color.White; tlv.BorderStyle = System.Windows.Forms.BorderStyle.None; tlv.Columns.AddRange(new System.Windows.Forms.ColumnHeader[1] { chName }); tlv.ContextMenuStrip = cms; tlv.ForeColor = System.Drawing.Color.FromArgb(72, 72, 72); tlv.FullRowSelect = true; tlv.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; tlv.HideSelection = false; tlv.Location = new System.Drawing.Point(9, 37); tlv.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); tlv.Name = "tlv"; tlv.ShowItemToolTips = true; tlv.Size = new System.Drawing.Size(658, 521); tlv.Sorting = System.Windows.Forms.SortOrder.Ascending; tlv.TabIndex = 0; tlv.UseCompatibleStateImageBehavior = false; tlv.View = System.Windows.Forms.View.Details; chName.Tag = "name"; chName.Text = "Name"; chName.Width = 635; pb.Location = new System.Drawing.Point(9, 558); pb.Name = "pb"; pb.Size = new System.Drawing.Size(658, 28); pb.Step = 1; pb.TabIndex = 163; lProgress.AccessibleDescription = ""; lProgress.FlatStyle = System.Windows.Forms.FlatStyle.Flat; lProgress.ForeColor = System.Drawing.Color.White; lProgress.Location = new System.Drawing.Point(9, 588); lProgress.Name = "lProgress"; lProgress.Size = new System.Drawing.Size(658, 15); lProgress.TabIndex = 164; lProgress.Text = "0 / 354"; lProgress.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; lTip.AccessibleDescription = ""; lTip.BackColor = System.Drawing.Color.FromArgb(217, 217, 217); lTip.Font = new System.Drawing.Font("Segoe UI", 15.9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); lTip.ForeColor = System.Drawing.Color.FromArgb(72, 72, 72); lTip.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; lTip.Location = new System.Drawing.Point(9, 9); lTip.Name = "lTip"; lTip.Size = new System.Drawing.Size(658, 28); lTip.TabIndex = 166; lTip.Text = "Please review your checks, and then click <OK>."; lTip.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; lReport.AccessibleDescription = ""; lReport.BackColor = System.Drawing.Color.FromArgb(217, 217, 217); lReport.Font = new System.Drawing.Font("Segoe UI", 15.9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); lReport.ForeColor = System.Drawing.Color.FromArgb(72, 72, 72); lReport.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; lReport.Location = new System.Drawing.Point(9, 305); lReport.Name = "lReport"; lReport.Size = new System.Drawing.Size(658, 253); lReport.TabIndex = 167; lReport.Text = "Report:"; lReport.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; lReport.Visible = false; cms.Font = new System.Drawing.Font("Segoe UI", 11.9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); cms.Items.AddRange(new System.Windows.Forms.ToolStripItem[2] { tsmiRemove, tsmiRun }); cms.Name = "cms"; cms.Size = new System.Drawing.Size(220, 80); tsmiRemove.AccessibleDescription = ""; tsmiRemove.ForeColor = System.Drawing.Color.Black; tsmiRemove.Image = My.Resources.Resources.del32; tsmiRemove.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; tsmiRemove.Name = "tsmiRemove"; tsmiRemove.ShortcutKeys = System.Windows.Forms.Keys.Delete; tsmiRemove.Size = new System.Drawing.Size(219, 38); tsmiRemove.Text = "Remove"; tsmiRun.AccessibleDescription = "open"; tsmiRun.Image = My.Resources.Resources.run32; tsmiRun.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; tsmiRun.Name = "tsmiRun"; tsmiRun.ShortcutKeyDisplayString = "Double-click"; tsmiRun.Size = new System.Drawing.Size(219, 38); tsmiRun.Text = "Run/Open"; base.AcceptButton = bOK; base.AccessibleDescription = ""; base.AutoScaleDimensions = new System.Drawing.SizeF(7f, 15f); base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; BackColor = System.Drawing.Color.FromArgb(103, 103, 103); base.CancelButton = bCancel; base.ClientSize = new System.Drawing.Size(677, 631); base.Controls.Add(lReport); base.Controls.Add(lTip); base.Controls.Add(lCancel); base.Controls.Add(lOK); base.Controls.Add(lProgress); base.Controls.Add(pb); base.Controls.Add(tlv); base.Controls.Add(bOK); base.Controls.Add(bCancel); Font = new System.Drawing.Font("Segoe UI", 11.9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); ForeColor = System.Drawing.Color.FromArgb(72, 72, 72); base.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; base.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); base.MaximizeBox = false; base.MinimizeBox = false; base.Name = "DelProgress"; base.ShowInTaskbar = false; base.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; Text = "Delete files"; cms.ResumeLayout(false); ResumeLayout(false); }