コード例 #1
0
ファイル: CustomerViewModel.cs プロジェクト: totzhe/CorpIS
 /// <summary>
 /// Initializes a new instance of the CustomerViewModel class.
 /// </summary>
 public CustomerViewModel(Customer customer)
 {
     _customer        = customer;
     _socketManager   = SimpleIoc.Default.GetInstance <TcpSocketManager>();
     AddMoneyCommand  = new RelayCommand <float>(AddMoney);
     TakeMoneyCommand = new RelayCommand <float>(TakeMoney);
 }
コード例 #2
0
        public ControllerTracking(int pUserId, string pSessionId, TcpSocketManager pTcpSocketManager)
        {
            userId           = pUserId;
            sessionId        = pSessionId;
            tcpSocketManager = pTcpSocketManager;
            EVRInitError eError = EVRInitError.None;

            vr_pointer = OpenVR.Init(ref eError, EVRApplicationType.VRApplication_Background);
        }
コード例 #3
0
 public ControlViewModel(MainWindowViewModel mainWindowViewModel, TcpSocketManager pTcpSocket, SessionID pSessionId)
 {
     //ToDo change hardcoded Variables
     tcpSocketManager = pTcpSocket;
     userId           = pSessionId.m_owner;
     sessionId        = pSessionId;
     _udpPort         = Int32.Parse(mainWindowViewModel.LoginViewModel.UdpPortTextBoxViewModel.Value);
     _udpIpAdress     = mainWindowViewModel.LoginViewModel.ServerIpTextBoxViewModel.Value;
     _vrManager       = new VrManager(userId, pSessionId.m_name, tcpSocketManager);
     VrManager.CloseVredEngine();
     _vrManager.StartVredEngine();
     _mainWindowViewModel = mainWindowViewModel;
     LeaveRoomCommand     = new LeaveRoomCommand(this);
     HeadTracking         = false;
     ControllerTracking   = false;
     resultClipPlaneFloat = new SharedState <List <float> >("ClipPlane", new List <float>()
     {
         1, 2, 3, 4, 5, 6, 7
     });
     resultClipPlaneFloat.setUpdateFunction(OnClipPlaneVrbUpdate);
     StartConnectToVredSocket();
     StartReceiverFromVred();
 }
コード例 #4
0
 void Awake()
 {
     instance = this;
     tcpSocket = new TcpSocket();
 }
コード例 #5
0
 public void initializeSender(TcpSocketManager sender)
 {
     tcpSocket = sender;
 }
コード例 #6
0
 public TcpSocketManagerTests()
 {
     logger           = MockGenerator.Get <ILogger>();
     tcpSocketManager = new TcpSocketManager <Message, Message>(logger);
 }
コード例 #7
0
 public VrManager(int pUserId, string pSessionId, TcpSocketManager pTcpSocketManager)
 {
     userId           = pUserId;
     session          = pSessionId;
     tcpSocketManager = pTcpSocketManager;
 }
コード例 #8
0
ファイル: TcpClient.cs プロジェクト: Jungjin-Lee/JJ_DCU4
 void Shutdown()
 {
     if(SocketManager != null) {
         try {
             Debug.Log("shutdown");
     //				_socket.Shutdown(SocketShutdown.Both);
             SocketManager = null;
             LoginScene.SetActive(true);
             LobbyScene.SetActive(false);
         } catch(Exception e) {
             Debug.LogError("Sutdown Exception : " + e.Message);
             SocketManager = null;
         }
     }
 }