Select row when you right-click to open context menu
Use two separate modules to close MSWord application for DataLoader and PDF Creation. Use the Content DTS to determine ChangeBar status.
This commit is contained in:
parent
b2e7b55bd8
commit
55eafe8115
1
PROMS/Sync/Sync/frmSync.Designer.cs
generated
1
PROMS/Sync/Sync/frmSync.Designer.cs
generated
@ -220,6 +220,7 @@ namespace Sync
|
|||||||
this.dgv.Name = "dgv";
|
this.dgv.Name = "dgv";
|
||||||
this.dgv.Size = new System.Drawing.Size(759, 283);
|
this.dgv.Size = new System.Drawing.Size(759, 283);
|
||||||
this.dgv.TabIndex = 2;
|
this.dgv.TabIndex = 2;
|
||||||
|
this.dgv.MouseDown += new System.Windows.Forms.MouseEventHandler(this.dgv_MouseDown);
|
||||||
this.dgv.ColumnWidthChanged += new System.Windows.Forms.DataGridViewColumnEventHandler(this.dgv_ColumnWidthChanged);
|
this.dgv.ColumnWidthChanged += new System.Windows.Forms.DataGridViewColumnEventHandler(this.dgv_ColumnWidthChanged);
|
||||||
//
|
//
|
||||||
// cms
|
// cms
|
||||||
|
@ -46,6 +46,7 @@ namespace Sync
|
|||||||
btnBrwsSS.Tag = this.tbSourceSafe;
|
btnBrwsSS.Tag = this.tbSourceSafe;
|
||||||
btnBrwsMail.Tag = this.tbMailBox;
|
btnBrwsMail.Tag = this.tbMailBox;
|
||||||
btnBrwsSSMail.Tag = this.tbSSMailBox;
|
btnBrwsSSMail.Tag = this.tbSSMailBox;
|
||||||
|
|
||||||
}
|
}
|
||||||
private void btnBrowse_Click(object sender, EventArgs e)
|
private void btnBrowse_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@ -423,5 +424,12 @@ namespace Sync
|
|||||||
Clipboard.SetText(sb.ToString());
|
Clipboard.SetText(sb.ToString());
|
||||||
MessageBox.Show(sb.ToString(), "Copied to Clipboard", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
MessageBox.Show(sb.ToString(), "Copied to Clipboard", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
}
|
}
|
||||||
|
private void dgv_MouseDown(object sender, MouseEventArgs e)
|
||||||
|
{
|
||||||
|
dgv.ClearSelection();
|
||||||
|
DataGridView.HitTestInfo info = dgv.HitTest(e.X, e.Y);
|
||||||
|
dgv.CurrentCell = dgv[0, info.RowIndex];
|
||||||
|
dgv.Rows[info.RowIndex].Selected = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -619,7 +619,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
MyApp.ActiveDocument.Close(false);
|
MyApp.ActiveDocument.Close(false);
|
||||||
if (CloseWordWhenDone)
|
if (CloseWordWhenDone)
|
||||||
{
|
{
|
||||||
CloseApp();
|
CloseAppAfterWait();
|
||||||
}
|
}
|
||||||
return fileName;
|
return fileName;
|
||||||
}
|
}
|
||||||
@ -662,21 +662,21 @@ namespace VEPROMS.CSLA.Library
|
|||||||
myDoc.PageSetup.BottomMargin = (11 * 72) - newLength;
|
myDoc.PageSetup.BottomMargin = (11 * 72) - newLength;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//public static void CloseApp()
|
public static void CloseApp()
|
||||||
//{
|
{
|
||||||
// WaitMS(900);// This was added because MSWord will sometimes get the error below
|
//WaitMS(900);// This was added because MSWord will sometimes get the error below
|
||||||
// // Microsoft Office Word has stopped working
|
// Microsoft Office Word has stopped working
|
||||||
// // It appears that this is caused by quiting the MS Word application
|
// It appears that this is caused by quiting the MS Word application
|
||||||
// // to soon after closing the document or doing an export.
|
// to soon after closing the document or doing an export.
|
||||||
// MyApp.Quit(false);
|
MyApp.Quit(false);
|
||||||
// _MyApp = null;
|
_MyApp = null;
|
||||||
//}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This closes the MS Word Application, but, delays for about 1 second.
|
/// This closes the MS Word Application, but, delays for about 1 second.
|
||||||
/// It appears that closing MSWord to quickly causes a:
|
/// It appears that closing MSWord to quickly causes a:
|
||||||
/// "Microsoft Office Word has stopped working" error.
|
/// "Microsoft Office Word has stopped working" error.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static void CloseApp()
|
public static void CloseAppAfterWait()
|
||||||
{
|
{
|
||||||
System.Windows.Forms.Application.DoEvents();
|
System.Windows.Forms.Application.DoEvents();
|
||||||
new CloseWordApp(_MyApp, 1000);
|
new CloseWordApp(_MyApp, 1000);
|
||||||
|
@ -1612,7 +1612,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
if (sc == null) return false;
|
if (sc == null) return false;
|
||||||
// if there is no override & return whether there was a change to the text.
|
// if there is no override & return whether there was a change to the text.
|
||||||
if (sc.Step_CBOverride == null)
|
if (sc.Step_CBOverride == null)
|
||||||
return (DTS > MyProcedure.DTS);
|
return (MyContent.DTS > MyProcedure.DTS);
|
||||||
else // override is on:
|
else // override is on:
|
||||||
return (sc.Step_CBOverride == "On");
|
return (sc.Step_CBOverride == "On");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user