示例#1
0
 public frmEditPar(FormattingRulesLibrary.Paragraph par)
 {
     InitializeComponent();
     par_id = par.paragraph_id;
     _par.paragraph_id = par_id;
     _par = par;
 }
示例#2
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;
                    }
                }
            }
        }
示例#3
0
 private void bindingNavigatorEditParItem_Click(object sender, EventArgs e)
 {
     InitStyle();
     frmEditPar e_par = new frmEditPar(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.UpdateStyle();
         LoadStyle();
         bs.DataSource = styleDT;
     }
 }
示例#4
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     _par = new FormattingRulesLibrary.Paragraph((int)cbAlign.SelectedValue, (double)numLeft.Value, (double)numRight.Value, (double)numOtst.Value,
         (double)numBefore.Value, (double)numAfter.Value, (double)numStrInt.Value);
     _par.paragraph_id = par_id;
 }