private void Init() { IScaleBar pScaleBar = ScaleBarFormatPropertyPage.m_pScaleBar; IScaleMarks marks = pScaleBar as IScaleMarks; this.cboMarkFrequency.SelectedIndex = (int)marks.MarkFrequency; this.cboMarkPosition.SelectedIndex = (int)marks.MarkPosition; this.txtLabelGap.Text = pScaleBar.LabelGap.ToString("#.##"); this.cboLabelFrequency.SelectedIndex = (int)pScaleBar.LabelFrequency; this.cboLabelPosition.SelectedIndex = (int)pScaleBar.LabelPosition; this.txtDivisionMarkHeight.Text = marks.DivisionMarkHeight.ToString("#.##"); this.txtSubdivisionMarkHeight.Text = marks.SubdivisionMarkHeight.ToString("#.##"); if (pScaleBar is IScaleLine) { this.lblMarkHeight.Enabled = true; this.lblPosition.Enabled = true; this.lblsubMarkHeight.Enabled = true; this.cboLabelPosition.Enabled = true; this.txtDivisionMarkHeight.Enabled = true; this.txtSubdivisionMarkHeight.Enabled = true; } else { this.lblMarkHeight.Enabled = false; this.lblPosition.Enabled = false; this.lblsubMarkHeight.Enabled = false; this.cboLabelPosition.Enabled = false; this.txtDivisionMarkHeight.Enabled = false; this.txtSubdivisionMarkHeight.Enabled = false; } }
private void cboMarkPosition_SelectedIndexChanged(object sender, EventArgs e) { if (this.m_CanDo) { IScaleMarks pScaleBar = ScaleBarFormatPropertyPage.m_pScaleBar as IScaleMarks; pScaleBar.MarkPosition = (esriVertPosEnum)this.cboMarkPosition.SelectedIndex; this.ValueChanged(); } }
private void cboMarkFrequency_SelectedIndexChanged(object sender, EventArgs e) { if (this.m_CanDo) { IScaleMarks pScaleBar = ScaleBarFormatPropertyPage.m_pScaleBar as IScaleMarks; pScaleBar.MarkFrequency = (esriScaleBarFrequency)this.cboMarkFrequency.SelectedIndex; this.ValueChanged(); } }
private void cboMarkPosition_SelectedIndexChanged(object sender, EventArgs e) { if (this.bool_0) { IScaleMarks pScaleBar = MapCartoTemplateLib.ScaleBarFormatPropertyPage.m_pScaleBar as IScaleMarks; pScaleBar.MarkPosition = (esriVertPosEnum)this.cboMarkPosition.SelectedIndex; this.method_2(); } }
private void cboMarkFrequency_SelectedIndexChanged(object sender, EventArgs e) { if (this.bool_0) { IScaleMarks pScaleBar = MapCartoTemplateLib.ScaleBarFormatPropertyPage.m_pScaleBar as IScaleMarks; pScaleBar.MarkFrequency = (esriScaleBarFrequency)this.cboMarkFrequency.SelectedIndex; this.method_2(); } }
private void txtSubdivisionMarkHeight_EditValueChanged(object sender, EventArgs e) { if (this.m_CanDo) { IScaleMarks pScaleBar = ScaleBarFormatPropertyPage.m_pScaleBar as IScaleMarks; try { pScaleBar.SubdivisionMarkHeight = double.Parse(this.txtSubdivisionMarkHeight.Text); this.ValueChanged(); } catch { } } }
private void txtSubdivisionMarkHeight_EditValueChanged(object sender, EventArgs e) { if (this.bool_0) { IScaleMarks pScaleBar = MapCartoTemplateLib.ScaleBarFormatPropertyPage.m_pScaleBar as IScaleMarks; try { pScaleBar.SubdivisionMarkHeight = double.Parse(this.txtSubdivisionMarkHeight.Text); this.method_2(); } 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 btnSubdivisionMarkSymbol_Click(object sender, EventArgs e) { try { IScaleMarks pScaleBar = MapCartoTemplateLib.ScaleBarFormatPropertyPage.m_pScaleBar as IScaleMarks; ILineSymbol subdivisionMarkSymbol = pScaleBar.SubdivisionMarkSymbol; frmSymbolSelector selector = new frmSymbolSelector(); if (selector != null) { selector.SetStyleGallery(ApplicationBase.StyleGallery); selector.SetSymbol(subdivisionMarkSymbol); if (selector.ShowDialog() == DialogResult.OK) { subdivisionMarkSymbol = selector.GetSymbol() as ILineSymbol; pScaleBar.SubdivisionMarkSymbol = subdivisionMarkSymbol; this.method_2(); } } } catch { } }