示例#1
0
        //图面样式选择
        private void btLineShape_Click(object sender, EventArgs e)
        {
            FrmPatchLineAndArea frm = new FrmPatchLineAndArea(esriSymbologyStyleClass.esriStyleClassLinePatches);

            frm.ShowDialog();

            if (frm.DialogResult == DialogResult.OK)
            {
                pLinePatch = frm.GetLinePatch();
                if (pLinePatch != null)
                {
                    this.btLineShape.Image = frm.GetImageByGiveSymbolAfterSelectItem(btLineShape.Width, btLineShape.Height);
                }
            }
        }
示例#2
0
        private void btLineShape_Click(object sender, EventArgs e)
        {
            FrmPatchLineAndArea Frm = new FrmPatchLineAndArea(esriSymbologyStyleClass.esriStyleClassLinePatches);

            Frm.ShowDialog();
            if (Frm.DialogResult == DialogResult.OK)
            {
                pLinePatch = Frm.GetLinePatch();
                if (pLinePatch != null)
                {
                    //pLegendFormat.DefaultLinePatch = pLinePatch;
                    btLineShape.Image = Frm.GetImageByGiveSymbolAfterSelectItem(btLineShape.Width - 14, btLineShape.Height - 14);
                }
            }
        }
示例#3
0
        private void method_0()
        {
            this.txtTitle.Text = this.ilegend_0.Title;
            ILegendFormat format = this.ilegend_0.Format;

            this.chkShow.Checked  = format.ShowTitle;
            this.txtTitle.Enabled = format.ShowTitle;
            this.cboTitlePosition.SelectedIndex = ((int)format.TitlePosition) - 1;
            this.txtWidth.Text  = format.DefaultPatchWidth.ToString("#.##");
            this.txtHeight.Text = format.DefaultPatchHeight.ToString("#.##");
            this.listView1.Items[0].SubItems[1].Text = format.HeadingGap.ToString("#.##");
            this.listView1.Items[1].SubItems[1].Text = format.VerticalItemGap.ToString("#.##");
            this.listView1.Items[2].SubItems[1].Text = format.HorizontalItemGap.ToString("#.##");
            this.listView1.Items[3].SubItems[1].Text = format.LayerNameGap.ToString("#.##");
            this.listView1.Items[4].SubItems[1].Text = format.GroupGap.ToString("#.##");
            this.listView1.Items[5].SubItems[1].Text = format.TitleGap.ToString("#.##");
            this.listView1.Items[6].SubItems[1].Text = format.TextGap.ToString("#.##");
            this.listView1.Items[7].SubItems[1].Text = format.VerticalPatchGap.ToString("#.##");
            this.listView1.Items[8].SubItems[1].Text = format.HorizontalPatchGap.ToString("#.##");
            IStyleGalleryItem oO = new MyStyleGalleryItem
            {
                Name = "<定制>"
            };

            this.ilinePatch_0 = format.DefaultLinePatch;
            oO.Item           = this.ilinePatch_0;
            this.cboLinePatches.SelectStyleGalleryItem(oO);
            oO = new MyStyleGalleryItem
            {
                Name = "<定制>"
            };
            this.iareaPatch_0 = format.DefaultAreaPatch;
            oO.Item           = this.iareaPatch_0;
            this.cboAreaPatches.SelectStyleGalleryItem(oO);
            this.chkRightToLeft.Checked = (this.ilegend_0 as IReadingDirection).RightToLeft;
        }
示例#4
0
        //选择样式前返回线图片
        public Image GetImageByGiveLineSymbolBeforeSelectItem(esriSymbologyStyleClass styleClass, ILinePatch symbol, int width, int height)
        {
            axSymbologyCtlFrame.StyleClass = styleClass;
            ISymbologyStyleClass symbologyStyleClass = axSymbologyCtlFrame.GetStyleClass(styleClass);

            IStyleGalleryItem styleGalleryItem = new ServerStyleGalleryItem();

            styleGalleryItem.Item = symbol;
            symbologyStyleClass.AddItem(styleGalleryItem, 0);
            symbologyStyleClass.SelectItem(0);
            stdole.IPictureDisp  picture = symbologyStyleClass.PreviewItem(pStyleGalleryItem, width, height);
            System.Drawing.Image image   = System.Drawing.Image.FromHbitmap(new System.IntPtr(picture.Handle));
            return(image);
        }
示例#5
0
        //调用该窗口后返回线样式
        public ILinePatch GetLinePatch()
        {
            ILinePatch pLinePatch = pStyleGalleryItem.Item as ILinePatch;

            return(pLinePatch);
        }
示例#6
0
 public LinePatchDraw(ILinePatch ilinePatch_0) : base(ilinePatch_0)
 {
 }