Beispiel #1
0
    public void ShowRequiredUpdate(string storeUrl)
    {
        UICustomeDialogueOption option = new UICustomeDialogueOption();

        option.title     = EB.Localizer.GetString("ID_SPARX_APP_UPDATE_TITLE");
        option.body      = EB.Localizer.GetString("ID_SPARX_APP_UPDATE_MESSAGE");
        option.accept    = UICustomeDialogueOption.ButtonGo;
        option.minHeight = UICustomeDialogueOption.ThreeLineHeight;
        if (!string.IsNullOrEmpty(storeUrl))
        {
            EB.Uri    uri = new EB.Uri(storeUrl);
            Hashtable qs  = EB.QueryString.Parse(uri.GetComponent(EB.Uri.Component.Query, string.Empty));
            qs.Add("platform", EB.Sparx.Device.Platform);
            qs.Add("source", EB.Sparx.Device.Source);
            qs.Add("child", EB.Sparx.Device.ChildSource);
            uri.SetComponent(EB.Uri.Component.Query, EB.QueryString.Stringify(qs));

            option.onClick = delegate(eUIDialogueButtons button, UIDialogeOption opt)
            {
                Application.OpenURL(opt.param as string);
            };

            option.param   = uri.ToString();
            option.buttons = eUIDialogueButtons.Accept;
        }
        else
        {
            option.buttons = eUIDialogueButtons.None;
        }

        UIStack.Instance.ShowDialog(option);
    }