コード例 #1
0
        public void Deinitialize(GlobalListener globalListener)
        {
            AccountService.GetAccountDetailsFinish -= OnGetAccountDetailsFinish;

            // Add folders to global listener to receive notifications
            globalListener.Folders.Remove(this.CloudDrive);
            globalListener.Folders.Remove(this.RubbishBin);
        }
コード例 #2
0
        public async void Initialize(GlobalListener globalListener)
        {
            // Add folders to global listener to receive notifications
            globalListener.Folders.Add(this.CameraUploads);

            // Create Camera Uploads folder node if not exists
            await this.CameraUploads.CreateRootNodeIfNotExists();
        }
コード例 #3
0
        public void Deinitialize(GlobalListener globalListener)
        {
            GlobalListener.StorageStateChanged -= OnStorageStateChanged;

            // Add folders to global listener to receive notifications
            globalListener.Folders.Remove(this.CloudDrive);
            globalListener.Folders.Remove(this.RubbishBin);
        }
コード例 #4
0
    // Use this for initialization
    void Start()
    {
        UnityEngine.Object.DontDestroyOnLoad(obj);

        setConnectionListener();

        setGroupListener();

        Instance = this;
    }
コード例 #5
0
ファイル: CloudDriveViewModel.cs プロジェクト: rrsc/uwp
        /// <summary>
        /// Remove folders from global listener
        /// </summary>
        /// <param name="globalListener">Global notifications listener</param>
        public void Deinitialize(GlobalListener globalListener)
        {
            if (globalListener == null)
            {
                return;
            }
            globalListener.NodeAdded              -= CloudDrive.OnNodeAdded;
            globalListener.NodeRemoved            -= CloudDrive.OnNodeRemoved;
            globalListener.OutSharedFolderAdded   -= CloudDrive.OnOutSharedFolderUpdated;
            globalListener.OutSharedFolderRemoved -= CloudDrive.OnOutSharedFolderUpdated;

            globalListener.NodeAdded   -= RubbishBin.OnNodeAdded;
            globalListener.NodeRemoved -= RubbishBin.OnNodeRemoved;

            globalListener.NodeAdded   -= CameraUploads.OnNodeAdded;
            globalListener.NodeRemoved -= CameraUploads.OnNodeRemoved;
        }
コード例 #6
0
        private void InitializeApplication()
        {
            if (ApplicationInitialized)
            {
                return;
            }

            // Clear settings values we do no longer use
            AppService.ClearObsoleteSettings();

            // Initialize the application information
            if (AppInformation == null)
            {
                AppInformation = new AppInformation();
            }

            // Initialize the links information
            LinkInformationService.Reset();

            // Initialize SDK parameters
            SdkService.InitializeSdkParams();

            // Add a global notifications listener
            GlobalListener = new GlobalListener();
            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(TransferService.GlobalTransferListener);

            // Initialize Folders
            AppService.InitializeAppFolders();

            // Initialize the DB
            AppService.InitializeDatabase();

            // Save the app information for future use (like deleting settings)
            AppService.SaveAppInformation();

            // Ensure we don't initialize again
            ApplicationInitialized = true;
        }
コード例 #7
0
 public void Deinitialize(GlobalListener globalListener)
 {
 }
コード例 #8
0
ファイル: App.xaml.cs プロジェクト: vrosnet/windowsphone
        // 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;
        }
コード例 #9
0
 public void Deinitialize(GlobalListener globalListener)
 {
     // Add folders to global listener to receive notifications
     globalListener.Folders.Remove(this.CameraUploads);
 }
コード例 #10
0
 public void Deinitialize(GlobalListener globalListener)
 {
     // Add folders to global listener to receive notifications
     globalListener.Nodes.Remove(this);
 }
コード例 #11
0
 public void Initialize(GlobalListener globalListener)
 {
     // Add folders to global listener to receive notifications
     globalListener.Folders.Add(this.FolderLink);
 }
コード例 #12
0
 public void Deinitialize(GlobalListener globalListener)
 {
     // Remove contacts of global listener
     globalListener.Contacts.Remove(this);
 }
コード例 #13
0
 public void Initialize(GlobalListener globalListener)
 {
     // Add contacts to global listener to receive notifications
     globalListener.Contacts.Add(this);
 }