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(); }