Beispiel #1
0
 private void GuidTextBox_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Return)
     {
         ViewDevice(GuidTextBox.Text.Trim());
         GuidTextBox.Clear();
     }
 }
 //TODO: Iterate through properties and dynamically generate controls at runtime.
 private void InitDBControls()
 {
     EntryTimeTextBox.SetDBInfo(HistoricalDevicesCols.ActionDateTime, ParseType.DisplayOnly, false);
     ActionUserTextBox.SetDBInfo(HistoricalDevicesCols.ActionUser, ParseType.DisplayOnly, false);
     ChangeTypeTextBox.SetDBInfo(HistoricalDevicesCols.ChangeType, Attributes.DeviceAttributes.ChangeType, ParseType.DisplayOnly, false);
     DescriptionTextBox.SetDBInfo(HistoricalDevicesCols.Description, ParseType.DisplayOnly, false);
     GuidTextBox.SetDBInfo(HistoricalDevicesCols.DeviceGuid, ParseType.DisplayOnly, false);
     CurrentUserTextBox.SetDBInfo(HistoricalDevicesCols.CurrentUser, ParseType.DisplayOnly, false);
     LocationTextBox.SetDBInfo(HistoricalDevicesCols.Location, Attributes.DeviceAttributes.Locations, ParseType.DisplayOnly, false);
     PONumberTextBox.SetDBInfo(HistoricalDevicesCols.PO, ParseType.DisplayOnly, false);
     AssetTagTextBox.SetDBInfo(HistoricalDevicesCols.AssetTag, ParseType.DisplayOnly, false);
     PurchaseDateTextBox.SetDBInfo(HistoricalDevicesCols.PurchaseDate, ParseType.DisplayOnly, false);
     OSVersionTextBox.SetDBInfo(HistoricalDevicesCols.OSVersion, Attributes.DeviceAttributes.OSType, ParseType.DisplayOnly, false);
     SerialTextBox.SetDBInfo(HistoricalDevicesCols.Serial, ParseType.DisplayOnly, false);
     ReplaceYearTextBox.SetDBInfo(HistoricalDevicesCols.ReplacementYear, ParseType.DisplayOnly, false);
     EQTypeTextBox.SetDBInfo(HistoricalDevicesCols.EQType, Attributes.DeviceAttributes.EquipType, ParseType.DisplayOnly, false);
     NotesTextBox.SetDBInfo(HistoricalDevicesCols.Notes, ParseType.DisplayOnly, false);
     StatusTextBox.SetDBInfo(HistoricalDevicesCols.Status, Attributes.DeviceAttributes.StatusType, ParseType.DisplayOnly, false);
     EntryGuidTextBox.SetDBInfo(HistoricalDevicesCols.HistoryEntryGuid, ParseType.DisplayOnly, false);
     chkTrackable.SetDBInfo(HistoricalDevicesCols.Trackable, ParseType.DisplayOnly, false);
     PhoneNumberTextBox.SetDBInfo(HistoricalDevicesCols.PhoneNumber, ParseType.DisplayOnly, false);
     HostnameTextBox.SetDBInfo(HistoricalDevicesCols.HostName, ParseType.DisplayOnly, false);
     iCloudTextBox.SetDBInfo(HistoricalDevicesCols.iCloudAccount, ParseType.DisplayOnly, false);
 }
Beispiel #3
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(GuidEditor));
     this.picValid   = new System.Windows.Forms.PictureBox();
     this.btnNewGuid = new System.Windows.Forms.Button();
     this.txtGuid    = new GuidTextBox();
     this.picInvalid = new System.Windows.Forms.PictureBox();
     this.tipGuid    = new System.Windows.Forms.ToolTip(this.components);
     this.SuspendLayout();
     //
     // picValid
     //
     this.picValid.Image    = ((System.Drawing.Image)(resources.GetObject("picValid.Image")));
     this.picValid.Location = new System.Drawing.Point(224, 2);
     this.picValid.Name     = "picValid";
     this.picValid.Size     = new System.Drawing.Size(16, 16);
     this.picValid.TabIndex = 0;
     this.picValid.TabStop  = false;
     this.tipGuid.SetToolTip(this.picValid, "The current text is a valid GUID.");
     this.picValid.Visible = false;
     //
     // btnNewGuid
     //
     this.btnNewGuid.Image      = ((System.Drawing.Image)(resources.GetObject("btnNewGuid.Image")));
     this.btnNewGuid.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
     this.btnNewGuid.Location   = new System.Drawing.Point(248, 0);
     this.btnNewGuid.Name       = "btnNewGuid";
     this.btnNewGuid.Size       = new System.Drawing.Size(24, 20);
     this.btnNewGuid.TabIndex   = 1;
     this.tipGuid.SetToolTip(this.btnNewGuid, "Generate a new GUID.");
     this.btnNewGuid.Click += new System.EventHandler(this.btnNewGuid_Click);
     //
     // txtGuid
     //
     this.txtGuid.Location     = new System.Drawing.Point(0, 0);
     this.txtGuid.Name         = "txtGuid";
     this.txtGuid.Size         = new System.Drawing.Size(224, 20);
     this.txtGuid.TabIndex     = 0;
     this.txtGuid.Text         = "";
     this.txtGuid.TextChanged += new System.EventHandler(this.txtGuid_TextChanged);
     //
     // picInvalid
     //
     this.picInvalid.Image    = ((System.Drawing.Image)(resources.GetObject("picInvalid.Image")));
     this.picInvalid.Location = new System.Drawing.Point(224, 2);
     this.picInvalid.Name     = "picInvalid";
     this.picInvalid.Size     = new System.Drawing.Size(16, 16);
     this.picInvalid.TabIndex = 3;
     this.picInvalid.TabStop  = false;
     this.tipGuid.SetToolTip(this.picInvalid, "The current text is not a valid GUID.");
     this.picInvalid.Visible = false;
     //
     // GuidEditor
     //
     this.Controls.Add(this.picInvalid);
     this.Controls.Add(this.txtGuid);
     this.Controls.Add(this.btnNewGuid);
     this.Controls.Add(this.picValid);
     this.MinimumSize = new System.Drawing.Size(272, 20);
     this.Name        = "GuidEditor";
     this.Size        = new System.Drawing.Size(272, 20);
     this.ResumeLayout(false);
 }