private void Frm_Pause_Load(object sender, EventArgs e) { this.cmb_cameras.Items.Add("All Cameras"); //add all cameras stats entry int i = 0; int oldidxstats = 0; if (CurrentCam != null) { foreach (Camera cam in AppSettings.Settings.CameraList) { this.cmb_cameras.Items.Add($" {cam.Name}"); if (this.CurrentCam.Name.EqualsIgnoreCase(cam.Name)) { oldidxstats = i + 1; } i++; } } if (this.cmb_cameras.Items.Count > 0) { this.cmb_cameras.SelectedIndex = oldidxstats; } this.ShowCamera(); Global_GUI.RestoreWindowState(this); //timer1.Start(); }
private void Frm_DynamicMaskDetails_Load(object sender, EventArgs e) { this.loading = true; Global_GUI.ConfigureFOLV(this.FOLV_MaskHistory, typeof(ObjectPosition), null, null, "createDate", SortOrder.Descending); Global_GUI.ConfigureFOLV(this.FOLV_Masks, typeof(ObjectPosition), null, null, "createDate", SortOrder.Descending); Global_GUI.RestoreWindowState(this); this.comboBox_filter_camera.Items.Clear(); this.comboBox_filter_camera.Items.Add("All Cameras"); int i = 1; int curidx = 1; foreach (Camera curcam in AppSettings.Settings.CameraList) { this.comboBox_filter_camera.Items.Add($" {curcam.Name}"); if (this.cam.Name.Trim().ToLower() == curcam.Name.Trim().ToLower()) { curidx = i; Log($"Cam '{curcam.Name}' is at index '{curidx}'"); } i++; } this.comboBox_filter_camera.SelectedIndex = curidx; this.Refresh(); this.loading = false; }
private void Frm_ImageAdjust_Load(object sender, EventArgs e) { Global_GUI.RestoreWindowState(this); UpdateProfile(); this.tb_ImageFile.Text = GetBestImage(); }
private void Frm_RelevantObjects_Load(object sender, EventArgs e) { Loading = true; using var Trace = new Trace(); //This c# 8.0 using feature will auto dispose when the function is done. Global_GUI.ConfigureFOLV(FOLV_RelevantObjects, typeof(ClsRelevantObject)); this.FOLV_RelevantObjects.BooleanCheckStateGetter = delegate(Object rowObject) { return(((ClsRelevantObject)rowObject).Enabled); }; this.FOLV_RelevantObjects.BooleanCheckStatePutter = delegate(Object rowObject, bool newValue) { ((ClsRelevantObject)rowObject).Enabled = newValue; return(newValue); }; this.ObjectList = ObjectManager.ToList(); Global_GUI.UpdateFOLV(FOLV_RelevantObjects, this.ObjectList); Global_GUI.RestoreWindowState(this); Global_GUI.GroupboxEnableDisable(groupBox1, cb_enabled); Loading = false; }
private void Frm_RelevantObjects_Load(object sender, EventArgs e) { Loading = true; using var Trace = new Trace(); //This c# 8.0 using feature will auto dispose when the function is done. Global_GUI.ConfigureFOLV(FOLV_RelevantObjects, typeof(ClsRelevantObject)); this.FOLV_RelevantObjects.BooleanCheckStateGetter = delegate(Object rowObject) { return(!rowObject.IsNull() && ((ClsRelevantObject)rowObject).Enabled); }; this.FOLV_RelevantObjects.BooleanCheckStatePutter = delegate(Object rowObject, bool newValue) { if (rowObject.IsNull()) { return(false); } ((ClsRelevantObject)rowObject).Enabled = newValue; return(newValue); }; this.FillCombo(); this.SetROM(); this.LoadROMList(); Global_GUI.RestoreWindowState(this); Loading = false; }
/********************* Start EVENT section*************************************/ private void Frm_CustomMasking_Load(object sender, EventArgs e) { Global_GUI.RestoreWindowState(this); UpdateRes(); UpdateMaskFile(); }
private void Frm_DynamicMaskDetails_Load(object sender, EventArgs e) { Global_GUI.ConfigureFOLV(ref FOLV_MaskHistory, typeof(ObjectPosition), null, null); Global_GUI.ConfigureFOLV(ref FOLV_Masks, typeof(ObjectPosition), null, null); Global_GUI.RestoreWindowState(this); Refresh(); }
private void Frm_Faces_Load(object sender, EventArgs e) { using var Trace = new Trace(); //This c# 8.0 using feature will auto dispose when the function is done. Global_GUI.ConfigureFOLV(FOLV_Faces, typeof(ClsFace)); Global_GUI.ConfigureFOLV(FOLV_FaceFiles, typeof(ClsFaceFile)); Global_GUI.UpdateFOLV(FOLV_Faces, AITOOL.FaceMan.Faces, FullRefresh: true); Global_GUI.RestoreWindowState(this); }
/********************* Start EVENT section*************************************/ private void Frm_CustomMasking_Load(object sender, EventArgs e) { Global_GUI.RestoreWindowState(this); this._maskfilename = AITOOL.GetMaskFile(this.Cam.Name); this.Text = "Custom Masking - " + this._maskfilename; if (!File.Exists(this._maskfilename)) { this.Text += " (Missing)"; } this.BrushSize = this.Cam.mask_brush_size; this.numBrushSize.Value = this.Cam.mask_brush_size; this.ShowImage(); }
private void Frm_Actions_Load(object sender, EventArgs e) { try { Global_GUI.ConfigureFOLV(ref FOLV_Actions, typeof(CameraTriggerAction), null, null); Global_GUI.UpdateFOLV(ref FOLV_Actions, actions, true); Global_GUI.RestoreWindowState(this); string[] triggertypes = Enum.GetNames(typeof(TriggerType)); //cbType.Items.AddRange(triggertypes); } catch (Exception ex) { Global.Log("Error: " + ex.Message); } }
private void Frm_Errors_Load(object sender, EventArgs e) { Global_GUI.RestoreWindowState(this); this.Show(); try { Global_GUI.ConfigureFOLV(this.folv_errors, typeof(ClsLogItm), null, null, "Time", SortOrder.Descending); Global_GUI.UpdateFOLV(this.folv_errors, this.errors); } catch (Exception) { throw; } }
private void Frm_ObjectDetail_Load(object sender, EventArgs e) { Global_GUI.RestoreWindowState(this); this.Show(); try { Global_GUI.ConfigureFOLV(this.folv_ObjectDetail, typeof(ClsPrediction), null, null); Global_GUI.UpdateFOLV(this.folv_ObjectDetail, this.PredictionObjectDetail); } catch (Exception) { throw; } }
private void Frm_ObjectDetail_Load(object sender, EventArgs e) { Global_GUI.RestoreWindowState(this); this.Show(); try { Global_GUI.ConfigureFOLV(this.folv_ObjectDetail, typeof(ClsPrediction), null, null); Global_GUI.UpdateFOLV(this.folv_ObjectDetail, this.PredictionObjectDetails); if (!String.IsNullOrEmpty(this.ImageFileName) && this.ImageFileName.Contains("\\") && File.Exists(this.ImageFileName)) { OriginalBMP = new Bitmap(this.ImageFileName); this.pictureBox1.Image = OriginalBMP; //load actual image as background, so that an overlay can be added as the image } } catch (Exception) { throw; } }
private void Frm_PredSizeLimits_Load(object sender, EventArgs e) { Global_GUI.RestoreWindowState(this); }
private void Frm_LegacyActions_Load(object sender, EventArgs e) { Global_GUI.RestoreWindowState(this); }
private void Frm_UpdateCheck_Load(object sender, EventArgs e) { Global_GUI.RestoreWindowState(this); }
private void Frm_AddAIServers_Load(object sender, EventArgs e) { Global_GUI.RestoreWindowState(this); Global_GUI.ConfigureFOLV(FOLV_AIServers, typeof(ClsURLItem), null, this.imageList1); Global_GUI.UpdateFOLV(FOLV_AIServers, AppSettings.Settings.AIURLList); }
private void Frm_Variables_Load(object sender, EventArgs e) { Global_GUI.ConfigureFOLV(FOLV_Vars, typeof(ClsProp)); Global_GUI.UpdateFOLV(FOLV_Vars, props, ResizeColsStyle: ColumnHeaderAutoResizeStyle.ColumnContent); Global_GUI.RestoreWindowState(this); }