private void InitAttr() { settingIsLoaded = false; try { setting = ModuleSetting.Load(); settingIsLoaded = true; reportServer1 = setting.serveraddress1; reportServer2 = setting.serveraddress2; //screenID = setting.screen_id; } catch (Exception ex) { throw ex; } numFacesDetected = 0; showGrid = false; doRegister = false; isAutoRegister = true; isDBLoaded = false; lastRegisterTime = DateTime.Now; failedCount = new int[5] { 0, 0, 0, 0, 0 }; isRecordingEnabled = true; ConfigureRecording(); autoRegisterToolStripMenuItem.Checked = isAutoRegister; btRegister.Enabled = !isAutoRegister; showGridToolStripMenuItem.Checked = showGrid; faceRectColor = new List <Color>(); faceRectColor.Add(Color.Coral); faceRectColor.Add(Color.Lime); faceRectColor.Add(Color.Cyan); faceRectColor.Add(Color.Beige); faceRectColor.Add(Color.Yellow); msgCount = 1; logFile = Application.StartupPath + "\\openscreen.log"; //saveFaceImgRootDir = Application.StartupPath + "\\faceimg\\"; saveFaceImgRootDir = "c:\\AG_Image\\"; allRecogFaces = new List <FaceObject>(); try { agClient = new UdpClient(agServerAddr, agServerPort); } catch (Exception ex) { ShowError(ex.Message); } autoRegTimer.Start(); pictureBox.Paint += PictureBox_Paint; }
private void configurationToolStripMenuItem_Click(object sender, EventArgs e) { ConfigForm configForm = new ConfigForm(); if (configForm.ShowDialog() == DialogResult.OK) { setting = ModuleSetting.Load(); ConfigureCameraInfo(); ConfigureRecogInfo(); } }
private void LoadConfigFile() { try { setting = ModuleSetting.Load(); this.DisplayConfigContent(); } catch (Exception ex) { ShowError(ex.Message); } }