public RecordManageWindowViewModel() { if (this.IsInDesignMode) { record = new UpdateModelWrapper(new DesigntimeUpdateModel()); } else { DomainsCache = MonitorIoc.Current.Get <DomainsCache>(); TempStorage = MonitorIoc.Current.Get <TempStorage>(); record = TempStorage.GetAndRemove <UpdateModelWrapper>(DDNSMonitorWindowViewModel.RECORD_FETCH_KEY); if (record == null) { record = new UpdateModelWrapper() { Enabled = true } } ; if (DomainsCache.DomainInfos.Count() <= 0) { RefreshDataCommand.Execute(null); } else { BindData(); } } }
public IActionResult MovieForm(MovieResponse movieResponse) { //proof that the model is linking to the form, shows up in debug window //Debug.WriteLine(movieResponse.Title + " has been added"); TempStorage.AddMovie(movieResponse); return(View("Confirmation", movieResponse)); }
private void btnCalculation_Click(object sender, EventArgs e) { float CurrentHead; if ((TempStorage.GetFL().Count > 0)) { bool SuccessParse = float.TryParse(tbCurrentHead.Text, out CurrentHead); if (SuccessParse || CurrentHead != 0) { Machine machine = lbMachines.SelectedItem as Machine; ResultDiagnostics shaft = CalculationDefectsController.CalculShaft(machine, CurrentHead);; ResultDiagnostics bearing = CalculationDefectsController.CalculBearing(machine, CurrentHead); ResultDiagnostics engine = CalculationDefectsController.CalculEngine(machine, CurrentHead); lbShaft.Text = shaft.level; lbShaft.BackColor = ColorQualifier(lbShaft.Text); lbBearing.Text = bearing.level; lbBearing.BackColor = ColorQualifier(lbBearing.Text); lbEngine.Text = engine.level; lbEngine.BackColor = ColorQualifier(lbEngine.Text); } else { MessageBox.Show("Некорректно введен текущий относительный напор!"); } } else { MessageBox.Show("Не выбран файл с данными!"); } }
public void CallsTheGetExtensionMethodOfDefaultTempStorage() { SetupTryGet <int>(); TempStorage.Get <int>("my_bucket", "my_key"); VerifyGet <int>("my_bucket", "my_key"); }
public IActionResult AddMovies(ApplicationResponse appResponse) { TempStorage.AddApplication(appResponse); _DbContext.ApplicationResponses.Add(appResponse); _DbContext.SaveChanges(); return(View("MovieConfirmation", appResponse)); }
public IActionResult AddMovie(Movie movie) { Debug.WriteLine("Movie Title: " + movie.Title); TempStorage.AddMovie(movie); ModelState.Clear(); return(View()); }
public IActionResult AddRestaurant(Restaurant newRestaurant) { // adds new restaurant from form to temporary storage TempStorage.AddRestaurant(newRestaurant); //passes temporary storage to RestaurantList view to display the restaurant list return(View("RestaurantList", TempStorage.Restaurants)); }
public IActionResult RestaurantSuggestions(Suggestion suggestion) { if (ModelState.IsValid) { TempStorage.AddApplication(suggestion); return(View("RestaurantList", TempStorage.SuggestionResponses)); } return(View("RestaurantSuggestions")); }
private static void CreateTemporaryStorageWithCustomRootPath() { var options = new TempStorageOptions { RootPath = @"C:\Temp" }; using ITempStorage tempStorage = new TempStorage( new OptionsWrapper <TempStorageOptions>(options)); }
public IActionResult dataInput(cusFavRes data) { if (!ModelState.IsValid) { return(View("dataInput")); } TempStorage.AddApplication(data); return(View("Confirm", data)); }
public IActionResult Suggestions(Suggestion suggestion) { if (ModelState.IsValid) //checks if the form input is valid and then executes statement inside if { TempStorage.AddRestaurant(suggestion); Response.Redirect("Suggestions"); } return(View("Suggestions")); }
public IActionResult AddRestaurant(ApplicationResponse appResponse) { if (ModelState.IsValid) { TempStorage.AddApplication(appResponse); return(View("ConfirmationPage", appResponse)); } return(View(appResponse)); }
void Awake() { Debug.Log("+"); //var ts = Type.GetType("TempStorage"); //gameObject.AddComponent(ts); //TempStorage st = gameObject.AddComponent(typeof(TempStorage)) as TempStorage; tempStorage = new TempStorage(minerType, income, upgradeCost, addCost, speed, digTime, minerPrefab, platform, spawnPosition, upgradeText, addNewText, whatIsWall); gameData.tempStorages.Enqueue(gameObject); }
public IActionResult UserAdd(UserRestaurant res) { if (ModelState.IsValid) { TempStorage.AddApp(res); return(RedirectToAction("UserList")); } return(View()); }
public IActionResult AddMovie(MovieInfo Movie) { if (ModelState.IsValid) { TempStorage.AddMovie(Movie); return(View("Confirmation", Movie)); } return(View()); }
private static void BackgroundDisposalConfiguration() { var options = new TempStorageOptions { MaxNumberOfBackgroundDisposalAttempts = 3, BackgroundDisposalInterval = TimeSpan.FromSeconds(30D) }; var tempStorage = new TempStorage(new OptionsWrapper <TempStorageOptions>(options)); }
public IActionResult MovieEntry(MovieEntry movie) { if (ModelState.IsValid) { TempStorage.AddMovie(movie); return(View("MovieList", TempStorage.Movies)); } return(View()); }
public IActionResult SubmitNew(RestSubmit restaurant) { if (ModelState.IsValid) { TempStorage.AddEntry(restaurant); Response.Redirect("viewSubmissions"); } return(View()); }
public IActionResult Add(Suggestions model) { if (ModelState.IsValid) { TempStorage.AddSuggestion(model); return(Redirect("ViewSuggestions")); } return(View()); }
public IActionResult EnterNewMovie(EnterNewMovieResponse oNewMovie) { if (ModelState.IsValid) { TempStorage.AddMovie(oNewMovie); return(View("Confirmation", oNewMovie)); } return(View()); }
public IActionResult EnterRestaurant(RestaurantResponse restaurant) { if (ModelState.IsValid) { TempStorage.AddRestaurant(restaurant); Response.Redirect("RestaurantList"); } return View(); }
[HttpPost] // on the post call, triggered by the submission of the form, the new suggestion is passed on to the ViewSuggestions View public IActionResult Submit(Suggestion newSuggestion) { if (ModelState.IsValid) { TempStorage.SubmitSuggestion(newSuggestion); return(RedirectToAction("ViewSuggestions")); } return(View()); }
public IActionResult Enter_Movies(Movie movieEntered) { //Makes sure form was valid before storing it to our temp storage, that way invalid forms aren't accepted. if (ModelState.IsValid) { TempStorage.AddMovie(movieEntered); } return(View()); }
public IActionResult Suggestions(Suggestion suggestion) { if (ModelState.IsValid) { TempStorage.AddSuggestion(suggestion); return(View(suggestion)); } return(View()); }
public IActionResult AddMovie(AddMovie model) { if (!ModelState.IsValid) { return(View()); } TempStorage.NewMovies(model); return(View("AddConfirmation", model)); }
public Mushroom(int inc, float dig, float spe, LayerMask _whatIsWall, float _distance, Rigidbody2D _rb, TempStorage ts) { Income = inc; DigTime = dig; Speed = spe; whatIsWall = _whatIsWall; distance = _distance; rb = _rb; tempStorage = ts; }
public IActionResult Submit(Suggestions Suggestion) { //Checks to make sure that all of the data is valid before adding to temp storage if (ModelState.IsValid) { TempStorage.AddSuggestion(Suggestion); } return(View()); }
public IActionResult AddSuggestion(Suggestion suggestion) { //Make sure that the inputs are valid if (ModelState.IsValid) { TempStorage.AddSuggestion(suggestion); return(View("Confirmation", suggestion)); } return(View()); }
public IActionResult AddMovie(AddMovie Movie) { //makes sure that all of the data is valid before adding it to the list if (ModelState.IsValid) { TempStorage.AddMovie(Movie); } return(View()); }
public IActionResult EnterRestaurants(EnterRestaurantsModel enterRestaurants) { //ensures data is valid before putting it into the list in temporary storage (protection against nulls) if (ModelState.IsValid) { TempStorage.AddApplication(enterRestaurants); Response.Redirect("DisplayRestaurants"); } return(View()); }