예제 #1
0
 private async void UserControl_Loaded(object sender, RoutedEventArgs e)
 {
     try
     {
         var client = new WebClient();
         AboutText.Text = Encoding.UTF8.GetString(await client.DownloadDataTaskAsync(new Uri($"{Constants.Website}BaronReplays/About.html")));
     }
     catch (Exception)
     {
     }
     AboutText.Focus();
 }
예제 #2
0
        void ReleaseDesignerOutlets()
        {
            if (AboutText != null)
            {
                AboutText.Dispose();
                AboutText = null;
            }

            if (MainView != null)
            {
                MainView.Dispose();
                MainView = null;
            }
        }
        public IActionResult PutAboutText(int id, AboutText aboutText)
        {
            if (id != aboutText.Id)
            {
                return(BadRequest());
            }

            if (!AboutTextExists(id))
            {
                return(NotFound());
            }

            _repository.Update(aboutText);
            return(NoContent());
        }
예제 #4
0
        private void SetupConstraints()
        {
            ContentView.SubviewsDoNotTranslateAutoresizingMaskIntoConstraints();

            ContentView.AddConstraints(
                _headerContainer.AtTopOf(ContentView),
                _headerContainer.AtLeftOf(ContentView),
                _headerContainer.AtRightOf(ContentView),

                _header.AtTopOf(_headerContainer),
                _header.AtLeftOf(_headerContainer),
                _header.AtRightOf(_headerContainer),
                _header.Height().EqualTo(280),

                _logoShadowView.WithSameCenterY(_logo),
                _logoShadowView.WithSameCenterX(_logo),
                _logoShadowView.Height().EqualTo(110),
                _logoShadowView.Width().EqualTo(110),

                _logo.WithSameBottom(_header).Plus(34),
                _logo.WithSameCenterX(_header),
                _logo.Height().EqualTo(112),
                _logo.Width().EqualTo(112),

                Name.Below(_logo, 23),
                Name.WithSameCenterX(_headerContainer),

                Industry.WithSameCenterX(_headerContainer),
                Industry.Below(Name, 6),

                _headerBottomRuler.Below(_header, 140),
                _headerBottomRuler.AtBottomOf(_headerContainer),
                _headerBottomRuler.AtLeftOf(_headerContainer),
                _headerBottomRuler.AtRightOf(_headerContainer),
                _headerBottomRuler.Height().EqualTo(1),

                _aboutContainer.Below(_headerContainer, 5),
                _aboutContainer.AtLeftOf(ContentView),
                _aboutContainer.AtRightOf(ContentView),
                _aboutContainer.AtBottomOf(ContentView, 5),

                _aboutTopRuler.AtTopOf(_aboutContainer),
                _aboutTopRuler.AtLeftOf(_aboutContainer),
                _aboutTopRuler.AtRightOf(_aboutContainer),
                _aboutTopRuler.Height().EqualTo(1),

                AboutTitle.Below(_aboutTopRuler, 10),
                AboutTitle.AtLeftOf(_aboutContainer, 14),
                AboutTitle.AtRightOf(_aboutContainer, 14),

                AboutText.Below(AboutTitle, 10),
                AboutText.WithSameLeft(AboutTitle),
                AboutText.WithSameRight(AboutTitle),

                ContactTitle.Below(AboutText, 10),
                ContactTitle.WithSameLeft(AboutText),
                ContactTitle.WithSameRight(AboutText),

                _telephoneImage.Below(ContactTitle, 10),
                _telephoneImage.Height().EqualTo(15),
                _telephoneImage.Width().EqualTo(15),
                _telephoneImage.WithSameLeft(ContactTitle),

                Telephone.ToRightOf(_telephoneImage, 10),
                Telephone.WithSameCenterY(_telephoneImage),
                Telephone.WithSameRight(AboutText),

                _locationImage.Below(_telephoneImage, 10),
                _locationImage.Height().EqualTo(15),
                _locationImage.Width().EqualTo(15),
                _locationImage.WithSameLeft(ContactTitle),

                SpaceLocation.ToRightOf(_locationImage, 10),
                SpaceLocation.WithSameCenterY(_locationImage),
                SpaceLocation.WithSameRight(AboutText),

                _websiteImage.Below(_locationImage, 10),
                _websiteImage.Height().EqualTo(15),
                _websiteImage.Width().EqualTo(15),
                _websiteImage.WithSameLeft(ContactTitle),

                Website.ToRightOf(_websiteImage, 10),
                Website.WithSameCenterY(_websiteImage),
                Website.WithSameRight(AboutText),

                //_facebook.Height().EqualTo(25),
                //_facebook.Width().EqualTo(25),
                //_facebook.AtLeftOf(_socialContainer),

                //_twitter.ToRightOf(_facebook, 5),
                //_twitter.WithSameWidth(_facebook),
                //_twitter.WithSameHeight(_facebook),
                //_twitter.WithSameCenterY(_facebook),

                //_linkedIn.ToRightOf(_twitter, 5),
                //_linkedIn.WithSameWidth(_facebook),
                //_linkedIn.WithSameHeight(_facebook),
                //_linkedIn.WithSameCenterY(_facebook),

                //_instagram.ToRightOf(_linkedIn, 5),
                //_instagram.WithSameWidth(_facebook),
                //_instagram.WithSameHeight(_facebook),
                //_instagram.WithSameCenterY(_facebook),
                //_instagram.AtRightOf(_socialContainer),

                //_socialContainer.WithSameCenterX(ContentView),

                _aboutBottomRuler.Below(Website, 15),
                _aboutBottomRuler.AtBottomOf(_aboutContainer),
                _aboutBottomRuler.AtLeftOf(_aboutContainer),
                _aboutBottomRuler.AtRightOf(_aboutContainer),
                _aboutBottomRuler.Height().EqualTo(1)
                );
        }
        public async Task <ActionResult <AboutText> > PostAboutText(AboutText aboutText)
        {
            await _repository.Insert(aboutText);

            return(CreatedAtAction("GetAboutText", new { id = aboutText.Id }, aboutText));
        }