public UpdateProgram(ILEObject Program, ILEObject[] Modules) { InitializeComponent(); switch (Program.Type) { case "*PGM": pgmTypeText.Text = "Program"; break; case "*SRVPGM": pgmTypeText.Text = "Service Program"; break; } this.Text = "Update " + pgmTypeText.Text; pgm.Text = Program.Library + "/" + Program.Name; isSrvPgm = (Program.Type == "*SRVPGM"); binderSrcBox.Enabled = isSrvPgm; bndLib.Text = Program.Library; bndLib.Text = "QSRVSRC"; bndLib.Text = "*SRVPGM"; foreach (ILEObject Object in Modules) { if (Object.Type == "*MODULE") { modules.Items.Add(new ListViewItem(Object.Library + "/" + Object.Name, 0)); } } }
private void objectList_MouseClick(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Right) { if (objectList.FocusedItem.Bounds.Contains(e.Location) == true) { currentRightClick = (ILEObject)objectList.FocusedItem.Tag; objectRightClick.Show(Cursor.Position); } } }
public ObjectInformation(ILEObject Object) { InitializeComponent(); objInfo.Items.Add(new ListViewItem(new string[] { "Location", Object.Library + "/" + Object.Name })); objInfo.Items.Add(new ListViewItem(new string[] { "Text", Object.Text })); objInfo.Items.Add(new ListViewItem(new string[] { "Size (KB)", Object.SizeKB.ToString() })); objInfo.Items.Add(new ListViewItem(new string[] { "Program Type", Object.Type })); objInfo.Items.Add(new ListViewItem(new string[] { "Owner", Object.Owner })); if (Object.SrcSpf != "") { objInfo.Items.Add(new ListViewItem(new string[] { "Extension", Object.Extension })); objInfo.Items.Add(new ListViewItem(new string[] { "Source Path", Object.SrcLib + "/" + Object.SrcSpf + "(" + Object.SrcMbr + ")" })); } }