public void Setup() { WebServerConnection = new WebServerConnection { Uri = new System.Uri("https://1c.website.com/ws/something.html") }; }
protected override void OnEnable() { base.OnEnable(); MaxSamples = 50; _connection = WebServerConnection.Instance; _clientManager = WebClientManager.Instance as WebClientManager; _trackerManager = TrackerManager.Instance as TrackerManager; }
private async void DownloadingDataWindow_Loaded(object sender, System.Windows.RoutedEventArgs e) { DatabaseInfo = await WebServerConnection.DownloadData(this); foreach (var license in DatabaseInfo.licenses) { license.RegisteredComputers = DatabaseInfo.computers.Count(x => x.licenseId == license.id); } DialogResult = true; }
private void OnEnable() { _connection = WebServerConnection.Instance; var nodes = new List <XRNodeState>(); InputTracking.GetNodeStates(nodes); foreach (var node in nodes) { AddNode(node); } InputTracking.nodeAdded += AddNode; InputTracking.nodeRemoved += RemoveNode; }
private void OnEnable() { _connection = WebServerConnection.Instance; _connection.OnConnected += InitializeServer; _connection.OnDisconnected += UninitializeServer; _connection.OnMessageReceived += OnServerMessage; _trackerManager = GetComponent <TrackerManager>(); Tracker.ModelCreated() .TakeUntilDisable(this) .Subscribe(t => HandleTrackerAdded(t)); Tracker.ModelDestroyed() .TakeUntilDisable(this) .Subscribe(t => HandleTrackerRemoved(t)); Tracker.AllLocalChanges() .TakeUntilDisable(this) .Subscribe(ev => HandleTrackerUpdated(ev.Model, ev.ChangedProperties)); InitializeServer(); }
private void OnEnable() { _cam = Camera.main.transform; _plot = GetComponent <Plot>(); _origin = OriginCoordinateSystem.Instance; _webClients = Manager <WebClient> .Instance; _connection = WebServerConnection.Instance; _user = StreamClient.Instance; WebClient.AllModelChange() .TakeUntilDisable(this) .Where(ev => ev.ChangedProperties.Contains("Owner")) .Subscribe(ev => SearchCurrentWebclient()); Observable.Merge(WebClient.ModelCreated(), WebClient.ModelDestroyed()) .TakeUntilDisable(this) .Subscribe(m => SearchCurrentWebclient()); SearchCurrentWebclient(); _plot.LockedToAxisRx .TakeUntilDisable(this) .Subscribe(isLocked => { if (isLocked) { LockAlignment(); } else { UnlockAlignment(); } }); _plot.BoundToRx .TakeUntilDisable(this) .Where(boundTo => boundTo >= 0) .Select(_ => _webClients.Get(_plot.BoundTo)) .Where(client => client != null && client.Owner == _user.Id) .Subscribe(client => { // TODO: Workaround for newly created scatterplots if (_plot.Position != Vector3.zero || _plot.Rotation != Quaternion.identity) { _plot.PositioningOffset = Vector3.Distance(_plot.transform.position, _cam.position); } else { _plot.Position = _origin.transform.InverseTransformPoint(_cam.position + _cam.forward * _plot.PositioningOffset); } _plot.IsPositioning = true; _wasPositioning = true; _plot.ActualPosition = _plot.Position; _plot.ActualRotation = _plot.Rotation; UpdatePosition(client); Observable.EveryFixedUpdate() .TakeUntilDisable(this) .TakeWhile(_ => client != null && client.Id == _plot.BoundTo && client.Owner == _user.Id) .Subscribe( _ => UpdatePosition(client), () => _plot.IsPositioning = false); }); }
private void OnEnable() { _connection = WebServerConnection.Instance; _renderer = GetComponent <Renderer>(); _renderer.material = Instantiate(_renderer.material); }