public HttpResponseMessage LoadSettings() { var settings = new ViewModels.SettingsViewModel(); if (ActiveModule.ModuleSettings.ContainsKey(FeatureController.MODSETTING_SETTING1)) { settings.Setting1 = ActiveModule.ModuleSettings[FeatureController.MODSETTING_SETTING1].ToString(); } return(Request.CreateResponse(HttpStatusCode.OK, settings)); }
public SettingsWindow(Action saveAction) { ViewModels.SettingsViewModel settingsViewModel = new ViewModels.SettingsViewModel(saveAction); this.InitializeComponent(); this.DataContext = settingsViewModel; #if DEBUG this.AttachDevTools(); #endif }
public async Task SettingsController_IndexTest() { SettingsController controller = new SettingsController(); var result = await controller.Index() as ViewResult; Assert.IsNotNull(result, "Invalid Result"); Assert.IsNotNull(result.Model, "Null Model"); EF2OR.ViewModels.SettingsViewModel settingsVM = new ViewModels.SettingsViewModel(); settingsVM.ApiBaseUrl = AuthenticationHelper.TESTAPI_BASEURL; settingsVM.ApiKey = AuthenticationHelper.TESTAPI_APIKEY; settingsVM.ApiSecret = AuthenticationHelper.TESTAPI_APISECRET; settingsVM.ApiPrefix = AuthenticationHelper.TESTAPI_APIPREFIX; settingsVM.DatabaseSettings = new InitialSetup(); var postResult = await controller.Index(settingsVM); Assert.IsTrue(controller.ModelState.IsValid, "Invalid model"); Assert.IsNotNull(postResult, "Invalid Result"); }
public HttpResponseMessage SaveSettings(ViewModels.SettingsViewModel settings) { ModuleController.Instance.UpdateModuleSetting(ActiveModule.ModuleID, FeatureController.MODSETTING_SETTING1, settings.Setting1); return(Request.CreateResponse(HttpStatusCode.OK, "success")); }
public SettingsPage() { InitializeComponent(); this.BindingContext = viewModel = new ViewModels.SettingsViewModel(); }
public Settings() { InitializeComponent(); ViewModels.SettingsViewModel settingsViewModel = new ViewModels.SettingsViewModel(); this.DataContext = new ViewModels.SettingsViewModel(); }
public SettingsView() { InitializeComponent(); BindingContext = new ViewModels.SettingsViewModel(UserDialogs.Instance); }
public SettingsPage() { _viewModel = new ViewModels.SettingsViewModel(); InitializeComponent(); BindingContext = _viewModel; }
public SettingsPage(IRequestService requestService) { InitializeComponent(); BindingContext = new ViewModels.SettingsViewModel(requestService); }