예제 #1
0
        private void AddTagPageControl(string resourceid, int datalength, bool clientpath)
        {
            Panel pal = new Panel();

            pal.Flex   = 1;
            pal.Width  = 0;
            pal.Height = 0;
            pal.Layout = LayoutPosition.Relative;
            pal.Controls.Add(new Label()
            {
                Height = 30, Width = 0, Text = string.Format("资源名:{0}/大小:{1}kb", resourceid, (datalength / 1024).ToString())
            });
            if (this.camera1.Mode == CameraMode.AlbumVideo || this.camera1.Mode == CameraMode.CameraVideo)
            {
                pal.Controls.Add(new Smobiler.Plugins.MediaView()
                {
                    Flex = 1, Width = 0, Height = 0, Url = MobileResourceManager.GetResourceURL(this.Client.SessionID, resourceid, MobileResourceManager.DefaultUploadResourceName)
                });
            }
            else
            {
                if (clientpath == false)
                {
                    pal.Controls.Add(new Image()
                    {
                        Flex = 1, Width = 0, Height = 0, ResourceID = resourceid, ResourcePath = MobileResourceManager.DefaultUploadResourceName
                    });
                }
                else
                {
                    pal.Controls.Add(new Image()
                    {
                        Flex = 1, Width = 0, Height = 0, ResourceID = resourceid, ResourceMode = ResourceMode.Client
                    });
                }
            }
            this.tabPageView1.Controls.Add(pal);
            this.tabPageView1.PageIndex = this.tabPageView1.Controls.Count - 1;
        }
예제 #2
0
 private void btnDymaticHtml_Press(object sender, EventArgs e)
 {
     this.webView1.Url = MobileResourceManager.GetResourceURL(this.Client.SessionID, "dynamic?path=demo.html");
 }
        private void buttonCreateDevEnv_Click(object sender, EventArgs e)
        {
            if (textProductPath.Text == string.Empty)
            {
                return;
            }

            var deployment = new DeploymentManager(textProductPath.Text);

            if (deployment.HasSDK)
            {
                MessageBox.Show("The selected path already has a mobile environment. Choose another path.", "Mobile Already Exists", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            labelStatus.Visible        = true;
            progressBar1.Visible       = true;
            buttonCreateDevEnv.Enabled = false;

            var version = MobileVersion.Version35;

            if (option12.Checked)
            {
                version = MobileVersion.Version12;
            }
            if (option20.Checked)
            {
                version = MobileVersion.Version20;
            }
            if (option30.Checked)
            {
                version = MobileVersion.Version30;
            }
            if (option31.Checked)
            {
                version = MobileVersion.Version31;
            }
            if (option32.Checked)
            {
                version = MobileVersion.Version32;
            }
            if (option33.Checked)
            {
                version = MobileVersion.Version33;
            }
            if (option34.Checked)
            {
                version = MobileVersion.Version34;
            }
            if (option35.Checked)
            {
                version = MobileVersion.Version35;
            }

            var mobileResources = new MobileResourceManager(textProductPath.Text, version);

            mobileResources.IncludeArgosSample           = checkIncludeSample.Checked;
            mobileResources.IncludeArgos754Compatability = checkIncludeBackCompat.Checked;
            mobileResources.ResourceInstallInitializing += mobileResources_ResourceInstallInitializing;
            mobileResources.ResourceInstallProgress     += mobileResources_ResourceInstallProgress;
            mobileResources.ResourceInstallStepUpdate   += mobileResources_ResourceInstallStepUpdate;
            mobileResources.ResourceInstallComplete     += mobileResources_ResourceInstallComplete;
            mobileResources.Install();

            Program.CurrentDevSite          = textProductPath.Text;
            Program.CurrentDevMobileVersion = version;
        }
예제 #4
0
 private void demoHtmlInteraction_Load(object sender, EventArgs e)
 {
     //在项目中的Resources/Web文件夹下,有jsCookie.html,里面有对JS的说明。
     this.webView1.Url = MobileResourceManager.GetResourceURL(this.Client.SessionID, "jsCookie.html", MobileResourceManager.DefaultWebResourceName);
 }
예제 #5
0
 private void btnLocalHtml_Press(object sender, EventArgs e)
 {
     this.webView1.Url = MobileResourceManager.GetResourceURL(this.Client.SessionID, "web/demo.html");
 }
 private void btnUpdateImage_Press(object sender, EventArgs e)
 {
     //刷新图像
     this.image1.ResourceID = MobileResourceManager.GetResourceURL(this.Client.SessionID, resourceUrl + "?id=test");
     this.image1.Refresh();
 }