private void Button_Callib_Load2_Click(object sender, RoutedEventArgs e)
        {
            Callib2.Default.Reload();

            this.CS = new Callibration.CallibrationPallameter();
            this.CS.dx = Callib2.Default.dx;
            this.CS.dy = Callib2.Default.dy;
            this.CS.dz = Callib2.Default.dz;
            this.CS.rx = Callib2.Default.rx;
            this.CS.ry = Callib2.Default.ry;
            this.CS.rz = Callib2.Default.rz;
        }
 private void Button_Callib_Load1_Click(object sender, RoutedEventArgs e)
 {
     Properties.Settings.Default.Reload();
     
     this.CS = new Callibration.CallibrationPallameter();
     this.CS.dx = Properties.Settings.Default.dx;
     this.CS.dy = Properties.Settings.Default.dy;
     this.CS.dz = Properties.Settings.Default.dz;
     this.CS.rx = Properties.Settings.Default.rx;
     this.CS.ry = Properties.Settings.Default.ry;
     this.CS.rz = Properties.Settings.Default.rz;
 }
        public MainWindow()
        {
            InitializeComponent();
            this.Title = "ShadowKinectSensor";
            this.MouseLeftButtonDown += (sender, e) => this.DragMove();
            this.Title_TextBlock.Text = "工程名 : " + System.Diagnostics.Process.GetCurrentProcess().ProcessName;
            this.Closing += MainWindow_Closing;
            this.IsOptRunning = false;


            this.senddatatype = SendDataType.SKSTdata;
            this.GroupBox_Sendto_SKST.IsEnabled = true;
            this.GroupBox_Sendto_CIPCServer.IsEnabled = false;

            this.GroupBox_ReceiveFrom_CIPCServer.IsEnabled = false;
            this.GroupBox_ReceiveFrom_Kinect.IsEnabled = true;
            this.GroupBox_ReceiveFrom_Optitrack.IsEnabled = false;

            this.sendto = SendTo.ShadowKinectSensorTerminal;
            this.receivefrom = ReceiveFrom.Kinect;

            this.RadioButton_ShadowKinectSensorTerminal.IsChecked = true;

            this.IsKinectRunning = false;
            this.IsOptiRunning = false;
            this.CS = new Callibration.CallibrationPallameter();
            this.CS.dx = 0;
            this.CS.dy = 0;
            this.CS.dz = 0;
            this.CS.ry = 0;
            this.CS.rx = 0;

            this.IsInit3Dmodelview = false;

            this.Is_trytest = false;

            this.Is_CallibPointZero = false;
            this.Is_CallibPointX = false;
            this.Is_CallibPointZ = false;
            this.TestTimeCurrent = 0;
            this.SkeletonPoint_CallibTest = new SkeletonPoint();
            this.callibration = new Callibration();

        }
 private void Button_Callib_Calc_Click(object sender, RoutedEventArgs e)
 {
     Callibration.CallibrationPallameter cp = new Callibration.CallibrationPallameter();
     cp = this.callibration.Callcurate();
     this.CS = cp;
 }
        private void DataConvert_SKST_tcp(byte[] data)
        {
            try
            {
                Console.WriteLine(data.Length);
                UDP_PACKETS_CODER.UDP_PACKETS_DECODER dec = new UDP_PACKETS_CODER.UDP_PACKETS_DECODER(data);

                string str = dec.get_string();
                Console.WriteLine(str);
                if (str == "LightCallib_Zero")
                {
                    this.Is_CallibPointZero = true;
                }
                else if (str == "LightCallib_X")
                {
                    this.Is_CallibPointX = true;
                }
                else if (str == "LightCallib_Z")
                {
                    this.Is_CallibPointZ = true;
                }
                else if (str == "LightCallib_Calc")
                {
                    Callibration.CallibrationPallameter cp = new Callibration.CallibrationPallameter();
                    cp = this.callibration.Callcurate();
                    this.CS = cp;
                }
                else if (str == "KinectStop")
                {
                    this.Dispatcher.BeginInvoke(new Action(() =>
                    {
                        this.KinectStop();
                    }));
                }
                else if (str == "KinectStart")
                {
                    this.Dispatcher.BeginInvoke(new Action(() =>
                    {
                        this.KinectLunch();
                    }));
                }
                else if (str == "Capture")
                {
                    this.Dispatcher.BeginInvoke(new Action(() =>
                    {
                        this.Create3DmodelandSendSKST();
                    }));
                }

            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }