Beispiel #1
0
        /// <summary>
        /// Input kinect num when enter key is pressed
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void t_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.Key == Key.Enter)
            {
                try {
                    kinectNUM = Convert.ToInt32(iniTxtBx.Text);

                    if (kinectNUM > 0)
                    {
                        this.Content   = viewer;
                        viewer.Content = rootGrid;
                        GUIComponents guiComp = new GUIComponents(kinectNUM, this);
                        myServer      server  = new myServer(this, guiComp);

                        guiComp.setServer(server, this);
                    }
                    else
                    {
                        MessageBox.Show("Please enter number >=0");
                    }
                } catch {
                    MessageBox.Show("Please enter a positive number");
                }
            }
        }
Beispiel #2
0
 public myClient(myServer inServer, TcpClient readClientConnected, TcpClient sendClientConnected, GUIComponents inParentGUI)
 {
     this.sendClientSocket = sendClientConnected;
     this.readClientSocket = readClientConnected;
     parentGUI             = inParentGUI;
     server = inServer;
 }
Beispiel #3
0
        //initialize the GUI components of calibration window
        public Calibration(int kinectNum, GUIComponents in_parentGUI)
        {
            parentGUI = in_parentGUI;
            kinectNUM = kinectNum;

            //build images grid
            rgbImageArray      = new Image[kinectNUM];
            depthImageArray    = new Image[kinectNUM];
            filteredImageArray = new Image[kinectNUM];
            resultImageArray   = new Image[kinectNUM];

            rgbArray      = new WriteableBitmap[kinectNUM];
            depthArray    = new WriteableBitmap[kinectNUM];
            filteredArray = new WriteableBitmap[kinectNUM];
            resultArray   = new WriteableBitmap[kinectNUM];

            for (int i = 0; i < kinectNUM; ++i)
            {
                rgbImageArray[i]      = new Image();
                depthImageArray[i]    = new Image();
                filteredImageArray[i] = new Image();
                resultImageArray[i]   = new Image();
            }

            buildRootGrid();
            buildImagesGrid();
        }
Beispiel #4
0
 public myServer(MainWindow mw, GUIComponents inGuiComp)
 {
     serverIP        = getLocalIPAddress();
     mw.Title        = "Kinect Admin GUI - " + serverIP + ":8888/8889 (read/send)";
     guiComp         = inGuiComp;
     serverMsgTxtBlk = guiComp.serverMsgTxtBlock;
     StartServer();
 }
            /// <summary>
            /// Initialize components and layout
            /// </summary>
            /// <param name="h"></param>
            /// <param name="w"></param>
            /// <param name="in_parentGUI"></param>
            /// <param name="in_kinectIndex"></param>
            public KinectComp(int h, float w, GUIComponents in_parentGUI, int in_kinectIndex)
            {
                parentGUI   = in_parentGUI;
                kinectIndex = in_kinectIndex;

                // Add this grid as the child of kinect grid (contains multiple kinectComps)
                g.Height = h;
                g.Width  = w;
                parentGUI.kinectGrid.Children.Add(g);
                Grid.SetRow(g, 0);
                Grid.SetColumn(g, kinectIndex);
                titleLabel.Content       = "Kinect " + kinectIndex.ToString();
                infoTextBlock.Text       = "no data input";
                colorImageWritableBitmap = new WriteableBitmap(1920, 1080, 96, 96, PixelFormats.Bgr32, null);
                depthImageWritableBitmap = new WriteableBitmap(512, 424, 96, 96, PixelFormats.Gray8, null); //depth data is 320*240
                arrangeComponents();
            }