Ejemplo n.º 1
0
        void cbMenu_DropDownClosed(object sender, EventArgs e)
        {
            try
            {
                if (cbMenu.SelectedItem != null && cbMenu.SelectedItem.ToString() == "Full Screen")
                {
                    try
                    {
                        if (FullScreenMe || FullScreenOther)
                        {
                            MessageBox.Show("Video is all ready running in Full Screen");
                        }
                        else
                        {
                            if (MyVidType == "Me")
                            {
                                FullScreenMe = true;
                            }
                            else
                            {
                                FullScreenOther = true;
                            }

                            FSUname = lblUName.Content.ToString();

                            Tfs       = new TestFullScreen();
                            Tfs.Title = lblUName.Content.ToString() + " Video In Full Screen Mode";
                            Tfs.Show();

                            Tfs.Closed += new EventHandler(Tfs_Closed);
                        }
                    }
                    catch (Exception ex)
                    {
                        VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "cbMenu_DropDownClosed", "ctlUserVideo.xaml.cs");
                    }
                }
                else if (cbMenu.SelectedItem != null && cbMenu.SelectedItem.ToString() == "Cancel")
                {
                    try
                    {
                        MessageBoxResult result = MessageBox.Show("Do You Really Want To Remove " + lblUName.Content.ToString() + "'s Video", "Remove Video", MessageBoxButton.YesNo);

                        if (result == MessageBoxResult.Yes)
                        {
                            if (EntRemoveUser != null)
                            {
                                EntRemoveUser(lblUName.Content.ToString());
                            }
                            netp2pDirectXVideoChannel.Close();
                        }
                        if (Tfs != null)
                        {
                            Tfs.Close();
                        }
                    }
                    catch (Exception ex)
                    {
                        VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "cbMenu_DropDownClosed", "ctlUserVideo.xaml.cs");
                    }
                }
                else if (cbMenu.SelectedItem != null && cbMenu.SelectedItem.ToString() == "Video Configuration")
                {
                    try
                    {
                        filters = new Filters();

                        if (filters.VideoInputDevices.Count > 1)
                        {
                            lstVideoInput = new List <string>();
                            lstVideoInput = filters.VideoInputDevices.GetVideoInputDevices();

                            objShowVideo = new ShowVideoInputs(lstVideoInput);
                            objShowVideo.EntSelectedDevice += new ShowVideoInputs.delSelectedDevice(objShowVideo_EntSelectedDevice);
                            objShowVideo.Show();
                        }
                        else
                        {
                            InitCapture("Low", 0);
                        }
                    }
                    catch (Exception ex)
                    {
                        if (string.Compare(ex.Message, "No devices of the category") == 0)
                        {
                            MessageBox.Show("Sorry You Dont Have Any Video Device Attached To Tour System", "VMukti Says: Video Conference");
                        }
                        else
                        {
                            VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "cbMenu_DropDownClosed", "ctlUserVideo.xaml.cs");
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "cbMenu_DropDownClosed", "ctlUserVideo.xaml.cs");
            }
        }
Ejemplo n.º 2
0
        void cbMenu_DropDownClosed(object sender, EventArgs e)
        {
            try
            {
                if (cbMenu.SelectedItem != null && cbMenu.SelectedItem.ToString() == "Full Screen")
                {
                    try
                    {
                        if (FullScreenMe || FullScreenOther)
                        {
                            MessageBox.Show("Video is all ready running in Full Screen");
                        }
                        else
                        {
                            if (MyVidType == "Me")
                            {
                                FullScreenMe = true;
                            }
                            else
                            {
                                FullScreenOther = true;
                            }

                            FSUname = lblUName.Content.ToString();

                            Tfs = new TestFullScreen();
                            Tfs.Title = lblUName.Content.ToString() + " Video In Full Screen Mode";
                            Tfs.Show();

                            Tfs.Closed += new EventHandler(Tfs_Closed);
                        }
                    }
                    catch (Exception ex)
                    {
                        VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "cbMenu_DropDownClosed", "ctlUserVideo.xaml.cs");
                    }
                }
                else if (cbMenu.SelectedItem != null && cbMenu.SelectedItem.ToString() == "Cancel")
                {
                    try
                    {
                        MessageBoxResult result = MessageBox.Show("Do You Really Want To Remove " + lblUName.Content.ToString() + "'s Video", "Remove Video", MessageBoxButton.YesNo);

                        if (result == MessageBoxResult.Yes)
                        {
                            if (EntRemoveUser != null)
                            {
                                EntRemoveUser(lblUName.Content.ToString());
                            }
                            netp2pDirectXVideoChannel.Close();
                        }
                        if (Tfs != null)
                        {
                            Tfs.Close();
                        }
                    }
                    catch (Exception ex)
                    {
                        VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "cbMenu_DropDownClosed", "ctlUserVideo.xaml.cs");
                    }
                }
                else if (cbMenu.SelectedItem != null && cbMenu.SelectedItem.ToString() == "Video Configuration")
                {
                    try
                    {
                        filters = new Filters();

                        if (filters.VideoInputDevices.Count > 1)
                        {
                            lstVideoInput = new List<string>();
                            lstVideoInput = filters.VideoInputDevices.GetVideoInputDevices();

                            objShowVideo = new ShowVideoInputs(lstVideoInput);
                            objShowVideo.EntSelectedDevice += new ShowVideoInputs.delSelectedDevice(objShowVideo_EntSelectedDevice);
                            objShowVideo.Show();
                        }
                        else
                        {
                            InitCapture("Low", 0);
                        }
                    }
                    catch (Exception ex)
                    {
                        if (string.Compare(ex.Message, "No devices of the category") == 0)
                        {
                            MessageBox.Show("Sorry You Dont Have Any Video Device Attached To Tour System", "VMukti Says: Video Conference");
                        }
                        else
                        {
                            VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "cbMenu_DropDownClosed", "ctlUserVideo.xaml.cs");
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "cbMenu_DropDownClosed", "ctlUserVideo.xaml.cs");
            }
        }