AddOrUpdateSurface() публичный Метод

public AddOrUpdateSurface ( SurfaceDto surface ) : void
surface Shared.SurfaceDto
Результат void
Пример #1
0
        async void StartUrhoApp()
        {
            app = await urhoSurface.Show <UrhoApp>(new Urho.ApplicationOptions(assetsFolder: "Data"));

            app.SetConnection(connection);
            Urho.Application.InvokeOnMain(() =>
            {
                foreach (var surface in space.Surfaces)
                {
                    app.AddOrUpdateSurface(surface.Value);
                }
                foreach (var bulb in space.Bulbs)
                {
                    AddBulb(bulb);
                }
            });
        }
Пример #2
0
		async void StartUrhoApp()
		{
			app = await urhoSurface.Show<UrhoApp>(new Urho.ApplicationOptions(assetsFolder: "Data"));
			app.SetConnection(connection);
			Urho.Application.InvokeOnMain(() =>
				{
					foreach (var surface in space.Surfaces)
						app.AddOrUpdateSurface(surface.Value);
					foreach (var bulb in space.Bulbs)
						AddBulb(bulb);
				});
		}
Пример #3
0
 void OnSurfaceReceived(SurfaceDto surface)
 {
     Urho.Application.InvokeOnMain(() => app?.AddOrUpdateSurface(surface));
 }
Пример #4
0
 void OnSurfaceReceived(SurfaceDto surface)
 {
     lock (space)
         space.Surfaces[surface.Id] = surface;
     Urho.Application.InvokeOnMain(() => app?.AddOrUpdateSurface(surface));
 }