private async void Scratch_Loaded(object sender, RoutedEventArgs e) { var loader = await ImageLoader.Create(new RemoteCameraModel(IPAddress.Parse("192.168.1.131"), 0, null)); var frames = await loader.GetFrameImages(); Images.Source = frames; }
void Load(SafeUri uri) { timer = Log.DebugTimerStart(); if (loader != null) { loader.Dispose(); } loader = ImageLoader.Create(uri); loader.AreaPrepared += HandlePixbufPrepared; loader.AreaUpdated += HandlePixbufAreaUpdated; loader.Completed += HandleDone; loader.Load(uri); }
public async Task InitializeMapViewModelWithFrames() { var cameras = new List <MapCameraViewModel>(); foreach (var camera in (IEnumerable <RemoteCameraModel>)ServerViewModel.Cameras.Source) { var loader = await ImageLoader.Create(camera); cameras.Add(new MapCameraViewModel(camera, await loader.GetFrameImages())); } MapViewModel = new MapViewModel(cameras, 30); MapViewModel.CanvasVisible = Visibility.Collapsed; await Task.Yield(); }