Exemplo n.º 1
0
 private void OnPropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     switch (e.PropertyName)
     {
     case "ShowWinRatio":
     case "ShowWinRatioCoin":
     case "ShowWinRatioNoCoin":
     case "ShowWins":
     case "ShowWinsCoin":
     case "ShowWinsNoCoin":
     case "ShowTotalGames":
     case "ShowTotalGamesByCoin":
     case "ShowPlayedVsRatio":
         using (var reg = new StatRegistrySettings(GetType()))
         {
             reg.ShowWinRatio         = ShowWinRatio;
             reg.ShowWinRatioCoin     = ShowWinRatioCoin;
             reg.ShowWinRatioNoCoin   = ShowWinRatioNoCoin;
             reg.ShowWins             = ShowWins;
             reg.ShowWinsCoin         = ShowWinsCoin;
             reg.ShowWinsNoCoin       = ShowWinsNoCoin;
             reg.ShowTotalGames       = ShowTotalGames;
             reg.ShowTotalGamesByCoin = ShowTotalGamesByCoin;
             reg.ShowPlayedVsRatio    = ShowPlayedVsRatio;
         }
         break;
     }
 }
Exemplo n.º 2
0
        protected StatViewModelBase()
        {
            GameMode = String.Empty;

            using (var reg = new StatRegistrySettings(GetType()))
            {
                ShowWinRatio         = reg.ShowWinRatio;
                ShowWinRatioCoin     = reg.ShowWinRatioCoin;
                ShowWinRatioNoCoin   = reg.ShowWinRatioNoCoin;
                ShowWins             = reg.ShowWins;
                ShowWinsCoin         = reg.ShowWinsCoin;
                ShowWinsNoCoin       = reg.ShowWinsNoCoin;
                ShowTotalGames       = reg.ShowTotalGames;
                ShowTotalGamesByCoin = reg.ShowTotalGamesByCoin;
                ShowPlayedVsRatio    = reg.ShowPlayedVsRatio;
            }
            if (IsLastSelected(false, 0))
            {
                ShowWinRatio   = true;
                ShowWins       = true;
                ShowTotalGames = true;
            }
            Busy             = new BusyWatcher();
            PropertyChanged += OnPropertyChanged;
        }
 private void OnPropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     switch (e.PropertyName)
     {
         case "ShowWinRatio":
         case "ShowWinRatioCoin":
         case "ShowWinRatioNoCoin":
         case "ShowWins":
         case "ShowWinsCoin":
         case "ShowWinsNoCoin":
         case "ShowTotalGames":
         case "ShowTotalGamesByCoin":
         case "ShowPlayedVsRatio":
             using (var reg = new StatRegistrySettings(GetType()))
             {
                 reg.ShowWinRatio = ShowWinRatio;
                 reg.ShowWinRatioCoin = ShowWinRatioCoin;
                 reg.ShowWinRatioNoCoin = ShowWinRatioNoCoin;
                 reg.ShowWins = ShowWins;
                 reg.ShowWinsCoin = ShowWinsCoin;
                 reg.ShowWinsNoCoin = ShowWinsNoCoin;
                 reg.ShowTotalGames = ShowTotalGames;
                 reg.ShowTotalGamesByCoin = ShowTotalGamesByCoin;
                 reg.ShowPlayedVsRatio = ShowPlayedVsRatio;
             }
             break;
     }
 }
        protected StatViewModelBase()
        {
            GameMode = String.Empty;

            using (var reg = new StatRegistrySettings(GetType()))
            {
                ShowWinRatio = reg.ShowWinRatio;
                ShowWinRatioCoin = reg.ShowWinRatioCoin;
                ShowWinRatioNoCoin = reg.ShowWinRatioNoCoin;
                ShowWins = reg.ShowWins;
                ShowWinsCoin = reg.ShowWinsCoin;
                ShowWinsNoCoin = reg.ShowWinsNoCoin;
                ShowTotalGames = reg.ShowTotalGames;
                ShowTotalGamesByCoin = reg.ShowTotalGamesByCoin;
                ShowPlayedVsRatio = reg.ShowPlayedVsRatio;
            }
            if (IsLastSelected(false, 0))
            {
                ShowWinRatio = true;
                ShowWins = true;
                ShowTotalGames = true;
            }
            Busy = new BusyWatcher();
            PropertyChanged += OnPropertyChanged;
        }