// Use this for initialization void Start() { Home myHome = HomeManager.Instance().GetMyHome(); rewards = myHome.DeliveryRewords; refresh(); }
public void showDialog() { resetDiamond.text = "" + HomeManager.Instance().GetDiamondCount(); resetGold.text = "" + HomeManager.Instance().GetGoldCount(); dialog.SetActive(true); }
public void Reject() { animator.SetTrigger("drop"); HomeManager.Instance().UseGold(100); //curGold -= 100; saveAndReset(); }
protected void btnModify_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(txtMChartURL.Text)) { if (HttpContext.Current.Session["chartId"] != null) { var hManager = new HomeManager(); hManager.FileName = Path.Combine(HttpContext.Current.Request.PhysicalApplicationPath, "Fileadmin", "Home", Global.Core.ClientName + "HomePage.xml");//Path.Combine(Request.PhysicalApplicationPath, "App_Data", "HomePage.xml"); hManager.GuId = Guid.NewGuid().ToString(); hManager.NewsFile = "News.xml"; hManager.RssFeedUrl = "http://blueoceanmi.com/newsroom"; hManager.ChartHeading = txtMCHeading.Text.Trim(); if (CheckUrlStatus(txtMChartURL.Text.Trim())) { hManager.ChartsURL = txtMChartURL.Text.Trim(); hManager.ClientName = Global.Core.ClientName; hManager.CreatedDate = DateTime.Now.ToString("dd-MM-yyyy"); hManager.UserId = Global.User.Id.ToString(); hManager.Modify(HttpContext.Current.Session["chartId"].ToString()); Response.Redirect("HomeManagement.aspx?msg=2", false); } else { Response.Redirect("ChartsDetails.aspx?msg=3", false); } } } }
public void Pass() { HomeManager.Instance().AddDiamond(1); //curDiamond += 1; saveAndReset(); }
public ActionResult CargarDigitos(string Respuesta_DD, int Puntaje_DD, int DD_TR, string Respuesta_DL, int Puntaje_DL, int DL_TR) { Sujeto Sujeto = new Sujeto(); Sujeto = Session["Sujeto"] as Sujeto; Sujeto.FechayHora_Salida_Digitos = Fecha_Hora_ARG(); Sujeto.Respuesta_DD = Respuesta_DD; Sujeto.Puntaje_DD = Puntaje_DD; Sujeto.DD_TR = DD_TR; Sujeto.Respuesta_DL = Respuesta_DL; Sujeto.Puntaje_DL = Puntaje_DL; Sujeto.DL_TR = DL_TR; Sujeto.Completo_Digitos = "Si"; Sujeto.Completo_Monitoreo = "No"; Sujeto.Completo_Comprension = "No"; HomeManager Manager = new HomeManager(); Manager.Cargar(Sujeto); ViewBag.Parte = "Primera Parte"; return(View("~/Views/Home/FinalParcial.cshtml")); }
public ActionResult Digitos(string Apellido, string Nombre, int Edad, string Sexo, string Nivel_Educativo, string Ultimos_DNI, string Lugar_de_Residencia, string Mail) { HomeManager Manager = new HomeManager(); if (Manager.Consultar(Mail) == null) { Sujeto Sujeto = new Sujeto(); Sujeto.FechayHora_Entrada_Digitos = Fecha_Hora_ARG(); //Fecha y Hora al momento de Aceptar el Concentimiento Informado Sujeto.Apellido = Apellido.ToUpper(); Sujeto.Nombre = Nombre.ToUpper(); Sujeto.Edad = Edad; Sujeto.Sexo = Sexo; Sujeto.Nivel_Educativo = Nivel_Educativo; Sujeto.Ultimos_DNI = Ultimos_DNI; Sujeto.Lugar_de_Residencia = Lugar_de_Residencia; Sujeto.Mail = Mail; Session["Sujeto"] = Sujeto; return(View("~/Views/Home/Digitos.cshtml")); } else { ViewBag.Error = "El Mail ingresado ya existe. Ingrese otra dirección de correo electrónico."; return(View("~/Views/Home/Consentimiento.cshtml")); } }
public void saveAndReset() { //PlayerPrefs.SetInt (Table.GOLD_KEY, curGold); //PlayerPrefs.SetInt (Table.DIAMOND_KEY, curDiamond); HomeManager.Instance().saveGoldAndDiamond(); refreshMoney(); }
public ActionResult Anotarme(int IdSubject) { User User = new User(); User = (User)Session["User_loggedIn"]; int IdStudent = User.Id; HomeManager Manager = new HomeManager(); int Vacancies = Manager.getVacancies(IdSubject); if (Vacancies >= 1) { Registration Registration = new Registration(); Registration.IdSubject = IdSubject; Registration.IdStudent = IdStudent; Manager.addRegistration(Registration, Vacancies); return(RedirectToAction("Estudiante")); } else { ViewBag.Error = "¡Ya no quedan vacantes en esta Materia!"; return(View("~/Home/Views/Estudiante.cshtml")); } }
public ActionResult Index() { // Reset ViewModelList Session if (Session["ViewModelList"] != null) { Session["ViewModelList"] = null; } // Validate log in and user access UserAccessSession UASession = (UserAccessSession)Session["UserAccess"]; if (UASession == null) { return(RedirectToAction("Login", "Account")); } Session["CurrentPage"] = new CurrentPageSession("HOME", "HOME", "LOG"); HomeManager HManager = new HomeManager(); UserSession user = (UserSession)Session["User"]; HomeViewModel HViewModel = new HomeViewModel(); Session["MenuItemNotif"] = HManager.GetMenuItemNotification(user.Username); Session["RawItemNotif"] = HManager.GetRawItemNotification(user.Username); Session["VendorNotif"] = HManager.GetVendorItemNotification(user.Username); HViewModel.MenuItemNotif = HManager.GetMenuItemNotification(user.Username); HViewModel.RawItemNotif = HManager.GetRawItemNotification(user.Username); HViewModel.VendorNotif = HManager.GetVendorItemNotification(user.Username); AccountManager.LogDateTime(user.Username); return(View(HViewModel)); }
private List <Registration> Consulta_Inscriptas_Alumno(int Id) { HomeManager Manager = new HomeManager(); List <Registration> Registrations = Manager.getRegistrations(Id); return(Registrations); }
public JsonResult NewsList(int pageIndex, int pageSize) { return(Json(new AjaxResult() { Success = true, Data = HomeManager.GetNewsList(pageIndex, pageSize) })); }
void Awake() { _insta = this; //PlayerPrefs.DeleteAll (); SettingPanel.SetActive(false); RemoveAdPanel.SetActive(false); // AdRemovedBtn.SetActive (false); BucketPanel.SetActive(false); highScore.text = "High Score " + PlayerPrefs.GetInt("HighScore"); //display high score from gameController if (PlayerPrefs.GetInt("Controller") == 1) { AccBtn.SetActive(true); iTween.PunchScale(AccBtn, iTween.Hash("y", 0.1f, "LoopType", "loop", "delay", 0.6f)); cnInputBtn.SetActive(false); } else if (PlayerPrefs.GetInt("Controller") == 2) { AccBtn.SetActive(false); cnInputBtn.SetActive(true); iTween.PunchScale(cnInputBtn, iTween.Hash("y", 0.1f, "LoopType", "loop", "delay", 0.6f)); } BtnActivate(); //chk for high Score and set btn active or Inactive. ITweenEffectOnBtn(); initCheck(); #if UNITY_ANDROID //disable restore button in adroid AdRemoveBtns[1].SetActive(false); #endif }
public void SaveRpt() { int round = this.Status.Round; if (round > this.Status.TotalRound) { return; } HomeManager.SaveRpt(); AwayManager.SaveRpt(); //统计数据 if (_statisticsCallback != null) { _statisticsCallback(); } var list = this._report.BallResults; int dif = list.Count == 0 ? 2 : round - list[list.Count - 1].AsRound; if (dif <= 0) { return; } var obj = _status.MatchState.SaveRpt(this); if (null != obj) { obj.Round = (round == 1 || dif > 1) ? round : 0; list.Add(obj); } }
public JsonResult NewsDetail(int sysNo) { return(Json(new AjaxResult() { Success = true, Data = HomeManager.GetNewsDetail(sysNo) })); }
public void SetTotal(BatchMatchEntity batchMatchEntity) { HomeScore = _match.HomeScore; AwayScore = _match.AwayScore; TotalRound = _match.Status.TotalRound; HomeManager.SetTotal(batchMatchEntity.HomeManager); AwayManager.SetTotal(batchMatchEntity.AwayManager); int endRound = 0; for (int i = 0; i < _match.Report.BallResults.Count; i++) { var ballResult = _match.Report.BallResults[i]; if (ballResult.AsRound > endRound) { if (ballResult.StateData.State != 0 || ballResult.ClassId > 1) { var entity = new StatisticsBallEntity(_match, i, ballResult); if (entity.EndRound > 0) { endRound = entity.EndRound; } StatisticsBallResults.Add(entity); } } } }
// Use this for initialization void Start() { Home myHome = HomeManager.Instance().GetMyHome(); rewards = myHome.ConfirmRewards; refresh(); }
public ActionResult UpdateProduct(String Product, string TransactionID, string Quantity, string Cost) { List <Orders> ShoppingCart = HomeManager.ReadExistingOrders(TransactionID); // Need to look at quantity too. var itemToRemove = (from item in ShoppingCart where item.Serial == Product select item).FirstOrDefault(); ShoppingCart.Remove(itemToRemove); if (HomeManager.DeleteProducts(ShoppingCart, TransactionID, Product)) { Orders ModifyCart = new Orders { Cost = Cost, Quantity = Quantity, Serial = Product }; ShoppingCart.Add(ModifyCart); if (HomeManager.InsertOrderItem(ShoppingCart, TransactionID)) { } } return(RedirectToAction("About")); }
private Dictionary <int, Professor> Consultar_Docentes() { HomeManager Manager = new HomeManager(); Dictionary <int, Professor> Professors = Manager.getProfessors(); return(Professors); }
static void Main(string[] args) { HomeManager manager = new HomeManager(); manager.Process(); Console.ReadLine(); }
void Start() { //initiation and evaluation shield = 0; bedManager = managerObject.GetComponent <BedManager>(); collisionManager = managerObject.GetComponent <CollisionManager>(); snakeBody = new List <Vector4>(); body = new List <GameObject>(); headPosition = new Vector2(20, 20); headDirection = Constants.HEAD_DIRECTION_RIGHT; overallManagerHandle = managerObject.GetComponent <OverallTileManager>(); homeManager = managerObject.GetComponent <HomeManager>(); followerHandle = cameraObject.GetComponent <SmoothFollow>(); followerHandle.updateTargetPosition(headPosition); followerHandle.updateSize(5); head = Instantiate(overallManagerHandle.avaliableSpritePrefabs[Constants.TO_SPRITE_ID_OFFSET], headPosition, transform.rotation); //TEST: with body /* * addBody(Constants.SPRITE_WOOD); * addBody(Constants.SPRITE_WOOD); * addBody(Constants.SPRITE_WOOD); * addBody(Constants.SPRITE_STONE); * addBody(Constants.SPRITE_WOOD); * addBody(Constants.SPRITE_WOOD); * addBody(Constants.SPRITE_STONE); */ //endtest makeASweetHome(headPosition + new Vector2(-2, 3)); }
public ActionResult Index() { HomeManager mgr = new HomeManager(); HomeIndexVM model = new HomeIndexVM(); var specialCourier = mgr.GetAllSpecials(); var featuredCourier = mgr.GetFeaturedVehicles(); if (specialCourier.Success) { model.Specials = specialCourier.Package; } else { throw new Exception(); } if (featuredCourier.Success) { model.FeaturedVehicles = featuredCourier.Package; } else { throw new Exception(); } return(View(model)); }
private List <Subject> Consultar_Materias() { HomeManager Manager = new HomeManager(); List <Subject> Subjects = Manager.getSubjects(); return(Subjects); }
/// <summary> /// Verifica si el Mail y los Últimos del DNI son correctos antes de continuar /// </summary> /// <param name="Mail"></param> /// <param name="digitos_DNI"></param> /// <returns></returns> public ActionResult ComprensionTest(string Mail, string digitos_DNI) { try { HomeManager Manager = new HomeManager(); Sujeto Sujeto = Manager.ConsultarDatos(Mail); if (digitos_DNI == Sujeto.Ultimos_DNI && Sujeto.Completo_Digitos == "Si" && Sujeto.Completo_Monitoreo == "Si" && Sujeto.Completo_Comprension == "No") { Session["ID"] = Sujeto.ID; Session["FechayHora_Entrada_Comprension"] = Fecha_Hora_ARG(); return(View("~/Views/Home/Comprension.cshtml")); } else { return(View("~/Views/Home/Error.cshtml")); } } catch (NullReferenceException) { return(View("~/Views/Home/Error.cshtml")); } }
public override string[] GetRolesForUser(string username) { HomeManager aHomeManager = new HomeManager(); string data = aHomeManager.GetRole(username); string[] result = { data }; return(result); }
public ActionResult RegisterClasses(ListClassesViewModel selectedClass) { if (HomeManager.AddNewClass((string)Session["UserName"], selectedClass)) { return(Redirect("MyClasses")); } return(View(HomeManager.DisplayAllClasses())); }
public ActionResult BDocente(string Cod) { HomeManager Manager = new HomeManager(); Manager.delete("Professors", Cod); return(RedirectToAction("Admin")); }
public ActionResult BMateria(string Cod) { HomeManager Manager = new HomeManager(); Manager.delete("Subjects", Cod); return(RedirectToAction("Admin")); }
public void AddProcess() { if (_match.Status.Round > 0) { HomeManager.AddProcess(_match.Status.Round, _match.Managers[0]); AwayManager.AddProcess(_match.Status.Round, _match.Managers[1]); } }
// Use this for initialization void Start() { loadMoneyAndDiamond(); Home myHome = HomeManager.Instance().GetMyHome(); items = myHome.Items; refresh(); }
public override void Initialize() { HandleCommandLine(Environment.GetCommandLineArgs()); if (!Directory.Exists(SavePath)) Directory.CreateDirectory(SavePath); #if DEBUG Log.Initialize(Path.Combine(SavePath, "log.txt"), LogLevel.All, false); #else Log.Initialize(Path.Combine(SavePath, "log.txt"), LogLevel.All & ~LogLevel.Debug, false); #endif AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; try { if (File.Exists(Path.Combine(SavePath, "tshock.pid"))) { Log.ConsoleInfo( "TShock was improperly shut down. Please avoid this in the future, world corruption may result from this."); File.Delete(Path.Combine(SavePath, "tshock.pid")); } File.WriteAllText(Path.Combine(SavePath, "tshock.pid"), Process.GetCurrentProcess().Id.ToString(CultureInfo.InvariantCulture)); ConfigFile.ConfigRead += OnConfigRead; FileTools.SetupConfig(); HandleCommandLine_Port(Environment.GetCommandLineArgs()); if (Config.StorageType.ToLower() == "sqlite") { string sql = Path.Combine(SavePath, "tshock.sqlite"); DB = new SqliteConnection(string.Format("uri=file://{0},Version=3", sql)); } else if (Config.StorageType.ToLower() == "mysql") { try { var hostport = Config.MySqlHost.Split(':'); DB = new MySqlConnection(); DB.ConnectionString = String.Format("Server={0}; Port={1}; Database={2}; Uid={3}; Pwd={4};", hostport[0], hostport.Length > 1 ? hostport[1] : "3306", Config.MySqlDbName, Config.MySqlUsername, Config.MySqlPassword ); } catch (MySqlException ex) { Log.Error(ex.ToString()); throw new Exception("MySql not setup correctly"); } } else { throw new Exception("Invalid storage type"); } Backups = new BackupManager(Path.Combine(SavePath, "backups")); Backups.KeepFor = Config.BackupKeepFor; Backups.Interval = Config.BackupInterval; Bans = new BanManager(DB); Warps = new WarpManager(DB); Users = new UserManager(DB); Groups = new GroupManager(DB); Groups.LoadPermisions(); Regions = new RegionManager(DB); Itembans = new ItemManager(DB); RememberedPos = new RemeberedPosManager(DB); Inventory = new InventoryManager(DB); HomeManager = new HomeManager(DB); ArmorShopManager = new ArmorShopManager(DB); WeaponShopManager = new WeaponShopManager(DB); ItemShopManager = new ItemShopManager(DB); BlockShopManager = new BlockShopManager(DB); OtherShopManager = new OtherShopManager(DB); Towns = new TownManager(DB); Chat = new ChatManager(DB); Restart = new RestartManager(); RestApi = new SecureRest(Netplay.serverListenIP, 8080); RestApi.Verify += RestApi_Verify; RestApi.Port = Config.RestApiPort; RestManager = new RestManager(RestApi); RestManager.RegisterRestfulCommands(); var geoippath = Path.Combine(SavePath, "GeoIP.dat"); if (Config.EnableGeoIP && File.Exists(geoippath)) Geo = new GeoIPCountry(geoippath); profiles = @"Z:\profiles\"; temp = @"Z:\profiles\temp\"; Console.Title = string.Format("TerrariaShock Version {0} ({1})", Version, VersionCodename); Log.ConsoleInfo(string.Format("TerrariaShock Version {0} ({1}) now running.", Version, VersionCodename)); GameHooks.PostInitialize += OnPostInit; GameHooks.Update += OnUpdate; ServerHooks.Connect += OnConnect; ServerHooks.Join += OnJoin; ServerHooks.Leave += OnLeave; ServerHooks.Chat += OnChat; ServerHooks.Command += ServerHooks_OnCommand; NetHooks.GetData += OnGetData; NetHooks.SendData += NetHooks_SendData; NetHooks.GreetPlayer += OnGreetPlayer; NpcHooks.StrikeNpc += NpcHooks_OnStrikeNpc; NpcHooks.SetDefaultsInt += OnNpcSetDefaults; ProjectileHooks.SetDefaults += OnProjectileSetDefaults; WorldHooks.StartHardMode += OnStartHardMode; WorldHooks.SaveWorld += OnSaveWorld; GetDataHandlers.InitGetDataHandler(); Commands.InitCommands(); if (Config.BufferPackets) PacketBuffer = new PacketBufferer(); Users.DeletePlayersAfterMinutes(TShock.Config.DeleteUserAfterMinutes, 30, false); Users.DeletePlayersAfterMinutes(TShock.Config.DeleteUserAfterMinutes * 2, 100, false); Users.DeletePlayersAfterMinutes(TShock.Config.DeleteUserAfterMinutes * 3, 10000, true); Log.ConsoleInfo("AutoSave " + (Config.AutoSave ? "Enabled" : "Disabled")); Log.ConsoleInfo("Backups " + (Backups.Interval > 0 ? "Enabled" : "Disabled")); if (Initialized != null) Initialized(); } catch (Exception ex) { Log.Error("Fatal Startup Exception"); Log.Error(ex.ToString()); TShock.Backups.Backup(); Environment.Exit(1); } }