Beispiel #1
0
 private void btnMarkSymbol_Click(object sender, EventArgs e)
 {
     try
     {
         frmSymbolSelector selector = new frmSymbolSelector();
         ISymbol           pSym     = null;
         if (this.m_pMarkerLineSymbol.MarkerSymbol != null)
         {
             pSym = (ISymbol)((IClone)this.m_pMarkerLineSymbol.MarkerSymbol).Clone();
         }
         else
         {
             pSym = new SimpleMarkerSymbolClass();
         }
         selector.SetSymbol(pSym);
         selector.SetStyleGallery(this.m_pSG);
         if (selector.ShowDialog() == DialogResult.OK)
         {
             this.m_pMarkerLineSymbol.MarkerSymbol = (IMarkerSymbol)selector.GetSymbol();
             this.btnMarkSymbol.Style = this.m_pMarkerLineSymbol.MarkerSymbol;
             this.btnMarkSymbol.Invalidate();
             this.refresh(e);
         }
     }
     catch
     {
     }
 }
Beispiel #2
0
 private void btnOutline_Click(object sender, EventArgs e)
 {
     try
     {
         frmSymbolSelector selector = new frmSymbolSelector();
         if (this.m_PictureFillSymbol.Outline != null)
         {
             selector.SetSymbol((ISymbol)this.m_PictureFillSymbol.Outline);
         }
         else
         {
             selector.SetSymbol(new SimpleLineSymbolClass());
         }
         selector.SetStyleGallery(this.m_pSG);
         if (selector.ShowDialog() == DialogResult.OK)
         {
             this.m_PictureFillSymbol.Outline = (ILineSymbol)selector.GetSymbol();
             this.btnOutline.Style            = this.m_PictureFillSymbol.Outline;
             this.btnOutline.Invalidate();
             this.refresh(e);
         }
     }
     catch
     {
     }
 }
Beispiel #3
0
 private void btnFillSymbol_Click(object sender, EventArgs e)
 {
     try
     {
         ISymbol           symbol;
         frmSymbolSelector selector = new frmSymbolSelector();
         if (this.m_pMask.MaskSymbol != null)
         {
             symbol = (ISymbol)((IClone)this.m_pMask.MaskSymbol).Clone();
         }
         else
         {
             symbol = new SimpleFillSymbolClass();
         }
         selector.SetSymbol(symbol);
         selector.SetStyleGallery(this.m_pSG);
         if (selector.ShowDialog() == DialogResult.OK)
         {
             this.m_pMask.MaskSymbol  = (IFillSymbol)selector.GetSymbol();
             this.btnFillSymbol.Style = this.m_pMask.MaskSymbol;
             this.btnFillSymbol.Invalidate();
             this.refresh(e);
         }
     }
     catch
     {
     }
 }
 private void btnSymbolSelector_Click(object sender, EventArgs e)
 {
     try
     {
         ITextSymbol       labelSymbol = m_pScaleBar.LabelSymbol;
         frmSymbolSelector selector    = new frmSymbolSelector();
         if (selector != null)
         {
             selector.SetStyleGallery(this.m_pSG);
             selector.SetSymbol(labelSymbol);
             if (selector.ShowDialog() == DialogResult.OK)
             {
                 labelSymbol             = selector.GetSymbol() as ITextSymbol;
                 m_pScaleBar.LabelSymbol = labelSymbol;
                 this.m_CanDo            = false;
                 this.SetTextSymbol(labelSymbol);
                 this.m_CanDo = true;
                 this.ValueChanged();
             }
         }
     }
     catch
     {
     }
 }
Beispiel #5
0
        private void btnStyle_Click(object sender, EventArgs e)
        {
            frmSymbolSelector selector = new frmSymbolSelector();

            if (selector != null)
            {
                selector.SetStyleGallery(GridAxisPropertyPage.m_pSG);
                selector.SetSymbol(this.btnStyle.Style);
                if (selector.ShowDialog() == DialogResult.OK)
                {
                    this.btnStyle.Style = selector.GetSymbol();
                    if (this.radioGroup1.SelectedIndex == 0)
                    {
                        this.m_TickLineSymbol = this.btnStyle.Style as ILineSymbol;
                    }
                    else if (this.radioGroup1.SelectedIndex == 1)
                    {
                        this.m_TickMarkSymbol = this.btnStyle.Style as IMarkerSymbol;
                    }
                    this.m_IsPageDirty = true;
                    if (this.OnValueChange != null)
                    {
                        this.OnValueChange();
                    }
                }
            }
        }
 private void btnStyleSelector_Click(object sender, EventArgs e)
 {
     try
     {
         frmSymbolSelector selector = new frmSymbolSelector();
         if (selector != null)
         {
             selector.SetStyleGallery(this.m_pSG);
             if (m_pScaleText != null)
             {
                 selector.SetSymbol(m_pScaleText);
             }
             else
             {
                 selector.SetSymbol(new ScaleTextClass());
             }
             if (selector.ShowDialog() == DialogResult.OK)
             {
                 m_pScaleText = selector.GetSymbol() as IScaleText;
                 this.Init();
                 IStyleGalleryItem styleGalleryItemAt =
                     this.cboStyle.GetStyleGalleryItemAt(this.cboStyle.Items.Count - 1);
                 if (styleGalleryItemAt != null)
                 {
                     if (styleGalleryItemAt.Name == "<定制>")
                     {
                         styleGalleryItemAt.Item = m_pScaleText;
                     }
                     else
                     {
                         styleGalleryItemAt = new MyStyleGalleryItem
                         {
                             Name = "<定制>",
                             Item = m_pScaleText
                         };
                         this.cboStyle.Add(styleGalleryItemAt);
                         this.cboStyle.SelectedIndex = this.cboStyle.Items.Count - 1;
                     }
                 }
                 else
                 {
                     styleGalleryItemAt = new MyStyleGalleryItem
                     {
                         Name = "<定制>",
                         Item = m_pScaleText
                     };
                     this.cboStyle.Add(styleGalleryItemAt);
                     this.cboStyle.SelectedIndex = this.cboStyle.Items.Count - 1;
                 }
                 this.ValueChanged();
                 ScaleTextEventsClass.ScaleTextChage(this);
             }
         }
     }
     catch
     {
     }
 }
Beispiel #7
0
 private void btnLabelSymbol_Click(object sender, EventArgs e)
 {
     if (this.m_pTextSymbol != null)
     {
         frmSymbolSelector selector = new frmSymbolSelector();
         selector.SetStyleGallery(_context.StyleGallery);
         selector.SetSymbol(this.m_pTextSymbol);
         if (selector.ShowDialog() == DialogResult.OK)
         {
             this.m_pTextSymbol      = selector.GetSymbol() as ITextSymbol;
             this.symbolItem1.Symbol = this.m_pTextSymbol;
             this.symbolItem1.Invalidate();
         }
     }
 }
 private void btnSymbol1Selector_Click(object sender, EventArgs e)
 {
     try
     {
         ISymbol pSym = null;
         if (m_pScaleBar is IScaleLine)
         {
             pSym = (m_pScaleBar as IScaleLine).LineSymbol as ISymbol;
         }
         else if (m_pScaleBar is ISingleFillScaleBar)
         {
             pSym = (m_pScaleBar as ISingleFillScaleBar).FillSymbol as ISymbol;
         }
         else if (m_pScaleBar is IDoubleFillScaleBar)
         {
             pSym = (m_pScaleBar as IDoubleFillScaleBar).FillSymbol1 as ISymbol;
         }
         if (pSym != null)
         {
             frmSymbolSelector selector = new frmSymbolSelector();
             if (selector != null)
             {
                 selector.SetStyleGallery(this.m_pSG);
                 selector.SetSymbol(pSym);
                 if (selector.ShowDialog() == DialogResult.OK)
                 {
                     if (m_pScaleBar is IScaleLine)
                     {
                         (m_pScaleBar as IScaleLine).LineSymbol = selector.GetSymbol() as ILineSymbol;
                     }
                     else if (m_pScaleBar is ISingleFillScaleBar)
                     {
                         (m_pScaleBar as ISingleFillScaleBar).FillSymbol = selector.GetSymbol() as IFillSymbol;
                     }
                     else if (m_pScaleBar is IDoubleFillScaleBar)
                     {
                         (m_pScaleBar as IDoubleFillScaleBar).FillSymbol1 = selector.GetSymbol() as IFillSymbol;
                     }
                     this.ValueChanged();
                 }
             }
         }
     }
     catch
     {
     }
 }
Beispiel #9
0
        private void btnBorder_Click(object sender, EventArgs e)
        {
            frmSymbolSelector selector = new frmSymbolSelector();

            if (selector != null)
            {
                selector.SetStyleGallery(GridAxisPropertyPage.m_pSG);
                selector.SetSymbol(this.btnBorder.Style);
                if (selector.ShowDialog() == DialogResult.OK)
                {
                    this.btnBorder.Style = selector.GetSymbol();
                    if (this.OnValueChange != null)
                    {
                        this.OnValueChange();
                    }
                }
            }
        }
Beispiel #10
0
        private void btnSubStyle_Click(object sender, EventArgs e)
        {
            frmSymbolSelector selector = new frmSymbolSelector();

            if (selector != null)
            {
                selector.SetStyleGallery(m_pSG);
                selector.SetSymbol(this.btnSubStyle.Style);
                if (selector.ShowDialog() == DialogResult.OK)
                {
                    this.m_IsPageDirty     = true;
                    this.btnSubStyle.Style = selector.GetSymbol();
                    if (this.OnValueChange != null)
                    {
                        this.OnValueChange();
                    }
                }
            }
        }
 private void SelectTextSymbol(ref ITextSymbol pTextSymbol)
 {
     try
     {
         frmSymbolSelector selector = new frmSymbolSelector();
         if (selector != null)
         {
             selector.SetStyleGallery(this.m_pSG);
             selector.SetSymbol(pTextSymbol);
             if (selector.ShowDialog() == DialogResult.OK)
             {
                 pTextSymbol = selector.GetSymbol() as ITextSymbol;
                 this.ValueChanged();
             }
         }
     }
     catch
     {
     }
 }
 private void btnSymbolSelector_Click(object sender, EventArgs e)
 {
     try
     {
         ITextSymbol       unitLabelSymbol = ScaleBarFormatPropertyPage.m_pScaleBar.UnitLabelSymbol;
         frmSymbolSelector selector        = new frmSymbolSelector();
         if (selector != null)
         {
             selector.SetStyleGallery(this.m_pSG);
             selector.SetSymbol(unitLabelSymbol);
             if (selector.ShowDialog() == DialogResult.OK)
             {
                 unitLabelSymbol = selector.GetSymbol() as ITextSymbol;
                 ScaleBarFormatPropertyPage.m_pScaleBar.UnitLabelSymbol = unitLabelSymbol;
                 this.ValueChanged();
             }
         }
     }
     catch
     {
     }
 }
 private void btnSubdivisionMarkSymbol_Click(object sender, EventArgs e)
 {
     try
     {
         IScaleMarks       pScaleBar             = ScaleBarFormatPropertyPage.m_pScaleBar as IScaleMarks;
         ILineSymbol       subdivisionMarkSymbol = pScaleBar.SubdivisionMarkSymbol;
         frmSymbolSelector selector = new frmSymbolSelector();
         if (selector != null)
         {
             selector.SetStyleGallery(this.m_pSG);
             selector.SetSymbol(subdivisionMarkSymbol);
             if (selector.ShowDialog() == DialogResult.OK)
             {
                 subdivisionMarkSymbol           = selector.GetSymbol() as ILineSymbol;
                 pScaleBar.SubdivisionMarkSymbol = subdivisionMarkSymbol;
                 this.ValueChanged();
             }
         }
     }
     catch
     {
     }
 }
 private void btnChangeSymbol_Click(object sender, EventArgs e)
 {
     try
     {
         IFillSymbol       fillSymbol = this.m_pSymbolBackground.FillSymbol;
         frmSymbolSelector selector   = new frmSymbolSelector();
         selector.SetStyleGallery(_context.StyleGallery);
         selector.SetSymbol(fillSymbol);
         if (selector.ShowDialog() == DialogResult.OK)
         {
             fillSymbol = selector.GetSymbol() as IFillSymbol;
             this.m_pSymbolBackground.FillSymbol = fillSymbol;
             this.m_CanDo = false;
             this.Init();
             this.m_CanDo       = true;
             this.m_IsPageDirty = true;
             this.refresh(e);
         }
     }
     catch
     {
     }
 }
 private void btnNorthMarkerSymbolSelector_Click(object sender, EventArgs e)
 {
     try
     {
         frmSymbolSelector selector = new frmSymbolSelector();
         if (selector != null)
         {
             selector.SetStyleGallery(this.m_pSG);
             selector.SetSymbol((this.m_pNorthArrow as IMarkerNorthArrow).MarkerSymbol);
             if (selector.ShowDialog() == DialogResult.OK)
             {
                 (this.m_pNorthArrow as IMarkerNorthArrow).MarkerSymbol = selector.GetSymbol() as IMarkerSymbol;
                 this.m_CanDo = false;
                 this.Init();
                 this.m_CanDo = true;
                 this.ValueChanged();
             }
         }
     }
     catch
     {
     }
 }
 private void btnChangeSymbol_Click(object sender, EventArgs e)
 {
     try
     {
         ILineSymbol       lineSymbol = this.m_pSymbolBorder.LineSymbol;
         frmSymbolSelector selector   = new frmSymbolSelector();
         selector.SetStyleGallery(_context.StyleGallery);
         selector.SetSymbol(lineSymbol);
         if (selector.ShowDialog() == DialogResult.OK)
         {
             lineSymbol = selector.GetSymbol() as ILineSymbol;
             this.m_pSymbolBorder.LineSymbol = lineSymbol;
             this.m_CanDo = false;
             this.SetColorEdit(this.colorEdit1, lineSymbol.Color);
             this.txtWidth.Value = (decimal)lineSymbol.Width;
             this.m_CanDo        = true;
             this.m_IsPageDirty  = true;
             this.refresh(e);
         }
     }
     catch
     {
     }
 }
 private void btnSymbol2Selector_Click(object sender, EventArgs e)
 {
     try
     {
         if (m_pScaleBar is IDoubleFillScaleBar)
         {
             ISymbol           pSym     = (m_pScaleBar as IDoubleFillScaleBar).FillSymbol2 as ISymbol;
             frmSymbolSelector selector = new frmSymbolSelector();
             if (selector != null)
             {
                 selector.SetStyleGallery(this.m_pSG);
                 selector.SetSymbol(pSym);
                 if (selector.ShowDialog() == DialogResult.OK)
                 {
                     (m_pScaleBar as IDoubleFillScaleBar).FillSymbol2 = selector.GetSymbol() as IFillSymbol;
                     this.ValueChanged();
                 }
             }
         }
     }
     catch
     {
     }
 }
 private void btnSymbolSelector_Click(object sender, EventArgs e)
 {
     try
     {
         ITextSymbol pSym = m_pScaleText.Symbol;
         frmSymbolSelector selector = new frmSymbolSelector();
         if (selector != null)
         {
             selector.SetStyleGallery(this.m_pSG);
             selector.SetSymbol(pSym);
             if (selector.ShowDialog() == DialogResult.OK)
             {
                 pSym = selector.GetSymbol() as ITextSymbol;
                 m_pScaleText.Symbol = pSym;
                 this.SetTextSymbol(pSym);
                 ScaleTextEventsClass.ScaleTextChage(this);
                 this.ValueChanged();
             }
         }
     }
     catch
     {
     }
 }