示例#1
0
 /// <summary>
 /// 设置直播方式
 /// </summary>
 /// <param name="type"></param>
 public void SetLiveTypeImgAndText(LiveType type)
 {
     liveTypeWindow.Close();
     liveTypeWindow = null;
     liveType       = type;
     if (type == LiveType.Desktop)
     {
         img01.Source    = new BitmapImage(new Uri("/Resources/computor.png", UriKind.RelativeOrAbsolute));
         label01.Content = "桌面演示";
         SetCameraName("无");
         PreviewDesktop();
     }
     else if (type == LiveType.Software)
     {
         img01.Source    = new BitmapImage(new Uri("/Resources/software.png", UriKind.RelativeOrAbsolute));
         label01.Content = "软件演示";
         //todo:演示软件
     }
     else if (type == LiveType.Window)
     {
         img01.Source    = new BitmapImage(new Uri("/Resources/area.png", UriKind.RelativeOrAbsolute));
         label01.Content = "区域演示";
         //todo:演示区域
     }
 }
示例#2
0
        /// <summary>
        /// 直播方式选择按钮
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void LiveTypePanel_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            //打开直播类型选项
            if (liveTypeWindow == null)
            {
                liveTypeWindow = new ChooseLiveTypeWindow();
                liveTypeWindow.WindowStartupLocation = WindowStartupLocation.Manual;
                liveTypeWindow.Left = this.Left + 208;
                liveTypeWindow.Top  = this.Top + this.Height - 110;

                liveTypeWindow.mainWindow = this;
                liveTypeWindow.Owner      = this;
                liveTypeWindow.ShowDialog();
            }
            else
            {
                liveTypeWindow.Close();
                liveTypeWindow = null;
            }
        }