protected bool SetConfig() { if (mConfig == null && mManager != null) { mConfig = mManager.CreateConfigInstance(); } if (mConfig != null) { (mConfig as CConfig).Name = textBox_name.Text; mConfig.SetValue("Name", textBox_name.Text); mConfig.Desc = textBox_desc.Text; mConfig.Type = CtrlUtil.GetComboBoxText(comboBox_type); mConfig.FPS = (int)numericUpDown_fps.Value; mConfig.IP = textBox_ip.Text; mConfig.Port = (short)numericUpDown_port.Value; mConfig.SetValue("Channel", textBox_channel.Text.Trim()); mConfig.ShowOSDType = (int)numericUpDown_osd.Value; mConfig.StartTime = dateTimePicker_begin.Value; mConfig.StopTime = dateTimePicker_end.Value; mConfig.UserName = textBox_username.Text; mConfig.Password = textBox_password.Text; mConfig.FileName = textBox_filename.Text; mConfig.IsCycle = checkBox_cycle.Checked; mConfig.IsRecord = checkBox_record.Checked; mConfig.Enabled = checkBox_enabled.Checked; return(true); } return(false); }
protected bool SetVSConfig() { if (mVSConfig != null) { mVSConfig.Type = CtrlUtil.GetComboBoxText(comboBox_vsType); mVSConfig.FPS = (int)numericUpDown_fps.Value; mVSConfig.IP = textBox_dvr_ip.Text; mVSConfig.Port = (short)numericUpDown_dvr_port.Value; mVSConfig.SetValue("Channel", textBox_channel.Text); mVSConfig.ShowOSDType = (int)numericUpDown_osd.Value; mVSConfig.StartTime = dateTimePicker_begin.Value; mVSConfig.StopTime = dateTimePicker_end.Value; mVSConfig.SetValue("Domain", textBox_domain.Text); mVSConfig.UserName = textBox_username.Text; mVSConfig.Password = textBox_password.Text; mVSConfig.FileName = textBox_filename.Text; mVSConfig.RunMode = checkBox_runMode_push.Checked ? VideoSourceRunMode.Push : VideoSourceRunMode.Pull; mVSConfig.IsCycle = checkBox_cycle.Checked; mVSConfig.OnChanged(); return(true); } return(false); }
protected bool SetConfig() { if (mConfig == null && mManager != null) { mConfig = mManager.CreateConfigInstance(); } if (mConfig != null) { (mConfig as CConfig).Name = textBox_name.Text; mConfig.SetValue("Name", textBox_name.Text); mConfig.Desc = textBox_desc.Text; mConfig.Type = CtrlUtil.GetComboBoxText(comboBox_type); mConfig.FPS = (int)numericUpDown_fps.Value; mConfig.FileName = textBox_filename.Text; mConfig.IsCycle = checkBox_cycle.Checked; mConfig.IsRecord = checkBox_record.Checked; mConfig.Enabled = checkBox_enabled.Checked; return(true); } return(false); }