private void RestoreButtonClickHandler(object sender, RoutedEventArgs e)
        {
            var temp = new DeckLapseOptions();

            viewModel.Options.Delays              = temp.Delays;
            viewModel.Options.LeechAction         = temp.LeechAction;
            viewModel.Options.LeechFailsThreshold = temp.LeechFailsThreshold;
            viewModel.Options.MinInt              = temp.MinInt;
            viewModel.Options.NewInterval         = temp.NewInterval;
        }
 public void GetOptionsToView()
 {
     try
     {
         Options.Delays              = Utils.JsonNumberArrayToString(Config.GetNamedArray("delays"));
         Options.NewInterval         = (int)(JsonHelper.GetNameNumber(Config, "mult") * 100);
         Options.MinInt              = (int)JsonHelper.GetNameNumber(Config, "minInt");
         Options.LeechFailsThreshold = (int)JsonHelper.GetNameNumber(Config, "leechFails");
         Options.LeechAction         = (int)JsonHelper.GetNameNumber(Config, "leechAction");
     }
     catch //If any error happen we back to default
     {
         Options = new DeckLapseOptions();
     }
 }
 public DeckLapseOptionsViewModel(JsonObject config)
 {
     this.Config = config.GetNamedObject("lapse");
     Options     = new DeckLapseOptions();
 }