Center dialog over PROMS window

Overlay bottom of dialog with printing status dialog to hide buttons.
Correct spelling of DebugPagination.txt file
Fix table layout - Linespacing and text within borders
Set the yOffset to an integer value after a Table - This was causing some very strange pagination problems.
Output one blank line after a figure.
This commit is contained in:
Rich
2012-09-25 21:01:10 +00:00
parent 17d0839e6c
commit 747fd76f21
4 changed files with 28 additions and 13 deletions

View File

@@ -102,7 +102,7 @@ namespace VEPROMS
gpnlDebug.Visible = Volian.Base.Library.VlnSettings.DebugMode;
}
public DlgPrintProcedure(ProcedureInfo pi)
{
{
InitializeComponent();
_AllProcedures = false;
_DocVersionConfig = (pi.ActiveParent as DocVersionInfo).DocVersionConfig;
@@ -112,7 +112,16 @@ namespace VEPROMS
PrepForAllOrOne(true);
cbxOpenAfterCreate2.Checked = pi.MyDocVersion.DocVersionConfig.Print_AlwaysViewPDFAfterCreate;
}
/// <summary>
/// RHM 20120925 Added so that the dialog would center over the PROMS window
/// </summary>
/// <param name="e"></param>
protected override void OnActivated(EventArgs e)
{
base.OnActivated(e);
if (Owner != null)
Location = new Point(Owner.Left + Owner.Width / 2 - Width / 2, Owner.Top + Owner.Height/2 - Height/2);
}
private void HandleDocVersionSettings()
{
@@ -404,7 +413,8 @@ namespace VEPROMS
pbPDFsStatus.TextVisible = true;
pbPDFsStatus.Text = string.Format("Creating PDF for {0} ({1} of {2})", myProc.DisplayNumber, ++i, n);
pbPDFsStatus.Value = i;
frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNum, RevDate, pw.ToString(), cbxDebug.Checked, cbxOrPgBrk.Checked, cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked, PDFPath, cbd, txbPDFName.Text, new Point(Left,Bottom));
// RHM 20120925 Overlay the bottom of the dialog so that cancel button is covered.
frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNum, RevDate, pw.ToString(), cbxDebug.Checked, cbxOrPgBrk.Checked, cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked, PDFPath, cbd, txbPDFName.Text, new Point(Left,Bottom-50));
frmStatus.CloseWhenDone = true;
frmStatus.CancelStop = true;
frmStatus.ShowDialog();
@@ -418,7 +428,7 @@ namespace VEPROMS
private void CreateDebugFiles()
{
if (cbxDebugPagination.Checked)
Volian.Base.Library.DebugPagination.Open(PDFPath + "\\DebugPagaination.txt");
Volian.Base.Library.DebugPagination.Open(PDFPath + "\\DebugPagination.txt"); // RHM 20120925 Corrected spelling
if (cbxDebugText.Checked)
Volian.Base.Library.DebugText.Open(PDFPath + "\\DebugText.txt");
}
@@ -439,7 +449,8 @@ namespace VEPROMS
// Determine change bar settings. First get from config & then see if override from dialog.
// Also check that format allows override.
ChangeBarDefinition cbd = DetermineChangeBarSettings();
frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNum, RevDate, pw.ToString(), cbxDebug.Checked, cbxOrPgBrk.Checked, cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked, PDFPath, cbd, txbPDFName.Text, new Point(Left, Bottom));
// RHM 20120925 Overlay the bottom of the dialog so that cancel button is covered.
frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNum, RevDate, pw.ToString(), cbxDebug.Checked, cbxOrPgBrk.Checked, cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked, PDFPath, cbd, txbPDFName.Text, new Point(Left, Bottom - 50));
frmStatus.ShowDialog();
this.Close();
ShowDebugFiles();

View File

@@ -362,7 +362,7 @@ namespace VEPROMS
if (dvi == null) return;
tc.SaveCurrentEditItem();
DlgPrintProcedure prnDlg = new DlgPrintProcedure(dvi);
prnDlg.Show();
prnDlg.Show(this); // RHM 20120925 - Center dialog over PROMS window
}
void tv_PrintProcedure(object sender, vlnTreeEventArgs args)
{
@@ -370,7 +370,7 @@ namespace VEPROMS
if (pi == null) return;
tc.SaveCurrentEditItem(pi);
DlgPrintProcedure prnDlg = new DlgPrintProcedure(pi);
prnDlg.Show();
prnDlg.Show(this); // RHM 20120925 - Center dialog over PROMS window
}
void RefreshDisplayHistory(object sender)
{
@@ -422,7 +422,7 @@ namespace VEPROMS
ProcedureInfo pi = args.Proc as ProcedureInfo;
if (pi == null) return;
DlgPrintProcedure prnDlg = new DlgPrintProcedure(pi);
prnDlg.Show();
prnDlg.Show(this); // RHM 20120925 - Center dialog over PROMS window
}
void displaySearch1_PrintRequest(object sender, DisplaySearchEventArgs args)
{
@@ -592,7 +592,7 @@ namespace VEPROMS
if (dvi != null)
{
DlgPrintProcedure prnDlg = new DlgPrintProcedure(dvi,true);
prnDlg.ShowDialog();
prnDlg.ShowDialog(this); // RHM 20120925 - Center dialog over PROMS window
//prnDlg.FormClosed += new FormClosedEventHandler(prnDlg_FormClosed);
//while (!_RunNext) Application.DoEvents();
ranAuto = true;
@@ -1895,7 +1895,7 @@ namespace VEPROMS
//}
//string pnum = DisplayText.StaticStripRtfCommands(this._CurrentItem.MyProcedure.ProcedureConfig.Number).Replace("\\u8209?", "-");
DlgPrintProcedure prnDlg = new DlgPrintProcedure(this._CurrentItem.MyProcedure);//dvi.DocVersionConfig,pnum);
prnDlg.Show();
prnDlg.Show(this); // RHM 20120925 - Center dialog over PROMS window
}
private void lblResolution_Click(object sender, EventArgs e)