/// <summary> /// Constructs a SavePage. /// </summary> public SavePage() { InitializeComponent(); bmp = (App.Current as App).Bmp; dim = bmp.Dimensions; this.DataContext = dim; }
/// <summary> /// Constructs a MainPage. /// </summary> public MainPage() { InitializeComponent(); bmp = (App.Current as App).Bmp; DataContext = bmp; chooser = new PhotoChooserTask(); chooser.ShowCamera = true; chooser.Completed += PhotoChosen; }
// Code to execute when the application is activated (brought to foreground) // This code will not execute when the application is first launched private void Application_Activated(object sender, ActivatedEventArgs e) { if (!e.IsApplicationInstancePreserved) { Bmp = new PreviewBitmap(); var state = PhoneApplicationService.Current.State; if (state.ContainsKey("image-id")) { string id = (string)state["image-id"]; Bmp.Load(id); } } }
// Code to execute when the application is launching (eg, from Start) // This code will not execute when the application is reactivated private void Application_Launching(object sender, LaunchingEventArgs e) { //clear files left from previous sessions ImageStore.ClearImagisterStore(); Bmp = new PreviewBitmap(); }