Added button btnAnnoTypeApply to annotations section of folder properties.

Added button btnRevisionStageApply to revision stage section of folder properties.
This commit is contained in:
Rich 2013-06-21 03:21:42 +00:00
parent cce7f6cd8f
commit 3c479b08ba
3 changed files with 2470 additions and 2394 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1270,6 +1270,7 @@ namespace VEPROMS
if (btnAnnoTypeUndo.Enabled)
{
btnAnnoTypeUndo.Enabled = false;
btnAnnoTypeApply.Enabled = false;
//DialogResult dr = MessageBox.Show("The Annotation Description was changed. \n\nSave your Changes?", "Annotation Desctiption", MessageBoxButtons.YesNo);
//if (dr == DialogResult.Yes)
//{
@ -1284,6 +1285,7 @@ namespace VEPROMS
private void LoadLocalAnnotationTypeInfo()
{
btnAnnoTypeUndo.Enabled = false;
btnAnnoTypeApply.Enabled = false;
_LastAnnotationTypeInfoIndex = lbAnnotationTypes.SelectedIndex;
LocalAnnotationTypeInfo ai = lbAnnotationTypes.SelectedValue as LocalAnnotationTypeInfo;
@ -1292,6 +1294,7 @@ namespace VEPROMS
tbxAnnotationDescription.Text = "";
tbxAnnotationDescription.Enabled = false;
btnAnnoTypeUndo.Enabled = false;
btnAnnoTypeApply.Enabled = false;
btnAnnoTypeNew.Enabled = true;
btnAnnoTypeRemove.Enabled = false;
txbxRemoveMsg.Visible = false;
@ -1301,7 +1304,7 @@ namespace VEPROMS
tbxAnnotationDescription.Enabled = true;
tbxAnnotationDescription.Text = ai.Name;
btnAnnoTypeUndo.Enabled = false;
btnAnnoTypeApply.Enabled = false;
if (ai.AnnotationTypeAnnotationCount == 0)
{
btnAnnoTypeRemove.Enabled = true;
@ -1326,6 +1329,7 @@ namespace VEPROMS
private void tbxAnnotationDescription_TextChanged(object sender, EventArgs e)
{
btnAnnoTypeUndo.Enabled = true;
btnAnnoTypeApply.Enabled = true;
}
private void tiAnnoTypes_Click(object sender, EventArgs e)
@ -1346,6 +1350,7 @@ namespace VEPROMS
if (btnAnnoTypeUndo.Enabled) // save the current changes
{
btnAnnoTypeUndo.Enabled = false;
btnAnnoTypeApply.Enabled = false;
myLocalAnnotationTypeInfoList[_LastAnnotationTypeInfoIndex].Name = tbxAnnotationDescription.Text;
RefreshAnnotationTypeList();
}
@ -1354,6 +1359,7 @@ namespace VEPROMS
myLocalAnnotationTypeInfoList.Add(lati);
//myLocalAnnotationTypeInfoList.Add(new LocalAnnotationTypeInfo("New Annotation Type"));
btnAnnoTypeUndo.Enabled = false;
btnAnnoTypeApply.Enabled = false;
RefreshAnnotationTypeList();
btnAnnoTypeRemove.Enabled = true;
lbAnnotationTypes.SelectedIndex = lbAnnotationTypes.Items.Count - 1;
@ -1364,6 +1370,7 @@ namespace VEPROMS
{
tbxAnnotationDescription.Undo();
btnAnnoTypeUndo.Enabled = false;
btnAnnoTypeApply.Enabled = false;
//int saveIdx = lbAnnotationTypes.SelectedIndex;
//LocalAnnotationTypeInfo ai = lbAnnotationTypes.SelectedValue as LocalAnnotationTypeInfo;
//btnAnnoTypeSave.Enabled = false;
@ -1379,6 +1386,7 @@ namespace VEPROMS
int saveIdx = lbAnnotationTypes.SelectedIndex;
btnAnnoTypeRemove.Enabled = false;
btnAnnoTypeUndo.Enabled = false;
btnAnnoTypeApply.Enabled = false;
RefreshAnnotationTypeList();
if (saveIdx > lbAnnotationTypes.Items.Count - 1)
lbAnnotationTypes.SelectedIndex = saveIdx - 1;
@ -1428,6 +1436,7 @@ namespace VEPROMS
private void tbRevisionStage_TextChanged(object sender, EventArgs e)
{
btnRevisoinStageUndo.Enabled = true;
btnRevisionStageApply.Enabled = true;
}
@ -1438,6 +1447,7 @@ namespace VEPROMS
//myLocalStageInfoList.Add(new LocalStageInfo("New Stage", 0));
myLocalStageInfoList.Add(lsi);
btnRevisoinStageUndo.Enabled = false;
btnRevisionStageApply.Enabled = false;
RefreshRevisionStagesList();
btnRevisionStageRemove.Enabled = true;
lbRevisionStages.SelectedIndex = lbRevisionStages.Items.Count - 1;
@ -1457,6 +1467,7 @@ namespace VEPROMS
int savIdx = lbRevisionStages.SelectedIndex;
btnRevisionStageRemove.Enabled = false;
btnRevisoinStageUndo.Enabled = false;
btnRevisionStageApply.Enabled = false;
RefreshRevisionStagesList();
if (savIdx > lbRevisionStages.Items.Count - 1)
lbRevisionStages.SelectedIndex = savIdx - 1;
@ -1472,6 +1483,7 @@ namespace VEPROMS
{
tbRevisionStage.Undo();
btnRevisoinStageUndo.Enabled = false;
btnRevisionStageApply.Enabled = false;
LocalStageInfo si = lbRevisionStages.SelectedValue as LocalStageInfo;
rbApprovalStage.Checked = (si.IsApproved > 0);
rbWorkflowStage.Checked = (si.IsApproved == 0);
@ -1489,6 +1501,7 @@ namespace VEPROMS
if (btnRevisoinStageUndo.Enabled)
{
btnRevisoinStageUndo.Enabled = false;
btnRevisionStageApply.Enabled = false;
//DialogResult dr = MessageBox.Show("The Approval Stage Description was changed. \n\nSave your Changes?", "Approval Stage Desctiption", MessageBoxButtons.YesNo);
//if (dr == DialogResult.Yes)
//{
@ -1503,6 +1516,7 @@ namespace VEPROMS
private void LoadLocalStageInfo()
{
btnRevisoinStageUndo.Enabled = false;
btnRevisionStageApply.Enabled = false;
_LastStageInfoIndex = lbRevisionStages.SelectedIndex;
LocalStageInfo si = lbRevisionStages.SelectedValue as LocalStageInfo;
if (si == null)
@ -1510,6 +1524,7 @@ namespace VEPROMS
tbRevisionStage.Text = "";
tbRevisionStage.Enabled = false;
btnRevisoinStageUndo.Enabled = false;
btnRevisionStageApply.Enabled = false;
btnRevisionStageNew.Enabled = true;
btnRevisionStageRemove.Enabled = false;
return;
@ -1521,6 +1536,7 @@ namespace VEPROMS
else
rbWorkflowStage.Checked = true;
btnRevisoinStageUndo.Enabled = false;
btnRevisionStageApply.Enabled = false;
btnRevisionStageRemove.Enabled = true;
if (lbRevisionStages.SelectedIndex >= 0)
{
@ -1538,11 +1554,13 @@ namespace VEPROMS
private void rbWorkflowStage_CheckedChanged(object sender, EventArgs e)
{
btnRevisoinStageUndo.Enabled = true;
btnRevisionStageApply.Enabled = true;
}
private void rbApproveStage_CheckedChanged(object sender, EventArgs e)
{
btnRevisoinStageUndo.Enabled = true;
btnRevisionStageApply.Enabled = true;
}
private void tbRevisionStage_Validating(object sender, CancelEventArgs e)
@ -1599,6 +1617,29 @@ namespace VEPROMS
}
#endregion
private void btnRevisionStageApply_Click(object sender, EventArgs e)
{
//add code to apply changes
btnRevisoinStageUndo.Enabled = false;
btnRevisionStageApply.Enabled = false;
LocalStageInfo si = lbRevisionStages.SelectedValue as LocalStageInfo;
//rbApprovalStage.Checked = (si.IsApproved > 0);
//rbWorkflowStage.Checked = (si.IsApproved == 0);
si.Name = tbRevisionStage.Text;
si.IsApproved = rbApprovalStage.Checked ? 1 : 0;
RefreshRevisionStagesList();
}
private void btnAnnoTypeApply_Click(object sender, EventArgs e)
{
//add code
btnAnnoTypeUndo.Enabled = false;
btnAnnoTypeApply.Enabled = false;
LocalAnnotationTypeInfo ati = lbAnnotationTypes.SelectedValue as LocalAnnotationTypeInfo;
ati.Name = tbxAnnotationDescription.Text;
RefreshAnnotationTypeList();
}
}
public partial class LocalStageInfo

View File

@ -131,6 +131,9 @@ Check "Show Default Settings" to display the "default" graphic file extension se
<metadata name="imageCodecInfoBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>665, 17</value>
</metadata>
<metadata name="imageCodecInfoBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>665, 17</value>
</metadata>
<data name="ppBtnDeftDisAutoDuplx.SuperTooltip" xml:space="preserve">
<value>This will revert the Disable Automatic Duplexing selection back to using the parent's (default) setting.