예제 #1
0
        public override async void LoadViewData ()
        {
            ShowBusyBox();
            try
            {
                var rv = await Task.Run(() => mFuwuqiService.GetFuwuqis());
                foreach (var item in rv)
                {
                    var fuwuqu = new UIFuwuqi()
                    {
                        ID = item.ID,
                        IsEnableNow = false ,
                        Url = item.Url,
                        IsOpenning = item.IsOpenning
                    };
                    Servers.Add(fuwuqu);
                     

                }
                CheckFuwuqis();
            } catch(Exception e)
            {
               e.Show();
            }
             
            CloseBusyBox();
        }
예제 #2
0
 private async Task  CheckFuwuqi (UIFuwuqi server)
 {
      try
         {
             //var rv = await mFuwuqiService.FuwuqiCheck(server.Url);
             //server.IsEnableNow = rv.IsEnable;
         }
         catch (Exception)
         {
             server.IsEnableNow = false;
         }
 }
예제 #3
0
        private async void AddServer () {  
            ShowBusyBox();
                    try
                    {
                        var rv = await Task.Run(()=>mFuwuqiService.AddFuwuqi(WorkForm.Url, WorkForm.IsOpenning));
                        var fuwuqu =
                            new UIFuwuqi()
                            {
                                IsEnableNow = false,
                                IsOpenning = WorkForm.IsOpenning,
                                Url = WorkForm.Url,
                                ID = rv
                            };
                        Servers.Add(fuwuqu);
                        CheckFuwuqi(fuwuqu);

                    }
                    catch (Exception e)
                    {
                        e.Show();
                    }

                    CloseBusyBox();}