public MainWindow() { //InitializeComponent(); try { #if (DEBUG) ConsoleManager.Show(); #endif Rect rectangle = new Rect(0, 0, 450, 350); GoHInterface goHInterface = new GoHInterface(true); FailOverWindow failOverWindow = new FailOverWindow(this, goHInterface, rectangle); failOverWindow.Show(); } catch (Exception ex) { string err = ex.ToString(); Console.WriteLine(err); Console.WriteLine(ex.Message); throw; } }
public FailOverWindow(MainWindow mainWindow, GoHInterface goHInterface, Rect zoneDessinRectangle) { //this.ImgLogo.Source = new BitmapImage(new Uri(@"..\Images\Logo.png")); //this.ImgStatus.Source = new BitmapImage(new Uri(@"..\Images\Status.png")); this.ZoneDessinRectangle = zoneDessinRectangle; goHInterface.IsBackground = true; this.m_goHInterface = goHInterface; //this.m_mainWindow = mainWindow; InitializeComponent(); // Create the drawing group we'll use for drawing this.m_drawingGroup = new DrawingGroup(); // Create an image source that we can use in our image control this.ImageSource = new DrawingImage(this.m_drawingGroup); using (DrawingContext dc = this.m_drawingGroup.Open()) { m_goHInterface.AddVisualInterface(dc, this.ZoneDessinRectangle); } Refresh(); this.ImgMain.MouseMove += ImgMain_MouseMove; this.ImgMain.MouseDown += ImgMain_MouseMove; this.ImgMain.MouseUp += ImgMain_MouseMove; mainWindow.Hide(); }
//public KinectWindow() //{ // InitializeComponent(); //} /// <summary> /// Initializes a new instance of the MainWindow class. /// </summary> public KinectWindow(Window window) { #if (DEBUG) ConsoleManager.Show(); #endif // use the window object as the view model in this simple example this.DataContext = this; // initialize the components (controls) of the window this.InitializeComponent(); Rect rectangle = new Rect(0, 0, 450, 350); GoHInterface goHInterface = new GoHInterface(true); this.m_kinectTools = new KinectTools(goHInterface); this.m_kinectTools.PropertyChanged += KinectTools_PropertyChanged; this.m_kinectTools.Init_01(); this.m_kinectTools.Refresh += KinectTools_Refresh; this.m_failOverWindow = new FailOverWindow(this, goHInterface, rectangle); window.Hide(); }
/// <summary> /// Initializes a new instance of the MainWindow class. /// </summary> public KinectTools(GoHInterface goHInterface) { if (goHInterface == null) { throw new ArgumentNullException(nameof(goHInterface)); } this.m_goHInterface = goHInterface; }