protected void SaveData() { try { if (vID != null) { //Edit on the object. int Id; if (int.TryParse(vID.ToString(), out Id)) { SizeInfo obj = SizeManager.Select(Id); obj.Sizename = txtName.Text; obj.Status = int.Parse(txtOrder.Text); SizeManager.Update(obj); } } else { //this is a new object. SizeInfo obj = new SizeInfo(); obj.Sizename = txtName.Text; obj.Status = int.Parse(txtOrder.Text); SizeManager.Insert(obj); } lblMessage.Text = "Đã lưu dữ liệu thành công!"; EditPanel.Enabled = false; BindData(); vID = null; } catch (Exception ex) { lblMessage.Text = ex.Message; } }
private void InitializeMenus() { // Zuletzt geöffnete Dateien anzeigen enable_last = Settings.Get("files.save-last", true); if (enable_last) { lastFiles = Settings.Get("files.last", "").Split(';').Where(s => s != "").Reverse().ToList(); UpdateLastFilesMenu(); } else { lastMenu.Enabled = false; } // Hilfe Menü nach den Erweiterungen zusammenbasteln var helpItem = Menu.CreateItem("Hilfe"); var extItem = helpItem.CreateItem("Erweiterungen"); extItem.Click += (s, ev) => new ExtensionsForm(extensionManager, this).ShowModal(this); var tmplItem = helpItem.CreateItem("Vorlagen"); tmplItem.Click += (s, ev) => new TemplatesForm(templateManager, templatePath).ShowModal(this); helpItem.Items.Add(new SeparatorMenuItem()); var clearSizesItem = helpItem.CreateItem("Fenstergößen löschen"); clearSizesItem.Click += (s, ev) => SizeManager.Reset(); helpItem.Items.Add(new SeparatorMenuItem()); var docItem = helpItem.CreateItem("Online Hilfe"); docItem.Click += (s, ev) => Process.Start("https://fahrplan.manuelhu.de/"); var infoItem = helpItem.CreateItem("Info"); infoItem.Click += (s, ev) => new InfoForm(Settings).ShowModal(this); }
internal BuildManager(GlobalManager globalManager) { _globalManager = globalManager; _connectionManager = new ConnectionManager(globalManager); _colorManager = new ColorManager(globalManager); _sizeManager = new SizeManager(globalManager); _jsonTreeManager = new JsonTreeManager(globalManager); }
private void EditData(int Id) { SizeInfo obj = SizeManager.Select((int)Id); txtName.Text = obj.Sizename; txtOrder.Text = obj.Status.ToString(); vID = obj.SizeID; EditPanel.Enabled = true; }
//Awake void Awake() { boss = GetComponent <Boss>(); mgJump = boss.mgJump; mgMovement = boss.mgMovement; mgPrefab = boss.mgPrefab; mgSize = boss.mgSize; mgLevel = boss.mgLevel; }
void Start() { //sizeOption = SizeManager.gridSize; SizeManager sm = FindObjectOfType <SizeManager>(); sizeOption = (!sm)?4:sm.gridSize; Debug.Log((!sm) ? "No SizeMgr found" : sm.gridSize.ToString()); boardReference.ConstructBoard(sizeOption); playerTurn = Random.Range(0, 2) <= 1; InitializeGame(); }
private void BindData2DDLSize() { this.ddlsize.DataSource = SizeManager.SelectAll(); this.ddlsize.DataTextField = "Sizename"; this.ddlsize.DataValueField = "SizeID"; this.ddlsize.DataBind(); ListItem item = new ListItem("- Kích thức(cỡ) -", "0"); this.ddlsize.Items.Insert(0, item); }
public ActionResult Insertar(Size obj) { if (ModelState.IsValid) { int rpta = new SizeManager().Insert(obj); return(RedirectToAction("Index")); } else { return(View("Formulario3", obj)); } }
// Use this for initialization void Start() { baseLocalScaleZ = transform.localScale.z; references = GetComponentInParent <CreationReferences>(); if (references) { creator = references.creator; if (stretchToCastPointInstead) { sm = creator.GetComponent <SizeManager>(); } } }
public override GameObject adapt(GameObject entity) { // poison arrow if (increasedSize != 0) { SizeManager component = Comp <SizeManager> .GetOrAdd(entity); component.increaseSize(increasedSize); } return(base.adapt(entity)); }
private void BindData() { DataTable dt = SizeManager.SelectAll(); if (dt != null) { DataView dv = dt.DefaultView; dv.Sort = "Status ASC"; dg.DataSource = dv; dg.DataBind(); } }
public ActionResult Modificar(Size obj) { if (ModelState.IsValid) { int rpta = new SizeManager().Update(obj);//despues de ingreesar el dato nos dirija al index return(RedirectToAction("Index")); } else { return(View("Formulario3", obj));//que lo muestre los datos que el usuario mismo a ingresado } }
//以下の関数はすべてprivateなので省略します。 void Start() { GM = GameObject.FindGameObjectWithTag("Spawn"); GD = GameObject.Find("Director"); Player = GameObject.Find("RotationManager"); Sound = GameObject.Find("SoundsSE"); SM = GetComponent <SizeManager>(); ClickTime = 0.0f; KeepFlg = false; LatencyTime = 0.0f; sndCnt = 0; AnimeCnt = 0; }
protected void DeleteData(int ID) { try { if (SizeManager.Delete(ID)) { lblMessage.Text = "Đã xóa kích thước cỡ"; EditPanel.Enabled = false; BindData(); vID = null; } else { this.lblMessage.Text = SizeManager.ErrorMessage; } } catch (Exception ex) { lblMessage.Text = ex.Message; } }
// Use this for initialization void Start() { abilityObjectConstructor = Comp <AbilityObjectConstructor> .GetOrAdd(gameObject); // calculate scaling if (scalingProperty != Tags.Properties.None) { CreationReferences references = GetComponent <CreationReferences>(); if (references && references.creator) { BaseStats stats = references.creator.GetComponent <BaseStats>(); if (stats) { float scaler = stats.GetStatValue(scalingProperty); if (scaler != 0) { interval /= scaler; } } } } // get creator components if necessery if (castFromCreatorCastPoint || castAtCreatorTargetLocation) { CreationReferences references = GetComponent <CreationReferences>(); if (references && references.creator) { if (castFromCreatorCastPoint) { creatorSizeManager = references.creator.GetComponent <SizeManager>(); } if (castAtCreatorTargetLocation) { creatorUsingAbility = references.creator.GetComponent <UsingAbility>(); } } } }
public Control GetControl(IPluginInterface pluginInterface) { #pragma warning disable CA2000 var checkButton = new Button { Text = T._("Gespeicherte Fenstergrößen löschen") }; #pragma warning restore CA2000 var stack = new StackLayout(checkButton) { Padding = new Padding(10), Orientation = Orientation.Vertical, Spacing = 5 }; checkButton.Click += (s, e) => { SizeManager.Reset(); MessageBox.Show(T._("Die Änderungen werden beim nächsten Programmstart angewendet!"), "FPLedit"); }; return(stack); }
// GET: Home public ActionResult Index() { CategoriesManager cm = new CategoriesManager(); ProductsManager pm = new ProductsManager(); BrandsManager bm = new BrandsManager(); ColorManager colm = new ColorManager(); SizeManager sm = new SizeManager(); ProductCategoriesManager pcm = new ProductCategoriesManager(); ProductColorsManager pcolm = new ProductColorsManager(); ProductSizesManager pszm = new ProductSizesManager(); BasketManager basm = new BasketManager(); BasketDetailManager bdm = new BasketDetailManager(); BasketTempManager btm = new BasketTempManager(); ParamManager parm = new ParamManager(); Session["Categories"] = cm.GetAll(); Session["Products"] = pm.GetAll(); Session["Brands"] = bm.GetAll(); Session["Colors"] = colm.GetAll(); Session["Sizes"] = sm.GetAll(); Session["ProductCategories"] = pcm.GetAll(); Session["ProductColorsManager"] = pcolm.GetAll(); Session["ProductSizesManager"] = pszm.GetAll(); Session["Basket"] = basm.GetAll(); Session["BasketDetail"] = bdm.GetAll(); Session["BasketTemp"] = btm.GetAll(); Session["Param"] = parm.GetAll(); baskettlist = btm.GetAll();; ViewBag.Login = "******"; ViewBag.Logout = "Logout"; return(View()); }
public ActionResult Eliminar(int id) { //un objeto categorua para que el objeto no quede nulo _ = new SizeManager().Delete(id); return(RedirectToAction("index")); }
void initialise() { initialised = true; // make sure there is a parent if (transform.parent == null) { return; } if (parent == null) { parent = transform.parent.gameObject; } if (parent == null) { Debug.LogError("BuffParent component has no parent"); return; } // find the parent's protection class parentProtection = parent.gameObject.GetComponent <ProtectionClass>(); if (parentProtection) { if (ward != 0) { parentProtection.GainWard(ward); } if (wardPercentage != 0 && parent.GetComponent <BaseHealth>()) { parentProtection.GainWard((wardPercentage * parent.GetComponent <BaseHealth>().maxHealth)); } } if (increasedSize != 0) { SizeManager sizeManager = parent.GetComponent <SizeManager>(); if (sizeManager) { sizeManager.increaseSize(increasedSize); } } // find the parent's base health if (lifeRegen != 0) { parentHealth = parent.GetComponent <BaseHealth>(); parentHealth.addedHealthRegenPerSecond += lifeRegen; } // find the parent's base mana if (manaCostDivider != 0) { parentMana = parent.GetComponent <BaseMana>(); parentMana.addedManaCostDivider += manaCostDivider; } // find the parent's demo ward regen if (wardRegen != 0) { parentProtection.wardRegen += wardRegen; } // find the parent's base stats if (speed != 0) { parentBaseStats = parent.GetComponent <BaseStats>(); if (parentBaseStats != null) { parentBaseStats.ChangeStatModifier(Tags.Properties.Movespeed, speed, BaseStats.ModType.ADDED); } } // find the parent's speed manager if (percentageSpeed != 0) { if (!parentBaseStats) { parentBaseStats = parent.GetComponent <BaseStats>(); } parentSpeedManager = parent.GetComponent <SpeedManager>(); if (parentSpeedManager != null && parentBaseStats != null) { parentBaseStats.ChangeStatModifier(Tags.Properties.Movespeed, percentageSpeed, BaseStats.ModType.INCREASED); } } if (reducedStunDuration != 0) { parentStunnedState = parent.gameObject.GetComponent <Stunned>(); if (parentStunnedState != null) { parentStunnedState.baseStunDuration -= reducedStunDuration; } } // apply taggedStats parentBaseStats = parent.GetComponent <BaseStats>(); if (parentBaseStats) { foreach (TaggedStatsHolder.TaggableStat stat in taggedStats) { parentBaseStats.ChangeStatModifier(stat.property, stat.addedValue, BaseStats.ModType.ADDED, stat.tagList); parentBaseStats.ChangeStatModifier(stat.property, stat.increasedValue, BaseStats.ModType.INCREASED, stat.tagList); foreach (float value in stat.moreValues) { parentBaseStats.ChangeStatModifier(stat.property, value, BaseStats.ModType.MORE, stat.tagList); } foreach (float value in stat.quotientValues) { parentBaseStats.ChangeStatModifier(stat.property, value, BaseStats.ModType.QUOTIENT, stat.tagList); } } parentBaseStats.UpdateStats(); } // update protection totals if (parentProtection) { parentProtection.UpdateProtectionTotals(); } // subscribe to a death event to remove the buffs if (GetComponent <SelfDestroyer>()) { GetComponent <SelfDestroyer>().deathEvent += removeBuffs; } }
public SizeController() { mgr = new SizeManager(); }
// GET: Admin/Size public ActionResult Index() { var data = new SizeManager().GetAll(true); return(View(data)); }
void removeBuffs() { if (buffsRemoved) { return; } if (!initialised) { return; } buffsRemoved = true; if (parentProtection) { parentProtection.wardRegen -= wardRegen; } if (increasedSize != 0 && parent) { SizeManager sizeManager = parent.GetComponent <SizeManager>(); if (sizeManager) { sizeManager.increaseSize(-increasedSize); } } if (parentHealth && lifeRegen != 0) { parentHealth.addedHealthRegenPerSecond -= lifeRegen; } if (parentMana && manaCostDivider != 0) { parentMana.addedManaCostDivider -= manaCostDivider; } if (parentBaseStats != null) { parentBaseStats.ChangeStatModifier(Tags.Properties.Movespeed, -speed, BaseStats.ModType.ADDED); if (parentSpeedManager != null) { parentBaseStats.ChangeStatModifier(Tags.Properties.Movespeed, -percentageSpeed, BaseStats.ModType.INCREASED); } } if (parentStunnedState != null) { parentStunnedState.baseStunDuration += reducedStunDuration; } // remove taggedStats if (parentBaseStats) { foreach (TaggedStatsHolder.TaggableStat stat in taggedStats) { parentBaseStats.ChangeStatModifier(stat.property, -stat.addedValue, BaseStats.ModType.ADDED, stat.tagList); parentBaseStats.ChangeStatModifier(stat.property, -stat.increasedValue, BaseStats.ModType.INCREASED, stat.tagList); foreach (float value in stat.moreValues) { parentBaseStats.ChangeStatModifier(stat.property, value, BaseStats.ModType.QUOTIENT, stat.tagList); } foreach (float value in stat.quotientValues) { parentBaseStats.ChangeStatModifier(stat.property, value, BaseStats.ModType.MORE, stat.tagList); } } parentBaseStats.UpdateStats(); } }
public SizeTest() { sm = new SizeManager(); }
void Start() { Debug.Log(transform.name); sm = gameObject.transform.parent.GetComponent <SizeManager>(); }