Beispiel #1
0
        private void OnImageFileLoadedResult(object sender, bool wasSuccessful)
        {
            System.Diagnostics.Debug.WriteLine("OnImageFileLoadedResult(): " + wasSuccessful);
            ImageFileManager imageFileManager = ImageFileManager.Instance;

#if WINDOWS_PHONE_APP
            imageFileManager.ImageFileLoadedResult -= OnImageFileLoadedResult;
#endif

            if (wasSuccessful)
            {
                StoreLoadedImage(imageFileManager.ImageData);
                ApplyEffectAsync();
            }
        }
Beispiel #2
0
        private async void OnLoadImageButtonClickedAsync(object sender, RoutedEventArgs e)
        {
            _imageIndex = (sender == loadImage1Button) ? 0 : 1;

            ImageFileManager imageFileManager = ImageFileManager.Instance;
            bool             success          = await imageFileManager.GetImageFileAsync();

            if (success)
            {
#if WINDOWS_PHONE_APP
                imageFileManager.ImageFileLoadedResult += OnImageFileLoadedResult;
#else
                OnImageFileLoadedResult(this, success);
#endif
            }
        }