예제 #1
0
        private void linkLabel_Height_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            SettingForm form = new SettingForm();

            if (form.ShowDialog() == DialogResult.OK)
            {
                label.SetHeight(form.Offset, form.WindowWidthRatio, form.WindowHightRatio);
                txtHeight.Text = label.GetHeight().ToString();
            }
        }
예제 #2
0
파일: MainForm.cs 프로젝트: batuZ/Samples
        private void MainForm_Load(object sender, System.EventArgs e)
        {
            // 自定义左下角Logo
            IOverlayLabel logoLabel     = this.axRenderControl1.ObjectManager.CreateOverlayLabel(rootId);
            string        imageNamePath = (strMediaPath + @"\bmp\tablelabel_pic.bmp");

            logoLabel.ImageName = imageNamePath;
            logoLabel.SetWidth(150, 0, 0);
            logoLabel.SetHeight(50, 0, 0);
            logoLabel.SetX(-logoLabel.GetWidth() / 2, 1, 0);
            logoLabel.SetY(logoLabel.GetHeight() / 2, 0, 0);
        }
예제 #3
0
        private void MainForm_Load(object sender, System.EventArgs e)
        {
            init();

            label      = this.axRenderControl1.ObjectManager.CreateOverlayLabel(rootId);
            label.Text = "伟景行";

            #region 获取默认值
            this.txtLabelText.Text = label.Text;
            switch (label.Alignment)
            {
            case gviPivotAlignment.gviPivotAlignBottomCenter:
                comboBox1.SelectedIndex = 8;
                break;

            case gviPivotAlignment.gviPivotAlignBottomLeft:
                comboBox1.SelectedIndex = 1;
                break;

            case gviPivotAlignment.gviPivotAlignBottomRight:
                comboBox1.SelectedIndex = 4;
                break;

            case gviPivotAlignment.gviPivotAlignCenterCenter:
                comboBox1.SelectedIndex = 7;
                break;

            case gviPivotAlignment.gviPivotAlignCenterLeft:
                comboBox1.SelectedIndex = 2;
                break;

            case gviPivotAlignment.gviPivotAlignCenterRight:
                comboBox1.SelectedIndex = 5;
                break;

            case gviPivotAlignment.gviPivotAlignTopCenter:
                comboBox1.SelectedIndex = 6;
                break;

            case gviPivotAlignment.gviPivotAlignTopLeft:
                comboBox1.SelectedIndex = 0;
                break;

            case gviPivotAlignment.gviPivotAlignTopRight:
                comboBox1.SelectedIndex = 3;
                break;
            }
            this.txtImageName.Text = label.ImageName;
            this.numRotation.Value = decimal.Parse(label.Rotation.ToString());
            this.numDepth.Value    = decimal.Parse(label.Depth.ToString());
            this.txtX.Text         = label.GetX().ToString();
            this.txtY.Text         = label.GetY().ToString();
            this.txtWidth.Text     = label.GetWidth().ToString();
            this.txtHeight.Text    = label.GetHeight().ToString();
            #endregion

            // 自定义右下角Logo
            IOverlayLabel logoLabel     = this.axRenderControl1.ObjectManager.CreateOverlayLabel(rootId);
            string        imageNamePath = (strMediaPath + @"\bmp\Tulips.bmp");
            logoLabel.ImageName = imageNamePath;
            logoLabel.SetWidth(128, 0, 0);
            logoLabel.SetHeight(96, 0, 0);
            logoLabel.SetX(-logoLabel.GetWidth() / 2, 1.0f, 0);
            logoLabel.SetY(logoLabel.GetHeight() / 2, 0, 0);
            this.axRenderControl1.Viewport.LogoVisible = false;

            {
                this.helpProvider1.SetShowHelp(this.axRenderControl1, true);
                this.helpProvider1.SetHelpString(this.axRenderControl1, "");
                this.helpProvider1.HelpNamespace = "OverlayLabel.html";
            }
        }