示例#1
0
        public MainPage()
        {
            InitializeComponent();
            NavigationPage.SetHasNavigationBar(this, false);
            popup = new SharedPopup();
            //popup.IsLoading = true;
            //popup.ToggleTemp = true;
            //For using application directory - no direct access to user
            localPath = XamEncDec.GetLocalPath();

            //For using roaming directory - not all platform support this
            roamingPath = XamEncDec.GetRoamingPath();

            //For using external storage path in Android
            androidSDPath = "";
            if (Device.RuntimePlatform == Device.Android)
            {
                androidSDPath = CrossXamarinFileEncryptorDecryptor.Current.GetAndroidExternalStoragePath();
            }

            //For using shared document path - commonly for iOS
            documentPath = XamEncDec.GetDocumentsPath();

            //For using library path in iOS
            libraryPath = "";
            if (Device.RuntimePlatform == Device.iOS)
            {
                libraryPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "..", "Library");
            }

            //Other paths that you can use, theres more if you google
            localAppDataPath  = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
            commonAppDataPath = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData);
            commonDocPath     = Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments);

            //getting the assembly to access resource files
            assembly = IntrospectionExtensions.GetTypeInfo(typeof(TestFileEncryptDecryptXamarin.App)).Assembly;
        }
 public DecryptPage()
 {
     InitializeComponent();
     NavigationPage.SetHasNavigationBar(this, false);
     popup = new SharedPopup();
 }