예제 #1
0
        public MainWindowForm()
        {
            //This tries to read the settings from "settings.bin", if it failes the settings stay at default values.
            try
            {
                IFormatter formatter = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter();
                Stream     stream    = new FileStream("settings.bin", FileMode.Open, FileAccess.Read);
                oSettings = (KinectSettings)formatter.Deserialize(stream);
                stream.Close();
            }
            catch (Exception)
            {
            }

            oServer = new KinectServer(oSettings);
            oServer.eSocketListChanged += new SocketListChangedHandler(UpdateListView);
            oTransferServer             = new TransferServer();
            oTransferServer.lVertices   = lAllVertices;
            oTransferServer.lNormals    = lAllNormals;
            oTransferServer.lUVs        = lAllUVs;
            oTransferServer.lIndices    = lAllIndices;
            oTransferServer.lColors     = lAllColors;

            InitializeComponent();
        }
예제 #2
0
        public void SendSettings(KinectSettings settings)
        {
            List<byte> lData = settings.ToByteList();

            byte[] bTemp = BitConverter.GetBytes(lData.Count);
            lData.InsertRange(0, bTemp);
            lData.Insert(0, 2);

            if (SocketConnected())
                oSocket.Send(lData.ToArray());
        }
예제 #3
0
        public void SendSettings(KinectSettings settings)
        {
            List <byte> lData = settings.ToByteList();

            byte[] bTemp = BitConverter.GetBytes(lData.Count);
            lData.InsertRange(0, bTemp);
            lData.Insert(0, 2);

            if (SocketConnected())
            {
                oSocket.Send(lData.ToArray());
            }
        }
예제 #4
0
        public MainWindowForm()
        {
            //This tries to read the settings from "settings.bin", if it failes the settings stay at default values.
            try
            {
                IFormatter formatter = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter();
                Stream stream = new FileStream("settings.bin", FileMode.Open, FileAccess.Read);
                oSettings = (KinectSettings)formatter.Deserialize(stream);
                stream.Close();
            }
            catch(Exception)
            {
            }

            oServer = new KinectServer(oSettings);
            oServer.eSocketListChanged += new SocketListChangedHandler(UpdateListView);

            InitializeComponent();
        }
예제 #5
0
 public KinectServer(KinectSettings settings)
 {
     this.oSettings = settings;
 }
예제 #6
0
 public KinectServer(KinectSettings settings)
 {
     this.oSettings = settings;
 }