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:
Rich 2011-04-30 12:47:44 +00:00
parent b2e7b55bd8
commit 55eafe8115
4 changed files with 21 additions and 12 deletions

View File

@ -220,6 +220,7 @@ namespace Sync
this.dgv.Name = "dgv";
this.dgv.Size = new System.Drawing.Size(759, 283);
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);
//
// cms

View File

@ -46,6 +46,7 @@ namespace Sync
btnBrwsSS.Tag = this.tbSourceSafe;
btnBrwsMail.Tag = this.tbMailBox;
btnBrwsSSMail.Tag = this.tbSSMailBox;
}
private void btnBrowse_Click(object sender, EventArgs e)
{
@ -423,5 +424,12 @@ namespace Sync
Clipboard.SetText(sb.ToString());
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;
}
}
}

View File

@ -619,7 +619,7 @@ namespace VEPROMS.CSLA.Library
MyApp.ActiveDocument.Close(false);
if (CloseWordWhenDone)
{
CloseApp();
CloseAppAfterWait();
}
return fileName;
}
@ -662,21 +662,21 @@ namespace VEPROMS.CSLA.Library
myDoc.PageSetup.BottomMargin = (11 * 72) - newLength;
}
}
//public static void CloseApp()
//{
// WaitMS(900);// This was added because MSWord will sometimes get the error below
// // Microsoft Office Word has stopped working
// // It appears that this is caused by quiting the MS Word application
// // to soon after closing the document or doing an export.
// MyApp.Quit(false);
// _MyApp = null;
//}
public static void CloseApp()
{
//WaitMS(900);// This was added because MSWord will sometimes get the error below
// Microsoft Office Word has stopped working
// It appears that this is caused by quiting the MS Word application
// to soon after closing the document or doing an export.
MyApp.Quit(false);
_MyApp = null;
}
/// <summary>
/// This closes the MS Word Application, but, delays for about 1 second.
/// It appears that closing MSWord to quickly causes a:
/// "Microsoft Office Word has stopped working" error.
/// </summary>
public static void CloseApp()
public static void CloseAppAfterWait()
{
System.Windows.Forms.Application.DoEvents();
new CloseWordApp(_MyApp, 1000);

View File

@ -1612,7 +1612,7 @@ namespace VEPROMS.CSLA.Library
if (sc == null) return false;
// if there is no override & return whether there was a change to the text.
if (sc.Step_CBOverride == null)
return (DTS > MyProcedure.DTS);
return (MyContent.DTS > MyProcedure.DTS);
else // override is on:
return (sc.Step_CBOverride == "On");
}