void OnEquipmentChanged(Equipment newItem, Equipment oldItem) { if (newItem != null) { HP.AddModifier(newItem.HP); SP.AddModifier(newItem.SP); MIN_ATT.AddModifier(newItem.MIN_ATT); MAX_ATT.AddModifier(newItem.MAX_ATT); CRI_RATE.AddModifier(newItem.CRI_RATE); DEF.AddModifier(newItem.DEF); ATT_SPD.AddModifier(newItem.ATT_SPD); MOV_SPD.AddModifier(newItem.MOV_SPD); STR.AddModifier(newItem.STR); ACC.AddModifier(newItem.ACC); SPR.AddModifier(newItem.SPR); CON.AddModifier(newItem.CON); AGI.AddModifier(newItem.CON); CalculateMaxHP(); CalculateMaxSP(); CalculateCurrentDMG(); CalculateCurrentCRI_RATE(); CalculateCurrentDEF(); CalculateCurrentATT_SPD(); CalculateCurrentMOV_SPD(); } if (oldItem != null) { HP.RemoveModifier(oldItem.HP); SP.RemoveModifier(oldItem.SP); MIN_ATT.RemoveModifier(oldItem.MIN_ATT); MAX_ATT.RemoveModifier(oldItem.MAX_ATT); CRI_RATE.RemoveModifier(oldItem.CRI_RATE); DEF.RemoveModifier(oldItem.DEF); ATT_SPD.RemoveModifier(oldItem.ATT_SPD); MOV_SPD.RemoveModifier(oldItem.MOV_SPD); STR.RemoveModifier(oldItem.STR); ACC.RemoveModifier(oldItem.ACC); SPR.RemoveModifier(oldItem.SPR); CON.RemoveModifier(oldItem.CON); AGI.RemoveModifier(oldItem.CON); CalculateMaxHP(); CalculateMaxSP(); CalculateCurrentDMG(); CalculateCurrentCRI_RATE(); CalculateCurrentDEF(); CalculateCurrentATT_SPD(); CalculateCurrentMOV_SPD(); } }
public override string ToString() { a = (AGI)base.Tag; Binding myBinding = new Binding("command"); myBinding.Mode = BindingMode.TwoWay; myBinding.Source = a; txtcom.SetBinding(TextBox.TextProperty, myBinding); Binding descbinding = new Binding("Description"); descbinding.Mode = BindingMode.TwoWay; descbinding.Source = a; txtdesc.SetBinding(TextBox.TextProperty, descbinding); return base.ToString(); }
public override string ToString() { a = (AGI)base.Tag; Binding myBinding = new Binding("command"); myBinding.Mode = BindingMode.TwoWay; myBinding.Source = a; txtcom.SetBinding(TextBox.TextProperty, myBinding); Binding descbinding = new Binding("Description"); descbinding.Mode = BindingMode.TwoWay; descbinding.Source = a; txtdesc.SetBinding(TextBox.TextProperty, descbinding); return(base.ToString()); }
//Geçici Muhasebe Bordrosuna ekleme yapılıyor private void GeciciKayit() { baglantip.Open(); SqlCommand komutp = new SqlCommand("Insert Into GeciciHesap (KimlikNo, SaatUcreti, DersSaati, SGKGun, AylikTutar, SGKDevlet, Tahakkuk, SGKKesMatrah, SGKKisi, YVergiMatrah, AVergiMatrah, GelirVergi, DamgaVergi, Icra, Nafaka, ToplamKesinti, AGI, NetTutar) Values ('" + KimlikNo.ToString() + "', '" + SaatUcreti.ToString() + "', '" + DersSaati.ToString() + "', '" + SGKGun.ToString() + "', '" + AylikTutar.ToString() + "', '" + SGKDevlet.ToString() + "', '" + Tahakkuk.ToString() + "', '" + SGKKesMatrah.ToString() + "', '" + SGKKisi.ToString() + "', '" + YVergiMatrah.ToString() + "', '" + AVergiMatrah.ToString() + "', '" + GelirVergi.ToString() + "', '" + DamgaVergi.ToString() + "', '" + Icra.ToString() + "', '" + Nafaka.ToString() + "', '" + ToplamKesinti.ToString() + "', '" + AGI.ToString() + "', '" + NetTutar.ToString() + "')", baglantip); komutp.ExecuteNonQuery(); baglantip.Close(); }
static void context_Committed(object sender, AGI.Foundation.Infrastructure.Threading.TransactionCommittedEventArgs e) { //Get the enumerator for the CommittedEventArgs and move to a defined value IEnumerator<TransactedObject> o = e.CommittedObjects.GetEnumerator(); o.MoveNext(); o.MoveNext(); ExampleEntity entity = o.Current.Owner as ExampleEntity; try { EntityPlatform platform = m_platforms[entity.EntityIdentifier]; //Position, Cartesian string transProp5 = entity.Position.ToString(); string[] xyz = transProp5.Split(','); Cartesian position = new Cartesian(Convert.ToDouble(xyz[0]), Convert.ToDouble(xyz[1]), Convert.ToDouble(xyz[2])); platform.Platform.LocationPoint = new PointCartographic(m_earth, m_earth.Shape.CartesianToCartographic(position)); foreach (var kvp in _outputs.ToArray()) { StreamWriter responseStreamWriter = kvp.Value; try { responseStreamWriter.WriteLine("data:" + platform.GetCzml() + "\n"); responseStreamWriter.Flush(); } catch { } } } catch { } }