private void handler(object sender, TopicArgs args) { received = args.DataObject; System.Net.IPEndPoint ep = sender as System.Net.IPEndPoint; System.Diagnostics.Debug.WriteLine("received: from: " + args.From.ToString() + " Topic: " + args.Topic.ToString() + " msg: " + received.ToString()); go.Set(); }
private void OnCenterQuery(object s, TopicArgs args) { if (args.DataObject is HostConfigurationQuery) { var cfg = new HostConfiguration(Configuration.Instance.GetStationID()); cfg.CameraID = 2; cfg.Name = Properties.Settings.Default.HostName; cfg.TotalStorageCapacityMB = new FileSystemStorage(Properties.Settings.Default.OutputPath).GetTotalStorageMB(); cfg.ReservedStorageCapacityMB = Configuration.Instance.GetReservedSpaceinMB(); bus.Publish(Topics.HostReply, cfg, 3000); } }