public async void GetProfile()
        {
            await PopupNavigation.PushAsync(new Indicator());

            try
            {
                await ApiServices.GetChurchProfile(App.AppKey);

                try
                {
                    var res = Preferences.Get("churchprofile", string.Empty);
                    Profile = JsonConvert.DeserializeObject <ChurchProfile>(res);
                }
                catch (Exception)
                {
                }
                //if (Connectivity.NetworkAccess == NetworkAccess.Internet && string.IsNullOrEmpty(res))
                //{
                //    await ApiServices.GetChurchProfile(Preferences.Get("tenantId", string.Empty));
                //    return;
                //}

                ChurchName = Profile.churchName;
                Logo       = Profile.logo;
                Email      = Profile.email;
                Phone      = Profile.phoneNumber;
                Address    = Profile.address;

                foreach (var item in Profile.abouts.OrderBy(r => r.order))
                {
                    About.Add(item);
                }

                foreach (var item in Profile.pastors)
                {
                    Pastors.Add(item);
                }

                foreach (var item in Profile.banks)
                {
                    Banks.Add(item);
                }

                await PopupNavigation.PopAsync();
            }
            catch (Exception ex)
            {
                await PopupNavigation.PopAsync();

                MessageDialog.Show("Error!", "Error occured ", "Cancel");
            }
        }
Esempio n. 2
0
 public ActionResult PublishAbout()
 {
     var address = Request["address"];
     var phone = Request["phone"];
     var fax = Request["fax"];
     var descript = Request["descript"];
     var content = Request["content"];
     sd_about About = new sd_about();
     if (address != null)
     {
         About.address = address.ToString();
     }
     if (phone != null)
     {
         About.phone = phone.ToString();
     }
     if (fax != null)
     {
         About.fax = fax.ToString();
     }
     if (descript != null)
     {
         About.shortDesc = descript.ToString().Replace("&lt;", "<").Replace("&gt;", ">"); ;
     }
     if (content != null)
     {
         About.content = content.ToString().Replace("&lt;", "<").Replace("&gt;", ">"); ;
     }
     About.id = Guid.NewGuid();
     JsonData data = new JsonData();
     About bll = new About();
     var model = bll.Add(About);
     data.Success = (model != null ? true : false);
     data.Message = "新闻添加成功";
     return Json(data);
 }
Esempio n. 3
0
        public static void Loading(EventArgs arg)
        {
            if (Player.Instance.Hero != Champion.Leblanc)
            {
                return;
            }

            Settings.Load();
            Damage = new DamageIndicator();
            Updated();

            Game.OnTick += delegate
            {
                if (!W.IsReady())
                {
                    if (GetState(SpellSlot.W) == State.WReturn)
                    {
                        return;
                    }

                    var Remove = About.FirstOrDefault(x => x.NetworkID == Player.Instance.NetworkId && x.IsRW == false);

                    if (Remove != null)
                    {
                        About.Remove(Remove);
                    }
                }

                if (!R.IsReady())
                {
                    if (GetState(SpellSlot.R) == State.RWReturn)
                    {
                        return;
                    }

                    var Remove = About.FirstOrDefault(x => x.NetworkID == Player.Instance.NetworkId && x.IsRW == true);

                    if (Remove != null)
                    {
                        About.Remove(Remove);
                    }
                }

                if (Keybind(Settings.Harass, "Key"))
                {
                    Modes.Harass.Load();
                }

                if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
                {
                    Modes.Combo.Load();

                    if (CheckBox(Settings.Combo, "W1"))
                    {
                        Logic.Return();
                    }
                }

                if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear))
                {
                    Modes.Lane.Load();
                }

                if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear))
                {
                    Modes.Jungle.Load();
                }
            };

            Obj_AI_Base.OnProcessSpellCast += delegate(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
            {
                if (sender.IsMe)
                {
                    if (args.SData.Name == "LeblancW")
                    {
                        About.Add(new Base
                        {
                            Pos       = args.Start,
                            IsRW      = false,
                            NetworkID = sender.NetworkId
                        });
                    }

                    if (args.SData.Name == "LeblancRW")
                    {
                        About.Add(new Base
                        {
                            Pos       = args.Start,
                            IsRW      = true,
                            NetworkID = sender.NetworkId
                        });
                    }
                }
            };

            Gapcloser.OnGapcloser += delegate(AIHeroClient sender, Gapcloser.GapcloserEventArgs e)
            {
                if (sender.IsEnemy && sender != null)
                {
                    if (E.IsReady() && CheckBox(Settings.Misc, "Gap"))
                    {
                        if (sender.IsValidTarget(E.Range))
                        {
                            var Pred = E.GetPrediction(sender);

                            if (Pred.HitChance >= HitChance.High)
                            {
                                E.Cast(Pred.UnitPosition);
                            }
                        }
                    }

                    if (R.IsReady() && CheckBox(Settings.Misc, "Gap2"))
                    {
                        Logic.LR(SpellSlot.E, sender);
                    }
                }
            };

            Interrupter.OnInterruptableSpell += delegate(Obj_AI_Base sender, Interrupter.InterruptableSpellEventArgs e)
            {
                if (sender.IsEnemy && sender != null)
                {
                    if (E.IsReady() && CheckBox(Settings.Misc, "Int"))
                    {
                        if (sender.IsValidTarget(E.Range))
                        {
                            var Pred = E.GetPrediction(sender);

                            if (Pred.HitChance >= HitChance.High)
                            {
                                E.Cast(Pred.UnitPosition);
                            }
                        }
                    }

                    if (R.IsReady() && CheckBox(Settings.Misc, "Int2"))
                    {
                        var s = sender as AIHeroClient;

                        Logic.LR(SpellSlot.E, s);
                    }
                }
            };

            Drawing.OnEndScene += delegate
            {
                foreach (var L in About)
                {
                    if (L.IsRW)
                    {
                        Drawing.DrawCircle(L.Pos, 120, Color.Purple);
                    }

                    Drawing.DrawCircle(L.Pos, 120, Color.DarkOrange);
                }

                if (CheckBox(Settings.Draw, "Q") && Q.IsReady())
                {
                    Q.DrawRange(Color.Purple, 4);
                }

                if (CheckBox(Settings.Draw, "W") && W.IsReady())
                {
                    W.DrawRange(Color.DarkBlue, 4);
                }

                if (CheckBox(Settings.Draw, "E") && E.IsReady())
                {
                    E.DrawRange(Color.DarkBlue, 4);
                }
            };
        }