예제 #1
0
        //public event PaypalUriRetreivedEventHandler PaypalUriRetreived;


        public LoginRegisterViewModel()
        {
            _internetConnectionManagerLocator = new InternetConnectionManagerLocator();
            _informerManagerLocator           = new InformerManagerLocator();
            //_locationHelper = new LocationManager();
            _inAppPurchaseManager = new InAppPurchaseManager();
            _user    = new User();
            _planApi = new PlanAPI(new Uri(AppResources.BaseAddress));
            _userApi = new UserAPI(new Uri(AppResources.BaseAddress));

            _internetConnectionManagerLocator.InternetConnectionManager.ConnectionStateChanged += InternetConnectionManager_ConnectionStateChanged;
            _userApi.ErrorReceived += _userApi_ErrorReceived;

            Plans = new ObservableCollection <Plan>();

            GetPlans();
            //_locationHelper.GetPhoneLocation();
        }
예제 #2
0
        public MainViewModel()
        {
            if (IsolatedStorageSettings.ApplicationSettings.Contains("user") == false)
            {
            }
            else
            {
                _informerManagerLocator           = new InformerManagerLocator();
                _internetConnectionManagerLocator = new InternetConnectionManagerLocator();
                _internetConnectionManagerLocator.InternetConnectionManager.ConnectionStateChanged += InternetConnectionManager_ConnectionStateChanged;

                _folderApi = new FolderAPI(new Uri(AppResources.BaseAddress));
                _folderApi.ErrorReceived += _folderApi_ErrorReceived;

                _fileApi = new FileAPI(new Uri(AppResources.BaseAddress));
                _fileApi.ErrorReceived += _fileApi_ErrorReceived;

                _foldersIdTree = new List <int>();

                Entities      = new ObservableCollection <DiskEntity>();
                LocalEntities = new ObservableCollection <DiskEntity>();
                Permissions   = new ObservableCollection <Permission>();

                //transferRequests = new ObservableCollection<BackgroundTransferRequest>();
                transferRequests = new ObservableCollection <CustomBackgroundTransferRequest>();

                using (IsolatedStorageFile isoStore = IsolatedStorageFile.GetUserStoreForApplication())
                {
                    if (!isoStore.DirectoryExists("/shared/transfers"))
                    {
                        isoStore.CreateDirectory("/shared/transfers");
                    }
                }

                InitDownload();
            }
        }