Example #1
0
 public ActionResult Index(RuntimeOptions model)
 {
     if (TryUpdateModel(model))
     {
         model.Save();
         return(this.RedirectToAction("Index", "Home", new { area = "" }));
     }
     ViewBag.Title            = "Nastavení systému";
     ViewBag.CancelAction     = "Index";
     ViewBag.CancelController = "Home";
     ViewBag.HeaderText       = "Pozor! Nesprávné nastavení může způsobit nefunkčnost aplikace. Pokud nevíte, co děláte, neměňte hodnoty na této stránce.";
     return(View("~/Views/Shared/UniversalEditor.cshtml", model));
 }
Example #2
0
        public void Exit()
        {
            #region Save the RuntimeOptions
            mRuntimeOptions.FullScreen = this.WindowState == FormWindowState.Maximized;

            if (this.WindowState != FormWindowState.Maximized)
            {
                mRuntimeOptions.WindowWidth  = this.Width;
                mRuntimeOptions.WindowHeight = this.Height;
            }

            if (System.IO.Directory.Exists(FileWindow.ApplicationFolderForThisProgram) == false)
            {
                System.IO.Directory.CreateDirectory(FileWindow.ApplicationFolderForThisProgram);
            }

            mRuntimeOptions.Save(FileWindow.ApplicationFolderForThisProgram + @"RuntimeOptions.xml");

            #endregion

            SpriteManager.Exiting = true;
            System.Windows.Forms.Cursor.Show();
            this.Dispose();
        }