示例#1
0
        public ProfileViewModel()
        {
            this.storageService = SimpleIoc.Default.GetInstance<IIsolatedStorageManager>();
            this.singleton = Singleton.Instance;

            this.SetUserInfo();
        }
示例#2
0
        public Updater()
        {
            downloader = SimpleIoc.Default.GetInstance<IDownloader>();
            isoStorage = SimpleIoc.Default.GetInstance<IIsolatedStorageManager>();

            worker = new BackgroundWorker();
            worker.DoWork += worker_DoWork;
            worker.WorkerReportsProgress = true;
            worker.WorkerSupportsCancellation = false;
            worker.RunWorkerCompleted += worker_RunWorkerCompleted;
            worker.ProgressChanged += worker_ProgressChanged;
        }
示例#3
0
        public LoginViewModel(IIsolatedStorageManager storageService, IMetroDialogService dialogService)
        {
            this.storageService = storageService;
            this.dialogService = dialogService;

            // Instantiation des commandes
            this.ConnectionCommand = new RelayCommand(this.Connection, this.Connection_CanExecute);

            // Initialisation de l'interface
            if (Properties.Settings.Default.UserName != string.Empty)
            {
                this.SummonerName = Properties.Settings.Default.UserName;
            }

            // Pas besoin de tester si la valeur est null car c'est une enum
            this.Server = Properties.Settings.Default.Server;

            this.Servers = (IEnumerable<Region>)Enum.GetValues(typeof(Region));
        }