private void launchVideoCallBtn_Click(object sender, EventArgs e) { vp = new VlcPlayer(this.axVLCPlugin21); //vlcPlayer初始化 vc = new VideoCall(MainForm.clientConnect, sevIP, localIP, localPort, remoteIP, remotePort, vp, camera, UserRole.teacher); //videoCall初始化 //之前这边错写成 VideoCall vc=new VideoCall(...),这样的话只是定义了一个与全局变量同名的局部变量,并对局部变量进行实例化, //但是全局变量vc仍然未实例化,导致下面recei()调用makeCallSuccess_A()函数中的vc为null,程序出错 vc.makeCall_A(); this.launchVideoCallBtn.Enabled = false; this.stopVideoCallBtn.Enabled = true; this.statusLbl.Text = "请求已发送,等待对方答复...."; }
private void stopVideoCallBtn_Click(object sender, EventArgs e)//挂断 { vc.stopVideoCall(); //vc.disposeVideoCall_AB(); if (vc != null) { vc = null; } this.launchVideoCallBtn.Enabled = true; this.stopVideoCallBtn.Enabled = false; this.statusLbl.Text = "视话结束!"; }
public void ExecuteSubmitCommand( ) { SBCDB dbmodule = new SBCDB(); User loggedinUser = dbmodule.GetLoggedinUser(Userid.Trim().ToLower()); if (loggedinUser == null) { LoginFailedMsg1Visible = true; LoginFailedMsg2Visible = true; LoginFailedMsg3Visible = true; LoginErrorMessage = "User name: " + Userid + " not found."; LoginErrorMessage2 = "Please enter valid user id or contact admin."; OnPropertyChanged("LoginFailedMsg1Visible"); OnPropertyChanged("LoginFailedMsg2Visible"); OnPropertyChanged("LoginFailedMsg3Visible"); OnPropertyChanged("LoginErrorMessage"); OnPropertyChanged("LoginErrorMessage2"); MainPage.mainPage.IsUserLogedin = false; return; } if (string.Compare(PasswordTxt, loggedinUser.Password) == 0) { MainPage.mainPage.pagePlaceHolder.Navigate(typeof(TestPanel)); if (videoCall == null) { videoCall = new VideoCall(); } MainPage.mainPage.RightPanelHolder.Navigate(typeof(VideoCall), videoCall); MainPage.mainPage.IsUserLogedin = true; } else { LoginFailedMsg1Visible = true; LoginFailedMsg2Visible = true; LoginFailedMsg3Visible = true; LoginErrorMessage = "Password not matched."; LoginErrorMessage2 = "Please enter valid password or contact admin."; OnPropertyChanged("LoginFailedMsg1Visible"); OnPropertyChanged("LoginFailedMsg2Visible"); OnPropertyChanged("LoginFailedMsg3Visible"); OnPropertyChanged("LoginErrorMessage"); OnPropertyChanged("LoginErrorMessage2"); MainPage.mainPage.IsUserLogedin = false; } }
public Tablet(VideoCall videoCall) { this.videoCall = videoCall; }
public CellPhone(VideoCall videoCall) { this.videoCall = videoCall; }