public frmEditPar(FormattingRulesLibrary.Paragraph par) { InitializeComponent(); par_id = par.paragraph_id; _par.paragraph_id = par_id; _par = par; }
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; } } } }
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; } }
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; }