// Do not add any additional code to this method private void InitializePhoneApplication() { if (phoneApplicationInitialized) { return; } var transition = new RadTransition(); transition.BackwardInAnimation = this.Resources["fadeInAnimation"] as RadFadeAnimation; transition.BackwardOutAnimation = this.Resources["fadeOutAnimation"] as RadFadeAnimation; transition.ForwardInAnimation = this.Resources["fadeInAnimation"] as RadFadeAnimation; transition.ForwardOutAnimation = this.Resources["fadeOutAnimation"] as RadFadeAnimation; transition.PlayMode = TransitionPlayMode.Simultaneously; RadPhoneApplicationFrame frame = new RadPhoneApplicationFrame(); frame.Transition = transition; // Create the frame but don't set it as RootVisual yet; this allows the splash // screen to remain active until the application is ready to render. RootFrame = frame; //RootFrame = new PhoneApplicationFrame(); RootFrame.Navigated += CompleteInitializePhoneApplication; // Handle navigation failures RootFrame.NavigationFailed += RootFrame_NavigationFailed; // Handle reset requests for clearing the backstack RootFrame.Navigated += CheckForResetNavigation; // Ensure we don't initialize again phoneApplicationInitialized = true; }
// Do not add any additional code to this method private void InitializePhoneApplication() { if (phoneApplicationInitialized) { return; } // Create the frame but don't set it as RootVisual yet; this allows the splash // screen to remain active until the application is ready to render. RadPhoneApplicationFrame frame = new RadPhoneApplicationFrame(); RootFrame = frame; RootFrame.Navigated += CompleteInitializePhoneApplication; // Handle navigation failures RootFrame.NavigationFailed += RootFrame_NavigationFailed; // Ensure we don't initialize again phoneApplicationInitialized = true; /* * * // Create the frame but don't set it as RootVisual yet; this allows the splash * // screen to remain active until the application is ready to render. * RootFrame = new TransitionFrame(); * RootFrame.Navigated += CompleteInitializePhoneApplication; * * // Handle navigation failures * RootFrame.NavigationFailed += RootFrame_NavigationFailed; * * // Ensure we don't initialize again * phoneApplicationInitialized = true; * */ }
private void InitApp() { if (HasAppInit) { return; } RootFrame = new RadPhoneApplicationFrame(); RootFrame.Navigated += CompleteInit; RootFrame.NavigationFailed += NavigationFailed; HasAppInit = true; }
private void InitApp() { if (HasAppInit) { return; } RootFrame = new RadPhoneApplicationFrame(); RootFrame.Navigated += CompleteInit; RootFrame.NavigationFailed += NavigationFailed; HasAppInit = true; }
protected override PhoneApplicationFrame CreatePhoneApplicationFrame() { var frame = new RadPhoneApplicationFrame(); #if DEBUG frame.Navigated += (sender, args) => { if (args.NavigationMode == NavigationMode.New && args.Content != null) { AliveChecker.Monitor(args.Content); } }; #endif return(frame); }
protected override PhoneApplicationFrame CreatePhoneApplicationFrame() { var frame = new RadPhoneApplicationFrame { Background = new SolidColorBrush(Colors.Black) }; frame.UriMapper = new AssociationUriMapper(); Screen.Init(frame); // // frame.Navigated += (sender, args) => // { // if (args.NavigationMode == NavigationMode.New && args.Content != null) // { // AliveChecker.Monitor(args.Content); // } // }; return(frame); }
// Do not add any additional code to this method private void InitializePhoneApplication() { if (phoneApplicationInitialized) { return; } // Create the frame but don't set it as RootVisual yet; this allows the splash // screen to remain active until the application is ready to render. RootFrame = new RadPhoneApplicationFrame(); RootFrame.Navigated += CompleteInitializePhoneApplication; // Handle navigation failures RootFrame.NavigationFailed += RootFrame_NavigationFailed; // Handle reset requests for clearing the backstack RootFrame.Navigated += CheckForResetNavigation; // Ensure we don't initialize again phoneApplicationInitialized = true; }
// Do not add any additional code to this method private void InitializePhoneApplication() { if (phoneApplicationInitialized) return; // Create the frame but don't set it as RootVisual yet; this allows the splash // screen to remain active until the application is ready to render. //RootFrame = new PhoneApplicationFrame(); RootFrame = new RadPhoneApplicationFrame(); RootFrame.Background = new SolidColorBrush(Color.FromArgb(255, 155, 192, 192)); RootFrame.Navigated += CompleteInitializePhoneApplication; // Using the telerik phone application frame control RadTransition transition = new RadTransition(); transition.BackwardInAnimation = new RadMoveAnimation() { MoveDirection = MoveDirection.RightIn }; transition.BackwardOutAnimation = new RadMoveAnimation() { MoveDirection = MoveDirection.RightOut }; transition.ForwardInAnimation = new RadMoveAnimation() { MoveDirection = MoveDirection.LeftIn }; transition.ForwardOutAnimation = new RadMoveAnimation() { MoveDirection = MoveDirection.LeftOut }; RootFrame.Transition = transition; // Handle navigation failures RootFrame.NavigationFailed += RootFrame_NavigationFailed; // Ensure we don't initialize again phoneApplicationInitialized = true; }
// Do not add any additional code to this method private async void InitializePhoneApplication() { if (phoneApplicationInitialized) { return; } // Create the frame but don't set it as RootVisual yet; this allows the splash // screen to remain active until the application is ready to render. RootFrame = new RadPhoneApplicationFrame { // Add default page transitions animations Transition = new RadTransition() { ForwardInAnimation = AnimationService.GetPageInAnimation(), ForwardOutAnimation = AnimationService.GetPageOutAnimation(), BackwardInAnimation = AnimationService.GetPageInAnimation(), BackwardOutAnimation = AnimationService.GetPageOutAnimation(), } }; RootFrame.Navigated += CompleteInitializePhoneApplication; // Handle navigation failures RootFrame.NavigationFailed += RootFrame_NavigationFailed; // Handle reset requests for clearing the backstack RootFrame.Navigated += CheckForResetNavigation; #if WINDOWS_PHONE_81 RootFrame.Navigating += RootFrameOnNavigating; // Handle contract activation such as returned values from file open or save picker PhoneApplicationService.Current.ContractActivated += CurrentOnContractActivated; #endif // Assign the URI-mapper class to the application frame. RootFrame.UriMapper = new AssociationUriMapper(); // Initialize the application information AppInformation = new AppInformation(); // Initialize the links information LinkInformation = new LinkInformation(); // Initialize SDK parameters SdkService.InitializeSdkParams(); // Initialize the main drive CloudDrive = new CloudDriveViewModel(SdkService.MegaSdk, AppInformation); // Add a global notifications listener. GlobalListener = new GlobalListener(AppInformation); SdkService.MegaSdk.addGlobalListener(GlobalListener); // Add a global request listener to process all. SdkService.MegaSdk.addRequestListener(this); // Add a global transfer listener to process all transfers. SdkService.MegaSdk.addTransferListener(TransfersService.GlobalTransferListener); // Initialize Folders AppService.InitializeAppFolders(); // Set the current resolution that we use later on for our image selection AppService.CurrentResolution = ResolutionHelper.CurrentResolution; // Clear settings values we do no longer use AppService.ClearObsoleteSettings(); // Save the app version information for future use (like deleting settings) AppService.SaveAppInformation(); // Set MEGA red as Accent Color ((SolidColorBrush)Resources["PhoneAccentBrush"]).Color = (Color)Resources["MegaRedColor"]; // Ensure we don't initialize again phoneApplicationInitialized = true; }
// Do not add any additional code to this method private void InitializePhoneApplication() { if (phoneApplicationInitialized) return; // Create the frame but don't set it as RootVisual yet; this allows the splash // screen to remain active until the application is ready to render. // Uncomment this for standard: // RootFrame = new PhoneApplicationFrame(); // Uncomment this for silverlight tools // RootFrame = new TransitionFrame(); // Uncomment this for telerik frames RadPhoneApplicationFrame frame = new RadPhoneApplicationFrame(); // rad frame transistions RadTransition transition = new RadTransition(); transition.BackwardInAnimation = this.Resources["fadeInAnimation"] as RadAnimation; transition.BackwardOutAnimation = this.Resources["fadeOutAnimation"] as RadAnimation; transition.ForwardInAnimation = this.Resources["fadeInAnimation"] as RadAnimation; transition.ForwardOutAnimation = this.Resources["fadeOutAnimation"] as RadAnimation; transition.PlayMode = TransitionPlayMode.Consecutively; frame.Transition = transition; frame.OrientationChangeAnimation = this.Resources["fadeInAnimation"] as RadFadeAnimation; RootFrame = frame; RootFrame.Navigated += CompleteInitializePhoneApplication; // Handle navigation failures RootFrame.NavigationFailed += RootFrame_NavigationFailed; // Ensure we don't initialize again phoneApplicationInitialized = true; }
// Do not add any additional code to this method private void InitializePhoneApplication() { //if (phoneApplicationInitialized) // return; //// Create the frame but don't set it as RootVisual yet; this allows the splash //// screen to remain active until the application is ready to render. //RadPhoneApplicationFrame frame = new RadPhoneApplicationFrame(); //frame.Background = new SolidColorBrush(Colors.White); //RootFrame = frame; //RootFrame.Navigated += CompleteInitializePhoneApplication; //// Handle navigation failures //RootFrame.NavigationFailed += RootFrame_NavigationFailed; //// Ensure we don't initialize again //phoneApplicationInitialized = true; if (phoneApplicationInitialized) return; // Create the frame but don't set it as RootVisual yet; this allows the splash // screen to remain active until the application is ready to render. RadTransition transition = new RadTransition(); transition.BackwardInAnimation = this.Resources["RightInAnimation"] as RadSlideAnimation; transition.BackwardOutAnimation = this.Resources["RightOutAnimation"] as RadSlideAnimation; transition.ForwardInAnimation = this.Resources["fadeInAnimation"] as RadSlideAnimation; transition.ForwardOutAnimation = this.Resources["fadeOutAnimation"] as RadSlideAnimation; //transition.ForwardOutAnimation.Duration = new Duration(new TimeSpan(0, 0, 0, 0, 100)); //transition.ForwardInAnimation.Duration = new Duration(new TimeSpan(0, 0, 0, 0, 100)); //transition.ForwardOutAnimation.InitialDelay = new TimeSpan(0); //transition.ForwardInAnimation.InitialDelay = new TimeSpan(0); //transition.BackwardOutAnimation.Duration = new Duration(new TimeSpan(0, 0, 0, 0, 100)); //transition.BackwardInAnimation.Duration = new Duration(new TimeSpan(0, 0, 0, 0, 100)); //transition.BackwardOutAnimation.InitialDelay = new TimeSpan(0); //transition.BackwardInAnimation.InitialDelay = new TimeSpan(0); transition.PlayMode = TransitionPlayMode.Simultaneously; RadPhoneApplicationFrame frame = new RadPhoneApplicationFrame(); frame.Transition = transition; frame.Background = new SolidColorBrush(Colors.White); RootFrame = frame; RootFrame.Navigated += CompleteInitializePhoneApplication; // Handle navigation failures RootFrame.NavigationFailed += RootFrame_NavigationFailed; // Ensure we don't initialize again phoneApplicationInitialized = true; }
private void InitializePhoneApplication() { if (phoneApplicationInitialized) return; RootFrame = new RadPhoneApplicationFrame(); RootFrame.Navigated += CompleteInitializePhoneApplication; RootFrame.NavigationFailed += RootFrame_NavigationFailed; phoneApplicationInitialized = true; }
// Do not add any additional code to this method private async void InitializePhoneApplication() { if (phoneApplicationInitialized) { return; } // Create the frame but don't set it as RootVisual yet; this allows the splash // screen to remain active until the application is ready to render. RootFrame = new RadPhoneApplicationFrame { // Add default page transitions animations Transition = new RadTransition() { ForwardInAnimation = AnimationService.GetPageInAnimation(), ForwardOutAnimation = AnimationService.GetPageOutAnimation(), BackwardInAnimation = AnimationService.GetPageInAnimation(), BackwardOutAnimation = AnimationService.GetPageOutAnimation(), } }; RootFrame.Navigated += CompleteInitializePhoneApplication; // Handle navigation failures RootFrame.NavigationFailed += RootFrame_NavigationFailed; // Handle reset requests for clearing the backstack RootFrame.Navigated += CheckForResetNavigation; #if WINDOWS_PHONE_81 RootFrame.Navigating += RootFrameOnNavigating; // Handle contract activation such as returned values from file open or save picker PhoneApplicationService.Current.ContractActivated += CurrentOnContractActivated; #endif // Assign the URI-mapper class to the application frame. RootFrame.UriMapper = new AssociationUriMapper(); // Initialize the application information AppInformation = new AppInformation(); // Initialize the links information LinkInformation = new LinkInformation(); //The next line enables a custom logger, if this function is not used OutputDebugString() is called //in the native library and log messages are only readable with the native debugger attached. //The default behavior of MegaLogger() is to print logs using Debug.WriteLine() but it could //be used to sends log to a file, for example. LogService.SetLoggerObject(new MegaLogger()); //You can select the maximum output level for debug messages. //By default FATAL, ERROR, WARNING and INFO will be enabled //DEBUG and MAX can only be enabled in Debug builds, they are ignored in Release builds LogService.SetLogLevel(MLogLevel.LOG_LEVEL_DEBUG); //You can send messages to the logger using LogService.Log(), those messages will be received //in the active logger LogService.Log(MLogLevel.LOG_LEVEL_INFO, "Example log message"); // Set the ID for statistics MegaSDK.setStatsID(Convert.ToBase64String((byte[])DeviceExtendedProperties.GetValue("DeviceUniqueId"))); // Initialize the main MegaSDK instance MegaSdk = new MegaSDK(AppResources.AppKey, String.Format("{0}/{1}/{2}", AppService.GetAppUserAgent(), DeviceStatus.DeviceManufacturer, DeviceStatus.DeviceName), ApplicationData.Current.LocalFolder.Path, new MegaRandomNumberProvider()); // Initialize the MegaSDK instance for Folder Links MegaSdkFolderLinks = new MegaSDK(AppResources.AppKey, String.Format("{0}/{1}/{2}", AppService.GetAppUserAgent(), DeviceStatus.DeviceManufacturer, DeviceStatus.DeviceName), ApplicationData.Current.LocalFolder.Path, new MegaRandomNumberProvider()); // Initialize the main drive CloudDrive = new CloudDriveViewModel(MegaSdk, AppInformation); // Add notifications listener. Needs a DriveViewModel GlobalDriveListener = new GlobalDriveListener(AppInformation); MegaSdk.addGlobalListener(GlobalDriveListener); // Add a global request listener to process all. MegaSdk.addRequestListener(this); // Add a global transfer listener to process all transfers. GlobalTransferListener = new GlobalTransferListener(); MegaSdk.addTransferListener(GlobalTransferListener); // Initialize the transfer listing MegaTransfers = new TransferQueu(); // Initialize Folders AppService.InitializeAppFolders(); // Set the current resolution that we use later on for our image selection AppService.CurrentResolution = ResolutionHelper.CurrentResolution; // Clear settings values we do no longer use AppService.ClearObsoleteSettings(); // Save the app version information for future use (like deleting settings) AppService.SaveAppInformation(); // Set MEGA red as Accent Color ((SolidColorBrush)Resources["PhoneAccentBrush"]).Color = (Color)Resources["MegaRedColor"]; // Ensure we don't initialize again phoneApplicationInitialized = true; }
// Do not add any additional code to this method private void InitializePhoneApplication() { if (phoneApplicationInitialized) return; // Create the frame but don't set it as RootVisual yet; this allows the splash // screen to remain active until the application is ready to render. var frame = new RadPhoneApplicationFrame { Transition = new RadFadeTransition() }; RootFrame = frame; RootFrame.Navigated += CompleteInitializePhoneApplication; // Handle navigation failures RootFrame.NavigationFailed += RootFrame_NavigationFailed; // Ensure we don't initialize again phoneApplicationInitialized = true; }
// Do not add any additional code to this method private void InitializePhoneApplication() { if (phoneApplicationInitialized) return; // Create the frame but don't set it as RootVisual yet; this allows the splash // screen to remain active until the application is ready to render. var transition = new RadTransition { BackwardInAnimation = Resources["slideInAnimation"] as RadSlideContinuumAnimation, BackwardOutAnimation = Resources["slideOutAnimation"] as RadSlideContinuumAnimation, ForwardInAnimation = Resources["slideInAnimation"] as RadSlideContinuumAnimation, ForwardOutAnimation = Resources["slideOutAnimation"] as RadSlideContinuumAnimation, PlayMode = TransitionPlayMode.Consecutively }; var frame = new RadPhoneApplicationFrame { Transition = transition }; RootFrame = frame; RootFrame.Navigating += RootFrame_Navigating; RootFrame.Navigated += RootFrame_Navigated; RootFrame.Navigated += CompleteInitializePhoneApplication; // Handle navigation failures RootFrame.NavigationFailed += RootFrame_NavigationFailed; // Ensure we don't initialize again phoneApplicationInitialized = true; RootFrame.UriMapper = new CustomUriMapper(); phoneApplicationInitialized = true; }
private void InitializePhoneApplication() { if (phoneApplicationInitialized) return; //RadTransition transition = new RadTransition(); //transition.BackwardInAnimation = this.Resources["fadeInAnimation"] as RadFadeAnimation; //transition.BackwardOutAnimation = this.Resources["fadeOutAnimation"] as RadFadeAnimation; //transition.ForwardInAnimation = this.Resources["fadeInAnimation"] as RadFadeAnimation; //transition.ForwardOutAnimation = this.Resources["fadeOutAnimation"] as RadFadeAnimation; //transition.PlayMode = TransitionPlayMode.Consecutively; // Create the frame but don't set it as RootVisual yet; this allows the splash // screen to remain active until the application is ready to render. //RootFrame = new PhoneApplicationFrame(); //RootFrame = new TransitionFrame(); RadPhoneApplicationFrame frame = new RadPhoneApplicationFrame(); //frame.Transition = transition; RootFrame = frame; RootFrame.Navigated += CompleteInitializePhoneApplication; RootFrame.NavigationFailed += RootFrame_NavigationFailed; // Ensure we don't initialize again phoneApplicationInitialized = true; }
private void InitializePhoneApplication() { if (phoneApplicationInitialized) return; // Create the frame but don't set it as RootVisual yet; this allows the splash // screen to remain active until the application is ready to render. RootFrame = new RadPhoneApplicationFrame(); RootFrame.Navigated += CompleteInitializePhoneApplication; RootFrame.NavigationFailed += RootFrame_NavigationFailed; RootFrame.Navigating += RootFrame_Navigating; phoneApplicationInitialized = true; }