private void Send_Click(object sender, EventArgs e) { if (String.IsNullOrEmpty(lblContent.Text)) { MessageBox.Show("据说要智商超过250才能看到您写的字?", ">_<", MessageBoxButton.OK); return; } if (blessHelper == null) blessHelper = new BlessHelper(); blessHelper.PostBlessItem(lblName.Text, lblContent.Text, (suc) => { if (suc) { Deployment.Current.Dispatcher.BeginInvoke(() => { MessageBox.Show("发送成功", "^_^", MessageBoxButton.OK); NavigationService.GoBack(); }); } else { Deployment.Current.Dispatcher.BeginInvoke(() => { MessageBox.Show("发送失败,请保持网络连接通畅", ">_<", MessageBoxButton.OK); }); } }); }
private void BlessingPage_Loaded(object sender, RoutedEventArgs e) { ArrowFadeIn.Begin(); blessHelper = new BlessHelper(); listItems = blessHelper.GetCachedBlessItem(); if (listItems == null || listItems.Count == 0) GotoNextPage(); blessHelper.GetBlessImages((List<WriteableBitmap> map) => { listBitmap = map; if (map == null || map.Count == 0) GotoNextPage(); InitTimer(); Timer_Tick(null, null); }); BlessHelper helper = new BlessHelper(); helper.CacheBlessImages(); helper.CacheBlessItem(); }
void LabBlessePage_Loaded(object sender, RoutedEventArgs e) { Microsoft.Phone.Shell.SystemTray.ProgressIndicator = new Microsoft.Phone.Shell.ProgressIndicator(); m_progressIndicatorHelper = new ProgressIndicatorHelper(Microsoft.Phone.Shell.SystemTray.ProgressIndicator, () => { String firstLoad = PreferenceHelper.GetPreference("Global_FirstLoadBlessList"); if (String.IsNullOrEmpty(firstLoad)) { Deployment.Current.Dispatcher.BeginInvoke(() => { PreferenceHelper.SetPreference("Global_FirstLoadBlessList", "WhatEver"); MessageBox.Show("发表在心语墙上的内容,写得比较好的会显示在软件启动页上哦~", "^_^", MessageBoxButton.OK); }); } }); if (blessHelper == null) blessHelper = new BlessHelper(); m_progressIndicatorHelper.PushTask(); blessHelper.FetchBlessItem(25, false, (list) => { Deployment.Current.Dispatcher.BeginInvoke(() => { Items.Clear(); if (list != null) { int i = 0; foreach (BlessItem item in list) { item.index = i++; Items.Add(item); } } m_progressIndicatorHelper.PopTask(); }); }); }
public void Target(Mobile m) { if (!Caster.CanSee(m)) { Caster.SendLocalizedMessage(500237); // Target can not be seen. } else if (CheckBSequence(m)) { if (Caster is TeiravonMobile && (((TeiravonMobile)Caster).IsCleric() || ((TeiravonMobile)Caster).IsDarkCleric() || ((TeiravonMobile)Caster).IsStrider() || ((TeiravonMobile)Caster).IsPaladin()) && ((TeiravonMobile)Caster).Faith != TeiravonMobile.Deity.None) { TeiravonMobile Cleric = Caster as TeiravonMobile; SpellHelper.Turn(Caster, m); switch (Cleric.Faith) { case TeiravonMobile.Deity.Adalia: { if (!adalia.Contains(m)) { adalia.Add(m, DateTime.Now); } if (m_Timer != null) { m_Timer.Stop(); } m_Timer = new BlessHelper(m, adalia); m_Timer.Start(); m.FixedParticles(0x375A, 10, 15, 5018, EffectLayer.Waist); m.PlaySound(0x30C); m.PlaySound(0x5CB); } break; case TeiravonMobile.Deity.Cultist: { SpellHelper.AddStatBonus(Caster, m, StatType.Str); SpellHelper.DisableSkillCheck = true; SpellHelper.AddStatBonus(Caster, m, StatType.Dex); SpellHelper.AddStatBonus(Caster, m, StatType.Int); SpellHelper.DisableSkillCheck = false; int mod = SpellHelper.GetOffset(Caster, m, StatType.Str, false); TimeSpan duration = SpellHelper.GetDuration(Caster, m); if (m is TeiravonMobile) { TeiravonMobile tav = m as TeiravonMobile; tav.HitsMod = mod; BlessTimer timer = new BlessTimer(Caster, (TeiravonMobile)m, duration, mod); timer.Start(); } m.FixedParticles(0x373A, 10, 15, 5018, EffectLayer.Waist); m.PlaySound(0x1EA); Caster.Damage(Utility.Random(6)); } break; case TeiravonMobile.Deity.Gruumsh: { if (!gruumsh.Contains(m)) { gruumsh.Add(m, DateTime.Now); } if (m_Timer != null) { m_Timer.Stop(); } m_Timer = new BlessHelper(m, gruumsh); m_Timer.Start(); m.FixedParticles(0x375A, 10, 15, 5018, 157, 4, EffectLayer.Waist); BleedAttack.BeginBleed(m, m); m.PlaySound(0x50F); m.PlaySound(0x02B); } break; case TeiravonMobile.Deity.Kamalini: { if (!kamalini.Contains(m)) { kamalini.Add(m, DateTime.Now); } if (m_Timer != null) { m_Timer.Stop(); } m_Timer = new BlessHelper(m, kamalini); m_Timer.Start(); m.FixedParticles(0x375A, 10, 15, 5018, 157, 4, EffectLayer.Waist); m.PlaySound(0x4B7); } break; case TeiravonMobile.Deity.Kinarugi: { if (!kinarugi.Contains(m)) { kinarugi.Add(m, DateTime.Now); } if (m_Timer != null) { m_Timer.Stop(); } m_Timer = new BlessHelper(m, kinarugi); m_Timer.Start(); m.FixedParticles(0x36FE, 10, 15, 5018, 2020, 4, EffectLayer.Waist); m.PlaySound(0x09F); m.PlaySound(0x5C4); } break; case TeiravonMobile.Deity.Lloth: { if (m is TeiravonMobile) { if (!lloth.Contains(m)) { lloth.Add(m, DateTime.Now); } if (m_Timer != null) { m_Timer.Stop(); } m_Timer = new BlessHelper(m, lloth); m_Timer.Start(); Effects.SendLocationParticles(EffectItem.Create(m.Location, m.Map, EffectItem.DefaultDuration), 0x3728, 1, 13, 2869, 1, 5023, 0); m.PlaySound(0x381); m.PlaySound(0x4B0); } else { Caster.SendMessage("You are unable to bless this target."); } } break; case TeiravonMobile.Deity.Narindun: { if (!narindun.Contains(m)) { narindun.Add(m, DateTime.Now); } if (m_Timer != null) { m_Timer.Stop(); } m_Timer = new BlessHelper(m, narindun); m_Timer.Start(); m.FixedParticles(0x3789, 1, 40, 0x3F, 906, 3, EffectLayer.Waist); m.PlaySound(0x029); m.PlaySound(0x5C6); } break; case TeiravonMobile.Deity.Occido: { if (!occido.Contains(m)) { occido.Add(m, DateTime.Now); } if (m_Timer != null) { m_Timer.Stop(); } m_Timer = new BlessHelper(m, occido); m_Timer.Start(); m.FixedParticles(0x3728, 1, 40, 0x3F, 0, 3, EffectLayer.Waist); m.PlaySound(0x5C8); } break; case TeiravonMobile.Deity.Saerin: { if (!saerin.Contains(m)) { saerin.Add(m, DateTime.Now); } if (m_Timer != null) { m_Timer.Stop(); } m_Timer = new BlessHelper(m, saerin); m_Timer.Start(); m.FixedParticles(0x36FE, 10, 15, 5018, 2020, 4, EffectLayer.Waist); m.PlaySound(0x100); m.PlaySound(0x5BE); } break; case TeiravonMobile.Deity.Talathas: { if (!talathas.Contains(m)) { talathas.Add(m, DateTime.Now); } if (m_Timer != null) { m_Timer.Stop(); } m_Timer = new BlessHelper(m, talathas); m_Timer.Start(); m.FixedParticles(0x36FE, 10, 15, 5018, 2020, 4, EffectLayer.Waist); m.PlaySound(0x100); m.PlaySound(0x5C4); } break; case TeiravonMobile.Deity.Valar: { if (!valar.Contains(m)) { valar.Add(m, DateTime.Now); } if (m_Timer != null) { m_Timer.Stop(); } m_Timer = new BlessHelper(m, valar); m_Timer.Start(); m.FixedParticles(0x36FE, 10, 15, 5018, 2020, 4, EffectLayer.Waist); m.PlaySound(0x100); m.PlaySound(0x5C4); } break; case TeiravonMobile.Deity.Jareth: { if (m is TeiravonMobile) { TeiravonMobile tav = m as TeiravonMobile; if (!tav.IsGoblin()) { Caster.SendMessage("The Goblin King would never bless that!"); return; } if (!jareth.Contains(m)) { jareth.Add(m, DateTime.Now); } if (m_Timer != null) { m_Timer.Stop(); } m_Timer = new BlessHelper(m, jareth); m_Timer.Start(); m.FixedParticles(0x2D92, 10, 15, 5018, 2829, 4, EffectLayer.Waist); m.PlaySound(0x547); } else { Caster.SendMessage("The Goblin King would never bless that!"); } } break; } } else { SpellHelper.AddStatBonus(Caster, m, StatType.Str); SpellHelper.DisableSkillCheck = true; SpellHelper.AddStatBonus(Caster, m, StatType.Dex); SpellHelper.AddStatBonus(Caster, m, StatType.Int); SpellHelper.DisableSkillCheck = false; int mod = SpellHelper.GetOffset(Caster, m, StatType.Str, false); TimeSpan duration = SpellHelper.GetDuration(Caster, m); if (m is TeiravonMobile) { TeiravonMobile tav = m as TeiravonMobile; tav.HitsMod = mod; BlessTimer timer = new BlessTimer(Caster, (TeiravonMobile)m, duration, mod); timer.Start(); } m.FixedParticles(0x373A, 10, 15, 5018, EffectLayer.Waist); m.PlaySound(0x1EA); } } FinishSequence(); }