예제 #1
0
        private async Task RefillFields()
        {
            UserDialogs.Instance.ShowLoading("Обновление...");
            await Refresh();

            try { if (ImageList.ContainsKey("weapon1"))
                  {
                      weapon1_frame.Content = new Image()
                      {
                          Source = ImageSource.FromUri(new Uri(ImageList["weapon1"].image)), Rotation = 270, AutomationId = "weapon1", Scale = 1.5
                      };
                  }
            } catch (NullReferenceException) {  } catch (KeyNotFoundException) { weapon1_frame.Content = null; }
            try { if (ImageList.ContainsKey("weapon2"))
                  {
                      weapon2_frame.Content = new Image()
                      {
                          Source = ImageSource.FromUri(new Uri(ImageList["weapon2"].image)), Rotation = 270, AutomationId = "weapon2", Scale = 1.5
                      };
                  }
            } catch (NullReferenceException) {  } catch (KeyNotFoundException) { weapon2_frame.Content = null; }
            try { if (ImageList.ContainsKey("helmet"))
                  {
                      helmet_frame.Content = new Image()
                      {
                          Source = ImageSource.FromUri(new Uri(ImageList["helmet"].image)), Rotation = 270, AutomationId = "helmet", Scale = 1.5
                      };
                  }
            } catch (NullReferenceException) {  } catch (KeyNotFoundException) { helmet_frame.Content = null; }
            try { if (ImageList.ContainsKey("armor"))
                  {
                      armor_frame.Content = new Image()
                      {
                          Source = ImageSource.FromUri(new Uri(ImageList["armor"].image)), Rotation = 270, AutomationId = "armor", Scale = 1.5
                      };
                  }
            } catch (NullReferenceException) {  } catch (KeyNotFoundException) { armor_frame.Content = null; }
            try { if (ImageList.ContainsKey("boots"))
                  {
                      boots_frame.Content = new Image()
                      {
                          Source = ImageSource.FromUri(new Uri(ImageList["boots"].image)), Rotation = 270, AutomationId = "boots", Scale = 1.5
                      };
                  }
            } catch (NullReferenceException) {  } catch (KeyNotFoundException) { boots_frame.Content = null; }
            UserDialogs.Instance.HideLoading();
        }