private void OK_Button_Click(object sender, EventArgs e) { try { HelpHandler help = new HelpHandler(); help.TextBoxEmptyChecked(this.groupBox1); #region 普通会议 scheduleConf.name = this.tb_Name.Text.ToString(); scheduleConf.beginTime = Convert.ToDateTime(this.tb_BeginTime.Text.ToString()); scheduleConf.duration = this.tb_Duration.Text.ToString(); scheduleConf.rate = this.tb_Rate.Text.ToString(); //新建会场 SiteInfoEx siteInfo1 = new SiteInfoEx(); //会场URI为01033001 siteInfo1.uri = this.tb_Site1_URI.Text.ToString(); //会场速率为1920K siteInfo1.rate = "1920K"; //会场名称为site1 siteInfo1.name = this.tb_Site1_Name.Text.ToString(); //呼叫方式为MCU主动呼叫会场 siteInfo1.dialingMode = 0; //会场来源为内部会场 siteInfo1.from = 0; //会场类型为H.323会场类型 siteInfo1.type = 4; //会场视频格式为4CIF siteInfo1.videoFormat = 0; //会场视频协议为H.263 siteInfo1.videoProtocol = 0; siteInfo1.isLockVideoSource = 1; siteInfo1.participantType = 2; SiteInfoEx siteInfo2 = new SiteInfoEx(); siteInfo2.uri = this.tb_Site2_URI.Text.ToString(); siteInfo2.name = this.tb_Site2_Name.Text.ToString(); siteInfo2.rate = "1920K"; siteInfo2.dialingMode = 0; siteInfo2.from = 0; siteInfo2.type = 4; siteInfo2.videoFormat = 0; siteInfo2.videoProtocol = 0; siteInfo2.isLockVideoSource = 1; siteInfo2.participantType = 2; //向会议中添加会场 SiteInfoEx[] sites = { siteInfo1, siteInfo2 }; scheduleConf.sites = sites; scheduleConf.isRecording = 0; scheduleConf.cpResouce = Convert.ToInt32(this.tb_cpResouce_Add.Text.ToString()); scheduleConf.password = this.tb_PWD_Add.Text.ToString(); scheduleConf.chairmanPassword = this.tb_chairmanPWD_Add.Text.ToString(); scheduleConf.mainSiteUri = this.tb_mainSite_Add.Text.ToString(); //会议通知 ConferenceNotice conferenceNotice = new ConferenceNotice(); conferenceNotice.content = "123"; conferenceNotice.email = "*****@*****.**"; scheduleConf.conferenceNotice = conferenceNotice; #endregion #region 周期会议 scheduleCurrenceConf.name = this.tb_Name.Text.ToString(); scheduleCurrenceConf.beginTime = Convert.ToDateTime(this.tb_BeginTime.Text.ToString()); scheduleCurrenceConf.duration = this.tb_Duration.Text.ToString(); scheduleCurrenceConf.rate = this.tb_Rate.Text.ToString(); scheduleCurrenceConf.sites = sites; scheduleCurrenceConf.isRecording = 0; scheduleCurrenceConf.cpResouce = Convert.ToInt32(this.tb_cpResouce_Add.Text.ToString()); scheduleCurrenceConf.password = this.tb_PWD_Add.Text.ToString(); scheduleCurrenceConf.chairmanPassword = this.tb_chairmanPWD_Add.Text.ToString(); scheduleCurrenceConf.mainSiteUri = this.tb_mainSite_Add.Text.ToString(); scheduleCurrenceConf.frequency = Convert.ToInt32(this.tb_frequency_Add.Text.ToString()); scheduleCurrenceConf.interval = Convert.ToInt32(this.tb_Interval_Add.Text.ToString()); scheduleCurrenceConf.count = Convert.ToInt32(this.tb_Count_Add.Text.ToString()); scheduleCurrenceConf.timeZone = this.tb_timeZone_Add.Text.ToString(); #endregion this.DialogResult = DialogResult.Yes; } catch (Exception error) { MessageBox.Show(error.ToString()); } }
public ConferenceNoticeViewModel(ConferenceNotice notice, Clock clock) { _notice = notice; _clock = clock; }