widen cancel button so ‘l’ not cut-off in small DPI mode

added BtwnTextAndBottom2 for y-location of continue message
Implement BtwnTextAndBottom2
This commit is contained in:
2014-05-15 12:42:45 +00:00
parent 074ff3e888
commit 5023c30710
3 changed files with 24 additions and 12 deletions

View File

@@ -37,25 +37,28 @@ namespace VEPROMS
// label1 // label1
// //
this.label1.AutoSize = true; this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(23, 15); this.label1.Location = new System.Drawing.Point(17, 12);
this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(213, 17); this.label1.Size = new System.Drawing.Size(160, 13);
this.label1.TabIndex = 0; this.label1.TabIndex = 0;
this.label1.Text = "Please enter your change bar ID"; this.label1.Text = "Please enter your change bar ID";
// //
// tbChgId // tbChgId
// //
this.tbChgId.Location = new System.Drawing.Point(33, 51); this.tbChgId.Location = new System.Drawing.Point(25, 41);
this.tbChgId.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.tbChgId.Name = "tbChgId"; this.tbChgId.Name = "tbChgId";
this.tbChgId.Size = new System.Drawing.Size(128, 22); this.tbChgId.Size = new System.Drawing.Size(97, 20);
this.tbChgId.TabIndex = 1; this.tbChgId.TabIndex = 1;
// //
// btnOk // btnOk
// //
this.btnOk.DialogResult = System.Windows.Forms.DialogResult.OK; this.btnOk.DialogResult = System.Windows.Forms.DialogResult.OK;
this.btnOk.Location = new System.Drawing.Point(26, 94); this.btnOk.Location = new System.Drawing.Point(20, 76);
this.btnOk.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.btnOk.Name = "btnOk"; this.btnOk.Name = "btnOk";
this.btnOk.Size = new System.Drawing.Size(61, 29); this.btnOk.Size = new System.Drawing.Size(46, 24);
this.btnOk.TabIndex = 2; this.btnOk.TabIndex = 2;
this.btnOk.Text = "Ok"; this.btnOk.Text = "Ok";
this.btnOk.UseVisualStyleBackColor = true; this.btnOk.UseVisualStyleBackColor = true;
@@ -64,9 +67,10 @@ namespace VEPROMS
// btnCancel // btnCancel
// //
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Location = new System.Drawing.Point(131, 94); this.btnCancel.Location = new System.Drawing.Point(98, 76);
this.btnCancel.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.btnCancel.Name = "btnCancel"; this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(61, 29); this.btnCancel.Size = new System.Drawing.Size(49, 24);
this.btnCancel.TabIndex = 3; this.btnCancel.TabIndex = 3;
this.btnCancel.Text = "Cancel"; this.btnCancel.Text = "Cancel";
this.btnCancel.UseVisualStyleBackColor = true; this.btnCancel.UseVisualStyleBackColor = true;
@@ -75,13 +79,14 @@ namespace VEPROMS
// dlgChgId // dlgChgId
// //
this.AcceptButton = this.btnOk; this.AcceptButton = this.btnOk;
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(347, 167); this.ClientSize = new System.Drawing.Size(260, 136);
this.Controls.Add(this.btnCancel); this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnOk); this.Controls.Add(this.btnOk);
this.Controls.Add(this.tbChgId); this.Controls.Add(this.tbChgId);
this.Controls.Add(this.label1); this.Controls.Add(this.label1);
this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.Name = "dlgChgId"; this.Name = "dlgChgId";
this.Text = "PROMS Change Bar ID"; this.Text = "PROMS Change Bar ID";
this.ResumeLayout(false); this.ResumeLayout(false);

View File

@@ -117,7 +117,8 @@ namespace VEPROMS.CSLA.Library
BtwnTextAndBottom = 1, BtwnTextAndBottom = 1,
BottomOfPage = 2, BottomOfPage = 2,
BelowBottom1 = 3, BelowBottom1 = 3,
EndOfText2 = 5 EndOfText2 = 5,
BtwnTextAndBottom2 = 6 // Added for BGE, their continue message was a line or so too far down page.1
}; };
[Flags] [Flags]
public enum E_DocStructStyle : ulong public enum E_DocStructStyle : ulong

View File

@@ -958,7 +958,7 @@ namespace Volian.Print.Library
} }
break; break;
case E_ContBottomLoc.BtwnTextAndBottom: // place continue string between end of text & bottom of page case E_ContBottomLoc.BtwnTextAndBottom: // place continue string between end of text & bottom of page
msg_yLocation = msg_yLocation + yLocation - ((yLocation - yBottomMargin) / 2); // +SixLinesPerInch; (need this for IP3) msg_yLocation = msg_yLocation + yLocation - ((yLocation - yBottomMargin) / 2); // +SixLinesPerInch; // (need this for IP3)
if (msg_yLocation < yBottomMargin) msg_yLocation = yBottomMargin; if (msg_yLocation < yBottomMargin) msg_yLocation = yBottomMargin;
break; break;
case E_ContBottomLoc.BottomOfPage: // place continue message at bottom of page case E_ContBottomLoc.BottomOfPage: // place continue message at bottom of page
@@ -971,6 +971,12 @@ namespace Volian.Print.Library
case E_ContBottomLoc.EndOfText2: // Like EndOfText but limited within yBottomMargin case E_ContBottomLoc.EndOfText2: // Like EndOfText but limited within yBottomMargin
msg_yLocation = Math.Max(msg_yLocation + yLocation - SixLinesPerInch, yBottomMargin + SixLinesPerInch); msg_yLocation = Math.Max(msg_yLocation + yLocation - SixLinesPerInch, yBottomMargin + SixLinesPerInch);
break; break;
case E_ContBottomLoc.BtwnTextAndBottom2:
// Like BtwnTextAndBottom but accounts for line spacing of step & is 1 line up on page (for BGE - Procedure Steps - 2 column)
float adj = (MyItemInfo.FormatStepData.StepLayoutData.EveryNLines == 1) ? SixLinesPerInch : 0;
msg_yLocation = msg_yLocation + yLocation - ((yLocation - yBottomMargin) / 2) + adj + SixLinesPerInch;
if (msg_yLocation < yBottomMargin) msg_yLocation = yBottomMargin;
break;
default: default:
_MyLog.WarnFormat("**** BOTTOM CONTINUE MESSAGE NOT CODED FOR LOCATION {0}*****", docstyle.Continue.Bottom.Location); _MyLog.WarnFormat("**** BOTTOM CONTINUE MESSAGE NOT CODED FOR LOCATION {0}*****", docstyle.Continue.Bottom.Location);
break; break;