示例#1
0
 public frmEditFont(FormattingRulesLibrary.Font font)
 {
     InitializeComponent();
     font_id = font.font_id;
     _font.font_id = font_id;
     _font = font;
 }
示例#2
0
 private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e)
 {
     frmEditFont e_font = new frmEditFont();
     e_font._font = font;
     if (e_font.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         font = e_font._font; // переменная получает значение из формы
         font.InsertFont();
         font.LoadFont(ref fontDT); ;
         bs.DataSource = fontDT;
     }
 }
示例#3
0
 private void bindingNavigatorEditItem_Click(object sender, EventArgs e)
 {
     InitFont();
     font.FillFontGaps();
     frmEditFont e_font = new frmEditFont(font);
     if (e_font.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         font = e_font._font; // переменная получает значение из формы
         font.UpdateFont();
         font.LoadFont(ref fontDT);
         bs.DataSource = fontDT;
     }
 }
示例#4
0
 public frmFont()
 {
     InitializeComponent();
     font = new FormattingRulesLibrary.Font();
     font.LoadFont(ref fontDT);
     bs.DataSource = fontDT;
     fontBindingNavigator.BindingSource = bs;
     tbSize.DataBindings.Add(new Binding("Text", bs, "size"));
     tbFTitle.DataBindings.Add(new Binding("Text", bs, "font_title"));
     tbColor.DataBindings.Add(new Binding("Text", bs, "color"));
     chbCurs.DataBindings.Add(new Binding("Checked", bs, "italic"));
     chbZh.DataBindings.Add(new Binding("Checked", bs, "bold"));
     chPodch.DataBindings.Add(new Binding("Checked", bs, "underlined"));
 }
示例#5
0
        private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e)
        {
            InitStyle();
            style = new StyleDesc();
            StyleTitle s_title = new StyleTitle();
            if (s_title.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                style.style_title = s_title.style_title;

                frmEditFont font_form = new frmEditFont();
                font_form._font = font;
                if (font_form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    font = font_form._font; // переменная получает значение из формы
                    font.CheckFont();
                    if (font.font_id == 0)
                    {
                        font.InsertFont();
                        font.CheckFont();
                    }
                    style.font = font.font_id;

                    frmEditPar e_par = new frmEditPar(par);
                    e_par._par = par;
                    if (e_par.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                    {
                        par = e_par._par; // переменная получает значение из формы
                        par.CheckPar();
                        if (par.paragraph_id == 0)
                        {
                            par.InsertPar();
                            par.CheckPar();
                        }
                        style.paragraph = par.paragraph_id;
                        style.InsertStyle();
                        LoadStyle();
                        bs.DataSource = styleDT;
                    }
                }
            }
        }
示例#6
0
 private void bindingNavigatorEditFontItem_Click(object sender, EventArgs e)
 {
     InitStyle();
     frmEditFont e_font = new frmEditFont(font);
     if (e_font.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         font = e_font._font; // переменная получает значение из формы
         font.CheckFont();
         if (font.font_id == 0)
         {
             font.InsertFont();
             font.CheckFont();
         }
         style.font = font.font_id;
         style.UpdateStyle();
         LoadStyle();
         bs.DataSource = styleDT;
     }
 }
示例#7
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     double size = (double)numFontSize.Value;
     _font = new FormattingRulesLibrary.Font((int)cbFontName.SelectedValue, size, chbCurs.Checked, chPodch.Checked, chbZh.Checked, (int)cbFontColor.SelectedValue);
     _font.font_id = font_id;
 }