예제 #1
0
 private void btnStyleSelector_Click(object sender, EventArgs e)
 {
     try
     {
         frmSymbolSelector selector = new frmSymbolSelector();
         if (selector != null)
         {
             selector.SetStyleGallery(this.istyleGallery_0);
             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.method_0();
                 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.method_4();
                 ScaleTextEventsClass.ScaleTextChage(this);
             }
         }
     }
     catch
     {
     }
 }
예제 #2
0
 private void colorTextSymbol_EditValueChanged(object sender, EventArgs e)
 {
     if (this.bool_0)
     {
         ITextSymbol symbol = m_pScaleText.Symbol;
         IColor      color  = symbol.Color;
         this.method_2(this.colorTextSymbol, color);
         symbol.Color        = color;
         m_pScaleText.Symbol = symbol;
         ScaleTextEventsClass.ScaleTextChage(this);
         this.method_4();
     }
 }
예제 #3
0
 private void chkUnderline_Click(object sender, EventArgs e)
 {
     if (this.bool_0)
     {
         ITextSymbol      symbol = m_pScaleText.Symbol;
         stdole.IFontDisp font   = symbol.Font;
         if (font.Underline != this.chkUnderline.Checked)
         {
             font.Underline      = this.chkUnderline.Checked;
             symbol.Font         = font;
             m_pScaleText.Symbol = symbol;
             ScaleTextEventsClass.ScaleTextChage(this);
             this.method_4();
         }
     }
 }
예제 #4
0
 private void cboFontName_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (this.bool_0)
     {
         ITextSymbol      symbol = m_pScaleText.Symbol;
         stdole.IFontDisp font   = symbol.Font;
         if (font.Name != this.cboFontName.Name)
         {
             font.Name           = this.cboFontName.Name;
             symbol.Font         = font;
             m_pScaleText.Symbol = symbol;
             ScaleTextEventsClass.ScaleTextChage(this);
             this.method_4();
         }
     }
 }
예제 #5
0
 private void cboStyle_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (this.bool_0)
     {
         IStyleGalleryItem selectStyleGalleryItem = this.cboStyle.GetSelectStyleGalleryItem();
         if (selectStyleGalleryItem == null)
         {
             m_pScaleText = null;
         }
         else
         {
             m_pScaleText = (selectStyleGalleryItem.Item as IClone).Clone() as IScaleText;
         }
         this.bool_0 = false;
         this.method_0();
         this.bool_0 = true;
         this.method_4();
         ScaleTextEventsClass.ScaleTextChage(this);
     }
 }
예제 #6
0
 private void cboFontSize_EditValueChanging(object sender, ChangingEventArgs e)
 {
     if (this.bool_0)
     {
         try
         {
             double      num    = double.Parse(this.cboFontSize.Text);
             ITextSymbol symbol = m_pScaleText.Symbol;
             if (!(symbol.Size == num))
             {
                 symbol.Size         = double.Parse(this.cboFontSize.Text);
                 m_pScaleText.Symbol = symbol;
                 ScaleTextEventsClass.ScaleTextChage(this);
                 this.method_4();
             }
         }
         catch
         {
         }
     }
 }
예제 #7
0
 private void btnSymbolSelector_Click(object sender, EventArgs e)
 {
     try
     {
         ITextSymbol       pSym     = m_pScaleText.Symbol;
         frmSymbolSelector selector = new frmSymbolSelector();
         if (selector != null)
         {
             selector.SetStyleGallery(this.istyleGallery_0);
             selector.SetSymbol(pSym);
             if (selector.ShowDialog() == DialogResult.OK)
             {
                 pSym = selector.GetSymbol() as ITextSymbol;
                 m_pScaleText.Symbol = pSym;
                 this.method_1(pSym);
                 ScaleTextEventsClass.ScaleTextChage(this);
                 this.method_4();
             }
         }
     }
     catch
     {
     }
 }