void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.MainGrid = ((System.Windows.Controls.Grid)(target));
     return;
     case 2:
     this.AbColumnDefinition = ((System.Windows.Controls.ColumnDefinition)(target));
     return;
     case 3:
     this.left = ((System.Windows.Controls.Grid)(target));
     return;
     case 4:
     this.navbar = ((DevExpress.Xpf.NavBar.NavBarControl)(target));
     return;
     case 5:
     this.navBarGroup1 = ((DevExpress.Xpf.NavBar.NavBarGroup)(target));
     return;
     case 6:
     
     #line 40 "..\..\..\View\LiveViewUsercontrol.xaml"
     ((System.Windows.Controls.TreeView)(target)).PreviewMouseMove += new System.Windows.Input.MouseEventHandler(this.UIElement_OnMouseMove);
     
     #line default
     #line hidden
     
     #line 41 "..\..\..\View\LiveViewUsercontrol.xaml"
     ((System.Windows.Controls.TreeView)(target)).PreviewMouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.UIElement_OnMouseLeftButtonDown);
     
     #line default
     #line hidden
     return;
     case 7:
     this.navBarGroup2 = ((DevExpress.Xpf.NavBar.NavBarGroup)(target));
     return;
     case 8:
     this.col1 = ((System.Windows.Controls.ColumnDefinition)(target));
     return;
     case 9:
     this.row1 = ((System.Windows.Controls.RowDefinition)(target));
     return;
     case 10:
     this.ucVideoScreen1 = ((LiveViewPlugin.View.VideoScreenUserControl)(target));
     return;
     case 11:
     this.ucVideoScreen2 = ((LiveViewPlugin.View.VideoScreenUserControl)(target));
     return;
     case 12:
     this.ucVideoScreen3 = ((LiveViewPlugin.View.VideoScreenUserControl)(target));
     return;
     case 13:
     this.ucVideoScreen4 = ((LiveViewPlugin.View.VideoScreenUserControl)(target));
     return;
     }
     this._contentLoaded = true;
 }
        void LiveViewUsercontrol_Loaded(object sender, RoutedEventArgs e)
        {
            XmlConfigurator.Configure();
            ManageVideoScreen();
            centreshowScreen.Content = new UserControl();
            _viewModel = new HighCameraGroupViewModel();
            for (int i = 0; i < 36; i++)
            {
                VideoScreenUserControl video = new VideoScreenUserControl();
                video.MouseLeftButtonUp += Video_MouseLeftButtonUp;
                video.add += Video_add;
                ResourceUtil.Listvideo.Add(video);
            }
            
            DataContext = _viewModel;
            GetCameraData();
            InitComboboxChooseScreen();
            SetVideo(2);//Default set video is 2x2

            m_oWorker = new BackgroundWorker();
            m_oWorker.DoWork += new DoWorkEventHandler(m_oWorker_DoWork);
            //m_oWorker.ProgressChanged += new ProgressChangedEventHandler
            //        (m_oWorker_ProgressChanged);
            m_oWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler
                    (m_oWorker_RunWorkerCompleted);
            //m_oWorker.WorkerReportsProgress = true;
            m_oWorker.WorkerSupportsCancellation = true;
        }
 public void SelectVideoScreen(VideoScreenUserControl screen)
 {
     foreach (var videoScreenUserControl in ResourceUtil.Listvideo)
     {
         if (screen.Equals(videoScreenUserControl))
         {
             videoScreenUserControl.IsSelected = true;
             videoScreenUserControl.BorderThickness = new Thickness(2);
             videoScreenUserControl.BorderBrush = new SolidColorBrush(Colors.Gold);
         }
         else
         {
             videoScreenUserControl.IsSelected = false;
             videoScreenUserControl.BorderThickness = new Thickness(0);
         }
     }
 }