Beispiel #1
0
 public override void Update()
 {
     if (!string.IsNullOrEmpty(Url) && IsClicked)
     {
         WebBrowserManager.LaunchBrowser(Url);
     }
 }
 public override void Update()
 {
     UpdateControls();
     if (m_okButton.IsClicked)
     {
         string[] lines = new string[4]
         {
             m_textBox1.Text,
             m_textBox2.Text,
             m_textBox3.Text,
             m_textBox4.Text
         };
         Color[] colors = new Color[4]
         {
             m_colorButton1.Color,
             m_colorButton2.Color,
             m_colorButton3.Color,
             m_colorButton4.Color
         };
         m_subsystemSignBlockBehavior.SetSignData(m_signPoint, lines, colors, m_urlTextBox.Text);
         Dismiss();
     }
     if (m_urlButton.IsClicked)
     {
         m_urlPage.IsVisible   = true;
         m_linesPage.IsVisible = false;
     }
     if (m_linesButton.IsClicked)
     {
         m_urlPage.IsVisible   = false;
         m_linesPage.IsVisible = true;
     }
     if (m_urlTestButton.IsClicked)
     {
         WebBrowserManager.LaunchBrowser(m_urlTextBox.Text);
     }
     if (m_colorButton1.IsClicked)
     {
         m_colorButton1.Color = m_colors[(m_colors.FirstIndex(m_colorButton1.Color) + 1) % m_colors.Length];
     }
     if (m_colorButton2.IsClicked)
     {
         m_colorButton2.Color = m_colors[(m_colors.FirstIndex(m_colorButton2.Color) + 1) % m_colors.Length];
     }
     if (m_colorButton3.IsClicked)
     {
         m_colorButton3.Color = m_colors[(m_colors.FirstIndex(m_colorButton3.Color) + 1) % m_colors.Length];
     }
     if (m_colorButton4.IsClicked)
     {
         m_colorButton4.Color = m_colors[(m_colors.FirstIndex(m_colorButton4.Color) + 1) % m_colors.Length];
     }
     if (base.Input.Cancel || m_cancelButton.IsClicked)
     {
         Dismiss();
     }
 }
 public void LoginLaunchBrowser()
 {
     try
     {
         m_loginProcessData.IsTokenFlow = true;
         Dictionary <string, string> dictionary = new Dictionary <string, string>();
         dictionary.Add("response_type", "token");
         dictionary.Add("client_id", "1unnzwkb8igx70k");
         dictionary.Add("redirect_uri", "com.candyrufusgames.survivalcraft2://redirect");
         WebBrowserManager.LaunchBrowser("https://www.dropbox.com/oauth2/authorize?" + WebManager.UrlParametersToString(dictionary));
     }
     catch (Exception error)
     {
         m_loginProcessData.Fail(this, error);
     }
 }
Beispiel #4
0
 public override void Update()
 {
     if (btna.IsClicked)
     {
         Dictionary <string, string> par = new Dictionary <string, string>();
         par.Add("user", txa.Text);
         par.Add("pass", txb.Text);
         WebManager.Post(SPMBoxExternalContentProvider.m_redirectUri + "/com/api/login", par, null, new MemoryStream(), new CancellableProgress(), succ, fail);
     }
     if (btnb.IsClicked)
     {
         WebBrowserManager.LaunchBrowser(SPMBoxExternalContentProvider.m_redirectUri + "/com/reg");
     }
     if (btnc.IsClicked)
     {
         DialogsManager.HideDialog(this);
     }
 }
Beispiel #5
0
        public override bool OnInteract(TerrainRaycastResult raycastResult, ComponentMiner componentMiner)
        {
            AudioManager.PlaySound("Audio/UI/ButtonClick", 1f, 0f, 0f);
            Point3 point = new Point3(raycastResult.CellFace.X, raycastResult.CellFace.Y, raycastResult.CellFace.Z);

            if (m_subsystemGameInfo.WorldSettings.GameMode == GameMode.Adventure)
            {
                SignData signData = GetSignData(point);
                if (signData != null && !string.IsNullOrEmpty(signData.Url))
                {
                    WebBrowserManager.LaunchBrowser(signData.Url);
                }
            }
            else if (componentMiner.ComponentPlayer != null)
            {
                DialogsManager.ShowDialog(componentMiner.ComponentPlayer.GuiWidget, new EditSignDialog(this, point));
            }
            return(true);
        }
 public static void ShowMarketplace()
 {
     AnalyticsManager.LogEvent("[MarketplaceManager] Show marketplace");
     WebBrowserManager.LaunchBrowser("http://play.google.com/store/apps/details?id=com.candyrufusgames.survivalcraft2");
 }