Ejemplo n.º 1
0
        public SettingsPage()
        {
            InitializeComponent();

            //Display Settings
            UIEntryTitle.Text   = Settings.HostTitle;
            UIEntryURL.Text     = Settings.HostValue;
            UIEntryUserame.Text = Settings.Username;
            //
            UIButtonUpdateHost.Clicked += UpdateSettings;
            UIButtonLogin.Clicked      += LoginAsync;
            UICheckVersion.Clicked     += CheckForUpdates;

            if (UserActions.Isloggedin())
            {
                UILabelLoggedIn.Text            = $"Welcome back, {Settings.Username}";
                UILabelLoggedIn.BackgroundColor = Color.LightGreen;
            }
            else
            {
                UILabelLoggedIn.Text            = $"Not logged in";
                UILabelLoggedIn.BackgroundColor = Color.IndianRed;
            }
            //Adverts
            GroundZer0s.Clicked += async(s, e) => { await Launcher.OpenAsync(new Uri("https://groundzer0s-art.tumblr.com/")); };
        }
Ejemplo n.º 2
0
 public void UIGetWelcomeText()
 {
     if (UserActions.Isloggedin())
     {
         UILabelLoggedIn.Text            = $"Welcome back, {Settings.Username}";
         UILabelLoggedIn.BackgroundColor = Color.LightGreen;
     }
     else
     {
         UILabelLoggedIn.Text            = $"Not logged in";
         UILabelLoggedIn.BackgroundColor = Color.IndianRed;
     }
 }
Ejemplo n.º 3
0
        public MainPage()
        {
            InitializeComponent();

            TitleText.Text          = Settings.HostTitle;
            UIForumBrowse.Clicked  += SearchClicked;
            SearchBox.Completed    += SearchClicked;
            SettingsButton.Clicked += SettingsClicked;
            UIForumButton.Clicked  += ViewForms;


            if (UserActions.Isloggedin())
            {
                UILoggedInStatus.Text         = $"Welcome back, {Settings.Username}";
                UISettingsBar.BackgroundColor = Color.LightGreen;
            }
            else
            {
                UILoggedInStatus.Text         = "log in here -> ";
                UISettingsBar.BackgroundColor = Color.IndianRed;
            }

            Connection.Connect(Settings.HostValue);
        }