예제 #1
0
        //标题样式
        private void btSymbol_Click(object sender, EventArgs e)
        {
            FrmTextSymbol frm = new FrmTextSymbol();

            frm.ShowDialog();
            if (frm.DialogResult == DialogResult.OK)
            {
                pTitleSymbol = frm.GetTextSymbol();
            }
        }
예제 #2
0
        //频率标志字体样式
        private void btSymbolFre_Click(object sender, EventArgs e)
        {
            FrmTextSymbol pFrmTextSymbol = new FrmTextSymbol();

            pFrmTextSymbol.ShowDialog();
            if (pFrmTextSymbol.DialogResult == DialogResult.OK)
            {
                FrequencyLabelSymbols = pFrmTextSymbol.GetTextSymbol();
            }
            pFrmTextSymbol.Dispose();
        }
예제 #3
0
 //图例中类型文本样式
 private void btTextSymbol_Click(object sender, EventArgs e)
 {
     if (this.cboBoxTextSymbol.SelectedIndex == 0)
     {
         //所有文本的样式
         FrmTextSymbol frm = new FrmTextSymbol();
         frm.ShowDialog();
         if (frm.DialogResult == DialogResult.OK)
         {
             pWholeItemSymbol = frm.GetTextSymbol();
         }
     }
     else if (this.cboBoxTextSymbol.SelectedIndex == 1)
     {
         //图层名样式
         FrmTextSymbol frm = new FrmTextSymbol();
         frm.ShowDialog();
         if (frm.DialogResult == DialogResult.OK)
         {
             pLayerNameSymbol = frm.GetTextSymbol();
         }
     }
     else if (this.cboBoxTextSymbol.SelectedIndex == 2)
     {
         //标题样式
         FrmTextSymbol frm = new FrmTextSymbol();
         frm.ShowDialog();
         if (frm.DialogResult == DialogResult.OK)
         {
             pHeadingSymbol = frm.GetTextSymbol();
         }
     }
     else if (this.cboBoxTextSymbol.SelectedIndex == 3)
     {
         //标注样式
         FrmTextSymbol frm = new FrmTextSymbol();
         frm.ShowDialog();
         if (frm.DialogResult == DialogResult.OK)
         {
             pLabelSymbol = frm.GetTextSymbol();
         }
     }
     else if (this.cboBoxTextSymbol.SelectedIndex == 4)
     {
         //描述样式
         FrmTextSymbol frm = new FrmTextSymbol();
         frm.ShowDialog();
         if (frm.DialogResult == DialogResult.OK)
         {
             pDescriptionSymbol = frm.GetTextSymbol();
         }
     }
 }
예제 #4
0
        /// <summary>
        /// 标注符号
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnsymbol_Click(object sender, EventArgs e)
        {
            FrmTextSymbol frmtext = new FrmTextSymbol();

            frmtext.StartPosition = FormStartPosition.CenterScreen;
            frmtext.ShowInTaskbar = false;
            frmtext.ShowDialog();
            pTextSymbol = frmtext.GetTextSymbol();
            if (pTextSymbol != null)
            {
                stdole.IFontDisp pFont = pTextSymbol.Font;
                symbolcolor.SelectedColor = ClsGDBDataCommon.IColorToColor(pTextSymbol.Color);
                //cmbfont.Text = pTextSymbol.Font.Name;
                for (int i = 0; i < cmbfont.Items.Count; i++)
                {
                    if (cmbfont.Items[i].ToString() == pTextSymbol.Font.Name)
                    {
                        cmbfont.SelectedIndex = i;
                    }
                }
                cmbsize.Text = pTextSymbol.Size.ToString();
                if (pFont.Bold == true)
                {
                    toolBtnBold.Checked = true;
                }
                else
                {
                    toolBtnBold.Checked = false;
                }
                if (pFont.Italic == true)
                {
                    toolBtnIntend.Checked = true;
                }
                else
                {
                    toolBtnIntend.Checked = false;
                }
                if (pFont.Underline == true)
                {
                    toolBtnUnderline.Checked = true;
                }
                else
                {
                    toolBtnUnderline.Checked = false;
                }
                if (pFont.Strikethrough == true)
                {
                    toolBtnStrikethrough.Checked = true;
                }
                else
                {
                    toolBtnStrikethrough.Checked = false;
                }
            }
            else
            {
                IFontDisp pFont = new StdFontClass() as IFontDisp;
                pTextSymbol.Color   = ClsGDBDataCommon.ColorToIColor(symbolcolor.SelectedColor);
                pFont.Bold          = toolBtnBold.Checked;
                pFont.Italic        = toolBtnIntend.Checked;
                pFont.Strikethrough = toolBtnStrikethrough.Checked;
                pFont.Underline     = toolBtnUnderline.Checked;
                pFont.Name          = cmbfont.Text;
                pFont.Size          = decimal.Parse(cmbsize.Text);
                pTextSymbol.Font    = pFont;
            }
        }