Esempio n. 1
0
        public async void Resume(ItemEditor itemEditor)
        {
            var Items = VM.Vm;

            var composite = ApplicationData.Current.LocalSettings.Values[pageName]
                            as ApplicationDataCompositeValue;

            if (ExistsImgFile(current))
            {
                StorageFile file = await StorageApplicationPermissions.FutureAccessList.GetFileAsync(
                    (string)ApplicationData.Current.LocalSettings.Values[current]);

                byte[] pixels = await PictureHandler.AsByteArray(file);

                itemEditor.OnResuming(composite, pixels);
            }
            else
            {
                itemEditor.OnResuming(composite);
            }
            ApplicationData.Current.LocalSettings.Values.Remove(pageName);

            if (ApplicationData.Current.LocalSettings.Values.ContainsKey(selected))
            {
                Items.SelectedItem = Items.Items[(int)ApplicationData.Current.LocalSettings.Values[selected]];
                ApplicationData.Current.LocalSettings.Values.Remove(selected);
            }
        }