Compare commits
1 Commits
B2024-046-
...
B2024-032-
Author | SHA1 | Date | |
---|---|---|---|
df9736f0fd |
@@ -241,21 +241,6 @@ namespace JR.Utils.GUI.Forms
|
|||||||
return FlexibleMessageBoxForm.Show(owner, text, caption, buttons, icon, defaultButton);
|
return FlexibleMessageBoxForm.Show(owner, text, caption, buttons, icon, defaultButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Shows the specified message box.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="owner">The owner.</param>
|
|
||||||
/// <param name="text">The text.</param>
|
|
||||||
/// <param name="caption">The caption.</param>
|
|
||||||
/// <param name="buttons">The buttons.</param>
|
|
||||||
/// <param name="icon">The icon.</param>
|
|
||||||
/// <param name="defaultButton">The default button.</param>
|
|
||||||
/// <returns>The dialog result.</returns>
|
|
||||||
public static DialogResult ShowCustom(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon)
|
|
||||||
{
|
|
||||||
return FlexibleMessageBoxForm.ShowCustom(null, text, caption, buttons, icon);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Internal form class
|
#region Internal form class
|
||||||
@@ -435,15 +420,15 @@ namespace JR.Utils.GUI.Forms
|
|||||||
private static readonly String STANDARD_MESSAGEBOX_SEPARATOR_SPACES = " ";
|
private static readonly String STANDARD_MESSAGEBOX_SEPARATOR_SPACES = " ";
|
||||||
|
|
||||||
//These are the possible buttons (in a standard MessageBox)
|
//These are the possible buttons (in a standard MessageBox)
|
||||||
private enum ButtonID { OK = 0, CANCEL, YES, NO, ABORT, RETRY, IGNORE, OVERWRITE, RENAME };
|
private enum ButtonID { OK = 0, CANCEL, YES, NO, ABORT, RETRY, IGNORE };
|
||||||
|
|
||||||
//These are the buttons texts for different languages.
|
//These are the buttons texts for different languages.
|
||||||
//If you want to add a new language, add it here and in the GetButtonText-Function
|
//If you want to add a new language, add it here and in the GetButtonText-Function
|
||||||
private enum TwoLetterISOLanguageID { en, de, es, it };
|
private enum TwoLetterISOLanguageID { en, de, es, it };
|
||||||
private static readonly String[] BUTTON_TEXTS_ENGLISH_EN = { "OK", "Cancel", "&Yes", "&No", "&Abort", "&Retry", "&Ignore", "&Overwrite", "&Rename" }; //Note: This is also the fallback language
|
private static readonly String[] BUTTON_TEXTS_ENGLISH_EN = { "OK", "Cancel", "&Yes", "&No", "&Abort", "&Retry", "&Ignore" }; //Note: This is also the fallback language
|
||||||
private static readonly String[] BUTTON_TEXTS_GERMAN_DE = { "OK", "Abbrechen", "&Ja", "&Nein", "&Abbrechen", "&Wiederholen", "&Ignorieren", "&Overwrite", "&Rename" };
|
private static readonly String[] BUTTON_TEXTS_GERMAN_DE = { "OK", "Abbrechen", "&Ja", "&Nein", "&Abbrechen", "&Wiederholen", "&Ignorieren" };
|
||||||
private static readonly String[] BUTTON_TEXTS_SPANISH_ES = { "Aceptar", "Cancelar", "&Sí", "&No", "&Abortar", "&Reintentar", "&Ignorar", "&Overwrite", "&Rename" };
|
private static readonly String[] BUTTON_TEXTS_SPANISH_ES = { "Aceptar", "Cancelar", "&Sí", "&No", "&Abortar", "&Reintentar", "&Ignorar" };
|
||||||
private static readonly String[] BUTTON_TEXTS_ITALIAN_IT = { "OK", "Annulla", "&Sì", "&No", "&Interrompi", "&Riprova", "&Ignora", "&Overwrite", "&Rename" };
|
private static readonly String[] BUTTON_TEXTS_ITALIAN_IT = { "OK", "Annulla", "&Sì", "&No", "&Interrompi", "&Riprova", "&Ignora" };
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -708,7 +693,6 @@ namespace JR.Utils.GUI.Forms
|
|||||||
|
|
||||||
flexibleMessageBoxForm.CancelButton = flexibleMessageBoxForm.button3;
|
flexibleMessageBoxForm.CancelButton = flexibleMessageBoxForm.button3;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case MessageBoxButtons.OK:
|
case MessageBoxButtons.OK:
|
||||||
default:
|
default:
|
||||||
@@ -725,38 +709,16 @@ namespace JR.Utils.GUI.Forms
|
|||||||
flexibleMessageBoxForm.defaultButton = defaultButton;
|
flexibleMessageBoxForm.defaultButton = defaultButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void SetDialogButtonsCustom(FlexibleMessageBoxForm flexibleMessageBoxForm)
|
#endregion
|
||||||
{
|
|
||||||
flexibleMessageBoxForm.visibleButtonsCount = 3;
|
|
||||||
|
|
||||||
flexibleMessageBoxForm.button1.Visible = true;
|
#region Private event handlers
|
||||||
flexibleMessageBoxForm.button1.Text = flexibleMessageBoxForm.GetButtonText(ButtonID.CANCEL);
|
|
||||||
flexibleMessageBoxForm.button1.DialogResult = DialogResult.Abort;
|
|
||||||
|
|
||||||
flexibleMessageBoxForm.button2.Visible = true;
|
/// <summary>
|
||||||
flexibleMessageBoxForm.button2.Text = flexibleMessageBoxForm.GetButtonText(ButtonID.OVERWRITE);
|
/// Handles the Shown event of the FlexibleMessageBoxForm control.
|
||||||
flexibleMessageBoxForm.button2.DialogResult = DialogResult.Retry;
|
/// </summary>
|
||||||
|
/// <param name="sender">The source of the event.</param>
|
||||||
flexibleMessageBoxForm.button3.Visible = true;
|
/// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
|
||||||
flexibleMessageBoxForm.button3.Text = flexibleMessageBoxForm.GetButtonText(ButtonID.RENAME);
|
private void FlexibleMessageBoxForm_Shown(object sender, EventArgs e)
|
||||||
flexibleMessageBoxForm.button3.DialogResult = DialogResult.Ignore;
|
|
||||||
|
|
||||||
flexibleMessageBoxForm.ControlBox = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Private event handlers
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Handles the Shown event of the FlexibleMessageBoxForm control.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="sender">The source of the event.</param>
|
|
||||||
/// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
|
|
||||||
private void FlexibleMessageBoxForm_Shown(object sender, EventArgs e)
|
|
||||||
{
|
{
|
||||||
int buttonIndexToFocus = 1;
|
int buttonIndexToFocus = 1;
|
||||||
Button buttonToFocus;
|
Button buttonToFocus;
|
||||||
@@ -904,46 +866,6 @@ namespace JR.Utils.GUI.Forms
|
|||||||
return flexibleMessageBoxForm.ShowDialog(owner);
|
return flexibleMessageBoxForm.ShowDialog(owner);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Shows the specified message box.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="owner">The owner.</param>
|
|
||||||
/// <param name="text">The text.</param>
|
|
||||||
/// <param name="caption">The caption.</param>
|
|
||||||
/// <param name="buttons">The buttons.</param>
|
|
||||||
/// <param name="icon">The icon.</param>
|
|
||||||
/// <param name="defaultButton">The default button.</param>
|
|
||||||
/// <returns>The dialog result.</returns>
|
|
||||||
public static DialogResult ShowCustom(IWin32Window owner, string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon)
|
|
||||||
{
|
|
||||||
//Create a new instance of the FlexibleMessageBox form
|
|
||||||
var flexibleMessageBoxForm = new FlexibleMessageBoxForm();
|
|
||||||
flexibleMessageBoxForm.ShowInTaskbar = false;
|
|
||||||
|
|
||||||
//Bind the caption and the message text
|
|
||||||
flexibleMessageBoxForm.CaptionText = caption;
|
|
||||||
flexibleMessageBoxForm.MessageText = text;
|
|
||||||
flexibleMessageBoxForm.FlexibleMessageBoxFormBindingSource.DataSource = flexibleMessageBoxForm;
|
|
||||||
|
|
||||||
//Set the buttons visibilities and texts. Also set a default button.
|
|
||||||
SetDialogButtonsCustom(flexibleMessageBoxForm);
|
|
||||||
|
|
||||||
//Set the dialogs icon. When no icon is used: Correct placement and width of rich text box.
|
|
||||||
SetDialogIcon(flexibleMessageBoxForm, icon);
|
|
||||||
|
|
||||||
//Set the font for all controls
|
|
||||||
flexibleMessageBoxForm.Font = FONT;
|
|
||||||
flexibleMessageBoxForm.richTextBoxMessage.Font = FONT;
|
|
||||||
|
|
||||||
//Calculate the dialogs start size (Try to auto-size width to show longest text row). Also set the maximum dialog size.
|
|
||||||
SetDialogSizes(flexibleMessageBoxForm, text, caption);
|
|
||||||
|
|
||||||
//Set the dialogs start position when given. Otherwise center the dialog on the current screen.
|
|
||||||
SetDialogStartPosition(flexibleMessageBoxForm, owner);
|
|
||||||
//Show the dialog
|
|
||||||
return flexibleMessageBoxForm.ShowDialog(owner);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
} //class FlexibleMessageBoxForm
|
} //class FlexibleMessageBoxForm
|
||||||
|
|
||||||
|
@@ -126,7 +126,6 @@
|
|||||||
<Content Include="fmtall\BVPSAOPall.xml" />
|
<Content Include="fmtall\BVPSAOPall.xml" />
|
||||||
<Content Include="fmtall\BVPSAtchall.xml" />
|
<Content Include="fmtall\BVPSAtchall.xml" />
|
||||||
<Content Include="fmtall\BVPSBCKall.xml" />
|
<Content Include="fmtall\BVPSBCKall.xml" />
|
||||||
<Content Include="fmtall\BVPSAOPDEVall.xml" />
|
|
||||||
<Content Include="fmtall\BVPSFlexDEVall.xml" />
|
<Content Include="fmtall\BVPSFlexDEVall.xml" />
|
||||||
<Content Include="fmtall\BVPSDEVall.xml" />
|
<Content Include="fmtall\BVPSDEVall.xml" />
|
||||||
<Content Include="fmtall\BVPSNIBCKall.xml" />
|
<Content Include="fmtall\BVPSNIBCKall.xml" />
|
||||||
@@ -407,7 +406,6 @@
|
|||||||
<Content Include="genmacall\BVPSAOP.svg" />
|
<Content Include="genmacall\BVPSAOP.svg" />
|
||||||
<Content Include="genmacall\BVPSAtch.svg" />
|
<Content Include="genmacall\BVPSAtch.svg" />
|
||||||
<Content Include="genmacall\BVPSbck.svg" />
|
<Content Include="genmacall\BVPSbck.svg" />
|
||||||
<Content Include="genmacall\BVPSAOPdev.svg" />
|
|
||||||
<Content Include="genmacall\BVPSFlexdev.svg" />
|
<Content Include="genmacall\BVPSFlexdev.svg" />
|
||||||
<Content Include="genmacall\BVPSdev.svg" />
|
<Content Include="genmacall\BVPSdev.svg" />
|
||||||
<Content Include="genmacall\BVPSNIBCK.svg" />
|
<Content Include="genmacall\BVPSNIBCK.svg" />
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1320,10 +1320,6 @@ namespace VEPROMS
|
|||||||
if (swtbtnPDFLinks.Value)
|
if (swtbtnPDFLinks.Value)
|
||||||
swtbtnPDFdtPrefixSuffix.Value = false;
|
swtbtnPDFdtPrefixSuffix.Value = false;
|
||||||
BuildPDFFileName();
|
BuildPDFFileName();
|
||||||
// C2024-013: When Create RO & Transition Hyperlinks in pdf is ON, disable the MergePdf
|
|
||||||
// button. The Create RO & Transition Hyperlinks option looks for individual file names
|
|
||||||
// for procedures.
|
|
||||||
btnMergePDFs.Enabled = !swtbtnPDFLinks.Value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// C2019-004: Allow user to define duplex blank page text. The text box for blank page text is always enabled for procedures with
|
// C2019-004: Allow user to define duplex blank page text. The text box for blank page text is always enabled for procedures with
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -99,10 +99,7 @@
|
|||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="C1.Win.2, Version=2.0.20213.532, Culture=neutral, PublicKeyToken=944ae1ea0e47ca04" />
|
|
||||||
<Reference Include="C1.Win.C1Command.2, Version=2.0.20213.532, Culture=neutral, PublicKeyToken=e808566f358766d8" />
|
|
||||||
<Reference Include="C1.Win.C1FlexGrid.2, Version=2.0.20213.532, Culture=neutral, PublicKeyToken=79882d576c6336da, processorArchitecture=MSIL" />
|
<Reference Include="C1.Win.C1FlexGrid.2, Version=2.0.20213.532, Culture=neutral, PublicKeyToken=79882d576c6336da, processorArchitecture=MSIL" />
|
||||||
<Reference Include="C1.Win.C1Input.2, Version=2.0.20213.532, Culture=neutral, PublicKeyToken=7e7ff60f0c214f9a, processorArchitecture=MSIL" />
|
|
||||||
<Reference Include="Csla">
|
<Reference Include="Csla">
|
||||||
<HintPath>..\..\..\..\3rdPartyLibraries\CSLA\Csla.dll</HintPath>
|
<HintPath>..\..\..\..\3rdPartyLibraries\CSLA\Csla.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
@@ -223,12 +220,6 @@
|
|||||||
<Compile Include="dlgUCFDetail.Designer.cs">
|
<Compile Include="dlgUCFDetail.Designer.cs">
|
||||||
<DependentUpon>dlgUCFDetail.cs</DependentUpon>
|
<DependentUpon>dlgUCFDetail.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="frmAnnotationsCleanup.cs">
|
|
||||||
<SubType>Form</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="frmAnnotationsCleanup.Designer.cs">
|
|
||||||
<DependentUpon>frmAnnotationsCleanup.cs</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="frmBatchRefresh.cs">
|
<Compile Include="frmBatchRefresh.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -340,9 +331,6 @@
|
|||||||
<EmbeddedResource Include="dlgUCFDetail.resx">
|
<EmbeddedResource Include="dlgUCFDetail.resx">
|
||||||
<DependentUpon>dlgUCFDetail.cs</DependentUpon>
|
<DependentUpon>dlgUCFDetail.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="frmAnnotationsCleanup.resx">
|
|
||||||
<DependentUpon>frmAnnotationsCleanup.cs</DependentUpon>
|
|
||||||
</EmbeddedResource>
|
|
||||||
<EmbeddedResource Include="frmPDFStatusForm.resx">
|
<EmbeddedResource Include="frmPDFStatusForm.resx">
|
||||||
<DependentUpon>frmPDFStatusForm.cs</DependentUpon>
|
<DependentUpon>frmPDFStatusForm.cs</DependentUpon>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
@@ -626,4 +614,4 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PreBuildEvent>cmd /c "$(ProjectDir)FixRev.bat"</PreBuildEvent>
|
<PreBuildEvent>cmd /c "$(ProjectDir)FixRev.bat"</PreBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
@@ -99,10 +99,6 @@ namespace VEPROMS
|
|||||||
MyProcedure = procedureInfo;
|
MyProcedure = procedureInfo;
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
this.Text = mode + " Dialog for " + procedureInfo.DisplayNumber;
|
this.Text = mode + " Dialog for " + procedureInfo.DisplayNumber;
|
||||||
|
|
||||||
//Preset path for single procedures.
|
|
||||||
PEIPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\VEPROMS\PEI_" + Database.VEPROMS_SqlConnection.Database;
|
|
||||||
txtExport.Text = string.Format(@"{0}\{1}.pxml", PEIPath, MyProcedure.DisplayNumber.Replace("/", "_").Replace("\\", "_"));
|
|
||||||
}
|
}
|
||||||
private void dlgExportImport_Load(object sender, EventArgs e)
|
private void dlgExportImport_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@@ -176,7 +172,6 @@ namespace VEPROMS
|
|||||||
}
|
}
|
||||||
else if (MyProcedure != null)
|
else if (MyProcedure != null)
|
||||||
{
|
{
|
||||||
txtExport.Enabled = true;
|
|
||||||
txtExport.Text = string.Format(@"{0}\{1}.pxml", PEIPath, MyProcedure.DisplayNumber.Replace("/", "_").Replace("\\", "_"));
|
txtExport.Text = string.Format(@"{0}\{1}.pxml", PEIPath, MyProcedure.DisplayNumber.Replace("/", "_").Replace("\\", "_"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -195,8 +190,6 @@ namespace VEPROMS
|
|||||||
private bool successfullExport = true;
|
private bool successfullExport = true;
|
||||||
private void btnDoExport_Click(object sender, EventArgs e)
|
private void btnDoExport_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
btnExport.Enabled = false;
|
btnExport.Enabled = false;
|
||||||
string msg = "Finished Exporting:\n\n";
|
string msg = "Finished Exporting:\n\n";
|
||||||
if (_MyMode.ToUpper().Contains("FORMAT"))
|
if (_MyMode.ToUpper().Contains("FORMAT"))
|
||||||
@@ -227,42 +220,6 @@ namespace VEPROMS
|
|||||||
}
|
}
|
||||||
else if (MyProcedure != null)
|
else if (MyProcedure != null)
|
||||||
{
|
{
|
||||||
var fileLocation = txtExport.Text;
|
|
||||||
if (File.Exists(fileLocation))
|
|
||||||
{ // C2022-029 if an existing export of the same name is found, provide option to overwrite it
|
|
||||||
DialogResult ovewriteEx = FlexibleMessageBox.ShowCustom(null, "There is already another export file with the same name. You can choose to either overwrite the existing file or have the existing file renamed with the original creation date appended.\r\n\r\nSelecting 'Cancel' will cancel the export.", "What would you like to do?", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);// == DialogResult.Yes;
|
|
||||||
|
|
||||||
// Extract directory, filename, and extension
|
|
||||||
string directory = Path.GetDirectoryName(fileLocation);
|
|
||||||
string filename = Path.GetFileNameWithoutExtension(fileLocation);
|
|
||||||
string extension = Path.GetExtension(fileLocation);
|
|
||||||
fileLocation = $"{directory}\\{filename}{extension}";
|
|
||||||
|
|
||||||
if (ovewriteEx == DialogResult.Abort)
|
|
||||||
{
|
|
||||||
MessageBox.Show("Export has been cancelled", "You have chosen to cancel the export.", MessageBoxButtons.OK, MessageBoxIcon.Information); // C2020-042 changed mesage box title
|
|
||||||
btnCloseExport.Enabled = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if (ovewriteEx == DialogResult.Retry)
|
|
||||||
{
|
|
||||||
//Overwrite will occur, set msg.
|
|
||||||
msg = "The export file has been overwritten. ";
|
|
||||||
}
|
|
||||||
else if (ovewriteEx == DialogResult.Ignore)
|
|
||||||
{
|
|
||||||
// Get the modified date of the existing file, create a datestamp for use in name, set newlocation to move to
|
|
||||||
DateTime modifiedDate = File.GetLastWriteTime(fileLocation);
|
|
||||||
string datestamp = modifiedDate.ToString("yyyyMMddHHmmss");
|
|
||||||
string newFileLocation = $"{directory}\\{filename}_{datestamp}{extension}";
|
|
||||||
|
|
||||||
//Move and set msg.
|
|
||||||
File.Move(fileLocation, newFileLocation);
|
|
||||||
msg = "The previous export has been renamed, the export file has been created. ";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
this.Cursor = Cursors.WaitCursor;
|
this.Cursor = Cursors.WaitCursor;
|
||||||
MyStart = DateTime.Now;
|
MyStart = DateTime.Now;
|
||||||
btnDoExport.Enabled = false;
|
btnDoExport.Enabled = false;
|
||||||
@@ -273,7 +230,7 @@ namespace VEPROMS
|
|||||||
XmlElement xe = xd.CreateElement("formats");
|
XmlElement xe = xd.CreateElement("formats");
|
||||||
xd.DocumentElement.AppendChild(xe);
|
xd.DocumentElement.AppendChild(xe);
|
||||||
ExportFormats(FormatInfoList.GetFormatInfoListUsed(), xe, "formats", false);
|
ExportFormats(FormatInfoList.GetFormatInfoListUsed(), xe, "formats", false);
|
||||||
xd.Save(fileLocation);
|
xd.Save(txtExport.Text);
|
||||||
TimeSpan elapsed = DateTime.Now.Subtract(MyStart);
|
TimeSpan elapsed = DateTime.Now.Subtract(MyStart);
|
||||||
lblExportStatus.Text = "Export Completed in " + elapsed.ToString();
|
lblExportStatus.Text = "Export Completed in " + elapsed.ToString();
|
||||||
this.Cursor = Cursors.Default;
|
this.Cursor = Cursors.Default;
|
||||||
@@ -749,7 +706,7 @@ namespace VEPROMS
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
FlexibleMessageBox.Show(null, "The import failed, check the error log for more information.", "Import Failed", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
FlexibleMessageBox.Show("The import failed, check the error log for more information.", "Import Failed", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||||
_MyLog.Warn("Failure During Import", ex);
|
_MyLog.Warn("Failure During Import", ex);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@@ -400,7 +400,6 @@ namespace VEPROMS
|
|||||||
this.pnlImport.PerformLayout();
|
this.pnlImport.PerformLayout();
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@@ -1,132 +0,0 @@
|
|||||||
|
|
||||||
using VEPROMS.CSLA.Library;
|
|
||||||
using Volian.Base.Library;
|
|
||||||
namespace VEPROMS
|
|
||||||
{
|
|
||||||
partial class frmAnnotationsCleanup
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Required designer variable.
|
|
||||||
/// </summary>
|
|
||||||
private System.ComponentModel.IContainer components = null;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Clean up any resources being used.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
|
||||||
protected override void Dispose(bool disposing)
|
|
||||||
{
|
|
||||||
if (disposing && (components != null))
|
|
||||||
{
|
|
||||||
components.Dispose();
|
|
||||||
}
|
|
||||||
base.Dispose(disposing);
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Windows Form Designer generated code
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Required method for Designer support - do not modify
|
|
||||||
/// the contents of this method with the code editor.
|
|
||||||
/// </summary>
|
|
||||||
private void InitializeComponent()
|
|
||||||
{
|
|
||||||
this.components = new System.ComponentModel.Container();
|
|
||||||
this.lbAnnotationTypes = new System.Windows.Forms.ListBox();
|
|
||||||
this.itemAnnotationsBindingSource = new System.Windows.Forms.BindingSource(this.components);
|
|
||||||
this.lblAnnotationsList = new System.Windows.Forms.Label();
|
|
||||||
this.btnClean = new System.Windows.Forms.Button();
|
|
||||||
this.lblCountNumber = new System.Windows.Forms.Label();
|
|
||||||
this.lblCount = new System.Windows.Forms.Label();
|
|
||||||
this.btnClose = new System.Windows.Forms.Button();
|
|
||||||
((System.ComponentModel.ISupportInitialize)(this.itemAnnotationsBindingSource)).BeginInit();
|
|
||||||
this.SuspendLayout();
|
|
||||||
//
|
|
||||||
// lbAnnotationTypes
|
|
||||||
//
|
|
||||||
this.lbAnnotationTypes.DataSource = this.itemAnnotationsBindingSource;
|
|
||||||
this.lbAnnotationTypes.FormattingEnabled = true;
|
|
||||||
this.lbAnnotationTypes.Location = new System.Drawing.Point(25, 48);
|
|
||||||
this.lbAnnotationTypes.Name = "lbAnnotationTypes";
|
|
||||||
this.lbAnnotationTypes.Size = new System.Drawing.Size(295, 433);
|
|
||||||
this.lbAnnotationTypes.TabIndex = 0;
|
|
||||||
//
|
|
||||||
// lblAnnotationsList
|
|
||||||
//
|
|
||||||
this.lblAnnotationsList.AutoSize = true;
|
|
||||||
this.lblAnnotationsList.Location = new System.Drawing.Point(26, 21);
|
|
||||||
this.lblAnnotationsList.Name = "lblAnnotationsList";
|
|
||||||
this.lblAnnotationsList.Size = new System.Drawing.Size(175, 13);
|
|
||||||
this.lblAnnotationsList.TabIndex = 1;
|
|
||||||
this.lblAnnotationsList.Text = "Select an Annotation Type to Clean";
|
|
||||||
//
|
|
||||||
// btnClean
|
|
||||||
//
|
|
||||||
this.btnClean.Location = new System.Drawing.Point(365, 164);
|
|
||||||
this.btnClean.Name = "btnClean";
|
|
||||||
this.btnClean.Size = new System.Drawing.Size(131, 36);
|
|
||||||
this.btnClean.TabIndex = 2;
|
|
||||||
this.btnClean.Text = "Proceed?";
|
|
||||||
this.btnClean.UseVisualStyleBackColor = true;
|
|
||||||
this.btnClean.Click += new System.EventHandler(this.button1_Click);
|
|
||||||
//
|
|
||||||
// lblCountNumber
|
|
||||||
//
|
|
||||||
this.lblCountNumber.AutoSize = true;
|
|
||||||
this.lblCountNumber.Location = new System.Drawing.Point(395, 100);
|
|
||||||
this.lblCountNumber.Name = "lblCountNumber";
|
|
||||||
this.lblCountNumber.Size = new System.Drawing.Size(69, 13);
|
|
||||||
this.lblCountNumber.TabIndex = 3;
|
|
||||||
this.lblCountNumber.Text = "Delete Count";
|
|
||||||
this.lblCountNumber.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
|
||||||
//
|
|
||||||
// lblCount
|
|
||||||
//
|
|
||||||
this.lblCount.AutoSize = true;
|
|
||||||
this.lblCount.Location = new System.Drawing.Point(331, 70);
|
|
||||||
this.lblCount.Name = "lblCount";
|
|
||||||
this.lblCount.Size = new System.Drawing.Size(206, 13);
|
|
||||||
this.lblCount.TabIndex = 4;
|
|
||||||
this.lblCount.Text = "Number of Annotations that will be deleted";
|
|
||||||
//
|
|
||||||
// btnClose
|
|
||||||
//
|
|
||||||
this.btnClose.Location = new System.Drawing.Point(397, 457);
|
|
||||||
this.btnClose.Name = "btnClose";
|
|
||||||
this.btnClose.Size = new System.Drawing.Size(75, 23);
|
|
||||||
this.btnClose.TabIndex = 5;
|
|
||||||
this.btnClose.Text = "Close";
|
|
||||||
this.btnClose.UseVisualStyleBackColor = true;
|
|
||||||
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
|
|
||||||
//
|
|
||||||
// frmAnnotationsCleanup
|
|
||||||
//
|
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
|
||||||
this.ClientSize = new System.Drawing.Size(549, 535);
|
|
||||||
this.Controls.Add(this.btnClose);
|
|
||||||
this.Controls.Add(this.lblCount);
|
|
||||||
this.Controls.Add(this.lblCountNumber);
|
|
||||||
this.Controls.Add(this.btnClean);
|
|
||||||
this.Controls.Add(this.lblAnnotationsList);
|
|
||||||
this.Controls.Add(this.lbAnnotationTypes);
|
|
||||||
this.Name = "frmAnnotationsCleanup";
|
|
||||||
this.Text = "Clean Annotations";
|
|
||||||
((System.ComponentModel.ISupportInitialize)(this.itemAnnotationsBindingSource)).EndInit();
|
|
||||||
this.ResumeLayout(false);
|
|
||||||
this.PerformLayout();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
private System.Windows.Forms.ListBox lbAnnotationTypes;
|
|
||||||
private System.Windows.Forms.Label lblAnnotationsList;
|
|
||||||
private System.Windows.Forms.BindingSource itemAnnotationsBindingSource;
|
|
||||||
private System.Windows.Forms.Button btnClean;
|
|
||||||
private System.Windows.Forms.Label lblCountNumber;
|
|
||||||
private System.Windows.Forms.Label lblCount;
|
|
||||||
private System.Windows.Forms.Button btnClose;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@@ -1,158 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Data;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
using VEPROMS.CSLA.Library;
|
|
||||||
using Volian.Base.Library;
|
|
||||||
//using Volian.Pipe.Library;
|
|
||||||
using System.Xml;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using JR.Utils.GUI.Forms;
|
|
||||||
|
|
||||||
namespace VEPROMS
|
|
||||||
{
|
|
||||||
public partial class frmAnnotationsCleanup : Form
|
|
||||||
{
|
|
||||||
Label mylab = new Label();
|
|
||||||
string procList = "";
|
|
||||||
string docvList = "";
|
|
||||||
int AnnotationTyp;
|
|
||||||
List<ProcedureInfo> pil2 = new List<ProcedureInfo>();
|
|
||||||
List<DocVersionInfo> dvil2 = new List<DocVersionInfo>();
|
|
||||||
private frmBatchRefresh mainForm = null;
|
|
||||||
// frmAnnotationsCleanup constructor passes users procedure and docversion selections from frmBatchRefresh
|
|
||||||
public frmAnnotationsCleanup(Form callingForm, List<ProcedureInfo> pil, List<DocVersionInfo> dvil)
|
|
||||||
|
|
||||||
{ // Set up link back to parent form.
|
|
||||||
mainForm = callingForm as frmBatchRefresh;
|
|
||||||
InitializeComponent();
|
|
||||||
|
|
||||||
pil2 = pil;
|
|
||||||
dvil2 = dvil;
|
|
||||||
|
|
||||||
// Get list of annotation types for plant.
|
|
||||||
myAnnotationTypeInfoList = AnnotationTypeInfoList.Get();
|
|
||||||
lbAnnotationTypes.DataSource = myLocalAnnotationTypeInfoList = new LocalAnnotationTypeInfoList(myAnnotationTypeInfoList);
|
|
||||||
|
|
||||||
Dictionary<string, string> AnnotationsList = new Dictionary<string, string>();
|
|
||||||
|
|
||||||
// Add name and type ID to form.
|
|
||||||
foreach (LocalAnnotationTypeInfo lati in myLocalAnnotationTypeInfoList)
|
|
||||||
{
|
|
||||||
AnnotationsList.Add(lati.TypeID.ToString(), lati.Name);
|
|
||||||
//cbAnnotationTypes.Items.Add(new { Name = lati.Name, Value = lati.TypeID });
|
|
||||||
}
|
|
||||||
|
|
||||||
lbAnnotationTypes.DataSource = new BindingSource(AnnotationsList, null);
|
|
||||||
lbAnnotationTypes.DisplayMember = "Value";
|
|
||||||
lbAnnotationTypes.ValueMember = "Key";
|
|
||||||
lbAnnotationTypes.SelectedIndexChanged += lbAnnotationTypes_SelectedIndexChanged;
|
|
||||||
|
|
||||||
}
|
|
||||||
// create comma delimited string of procedures selected by user.
|
|
||||||
private string getAnnotationProcItems(List<ProcedureInfo> pil2)
|
|
||||||
{
|
|
||||||
procList = "";
|
|
||||||
foreach (var p in pil2)
|
|
||||||
{
|
|
||||||
if (p.IsProcedure)
|
|
||||||
{
|
|
||||||
if (procList == "")
|
|
||||||
{
|
|
||||||
procList = procList + p.ItemID.ToString();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
procList = procList + "," + p.ItemID.ToString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return procList;
|
|
||||||
}
|
|
||||||
|
|
||||||
// create comma delimited string of doc versions selected by user.
|
|
||||||
private string getAnnotationDocvItems(List<DocVersionInfo> dvil2)
|
|
||||||
{
|
|
||||||
docvList = "";
|
|
||||||
foreach (var d in dvil2)
|
|
||||||
{
|
|
||||||
if (d.IsDocVersion)
|
|
||||||
{
|
|
||||||
if (docvList == "")
|
|
||||||
{
|
|
||||||
docvList = docvList + d.VersionID.ToString();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
docvList = docvList + "," + d.VersionID.ToString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return docvList;
|
|
||||||
}
|
|
||||||
|
|
||||||
private AnnotationTypeInfoList myAnnotationTypeInfoList = null;
|
|
||||||
private LocalAnnotationTypeInfoList myLocalAnnotationTypeInfoList = null;
|
|
||||||
|
|
||||||
// Process used to cleanup annotations "(Proceed?" button)
|
|
||||||
private void button1_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
foreach (var p in pil2)
|
|
||||||
{
|
|
||||||
if (p.IsProcedure)
|
|
||||||
{
|
|
||||||
TextBox frm2 = mainForm.GettxtProcess();
|
|
||||||
frm2.AppendText(p.DisplayNumber + ' ' + p.DisplayText);
|
|
||||||
AnnotationTyp = System.Convert.ToInt32(((KeyValuePair<string, string>)lbAnnotationTypes.SelectedItem).Key);
|
|
||||||
Annotation.DeleteAnnotationProcByType(AnnotationTyp, p.ItemID.ToString());
|
|
||||||
lblCountNumber.Text = "0";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
foreach (var d in dvil2)
|
|
||||||
{
|
|
||||||
if (d.IsDocVersion)
|
|
||||||
{
|
|
||||||
TextBox frm2 = mainForm.GettxtProcess();
|
|
||||||
frm2.AppendText(d.ActiveParent.ToString());
|
|
||||||
AnnotationTyp = System.Convert.ToInt32(((KeyValuePair<string, string>)lbAnnotationTypes.SelectedItem).Key);
|
|
||||||
Annotation.DeleteAnnotationDocvByType(AnnotationTyp, d.VersionID.ToString());
|
|
||||||
lblCountNumber.Text = "0";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Retrieve number of annotations that will be deleted.
|
|
||||||
private void lbAnnotationTypes_SelectedIndexChanged(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
btnClean.Enabled = false;
|
|
||||||
lblCountNumber.Text = "";
|
|
||||||
int deletecountProc = 0;
|
|
||||||
int deletecountDocv = 0;
|
|
||||||
if (pil2.Count > 0)
|
|
||||||
{
|
|
||||||
AnnotationTyp = System.Convert.ToInt32(((KeyValuePair<string, string>)lbAnnotationTypes.SelectedItem).Key);
|
|
||||||
deletecountProc = Annotation.getAnnotationProcCnt(AnnotationTyp, getAnnotationProcItems(pil2));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dvil2.Count > 0)
|
|
||||||
{
|
|
||||||
AnnotationTyp = System.Convert.ToInt32(((KeyValuePair<string, string>)lbAnnotationTypes.SelectedItem).Key);
|
|
||||||
deletecountDocv = Annotation.getAnnotationCountDocv(AnnotationTyp, getAnnotationDocvItems(dvil2));
|
|
||||||
}
|
|
||||||
lblCountNumber.Text = (deletecountProc + deletecountDocv).ToString();
|
|
||||||
btnClean.Enabled = true;
|
|
||||||
|
|
||||||
}
|
|
||||||
// Close form.
|
|
||||||
private void btnClose_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
this.Close();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,123 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<root>
|
|
||||||
<!--
|
|
||||||
Microsoft ResX Schema
|
|
||||||
|
|
||||||
Version 2.0
|
|
||||||
|
|
||||||
The primary goals of this format is to allow a simple XML format
|
|
||||||
that is mostly human readable. The generation and parsing of the
|
|
||||||
various data types are done through the TypeConverter classes
|
|
||||||
associated with the data types.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
... ado.net/XML headers & schema ...
|
|
||||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
|
||||||
<resheader name="version">2.0</resheader>
|
|
||||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
|
||||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
|
||||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
|
||||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
|
||||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
|
||||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
|
||||||
</data>
|
|
||||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
|
||||||
<comment>This is a comment</comment>
|
|
||||||
</data>
|
|
||||||
|
|
||||||
There are any number of "resheader" rows that contain simple
|
|
||||||
name/value pairs.
|
|
||||||
|
|
||||||
Each data row contains a name, and value. The row also contains a
|
|
||||||
type or mimetype. Type corresponds to a .NET class that support
|
|
||||||
text/value conversion through the TypeConverter architecture.
|
|
||||||
Classes that don't support this are serialized and stored with the
|
|
||||||
mimetype set.
|
|
||||||
|
|
||||||
The mimetype is used for serialized objects, and tells the
|
|
||||||
ResXResourceReader how to depersist the object. This is currently not
|
|
||||||
extensible. For a given mimetype the value must be set accordingly:
|
|
||||||
|
|
||||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
|
||||||
that the ResXResourceWriter will generate, however the reader can
|
|
||||||
read any of the formats listed below.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
|
||||||
value : The object must be serialized into a byte array
|
|
||||||
: using a System.ComponentModel.TypeConverter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
-->
|
|
||||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
|
||||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:choice maxOccurs="unbounded">
|
|
||||||
<xsd:element name="metadata">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
|
||||||
<xsd:attribute ref="xml:space" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="assembly">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:attribute name="alias" type="xsd:string" />
|
|
||||||
<xsd:attribute name="name" type="xsd:string" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="data">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
|
||||||
<xsd:attribute ref="xml:space" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="resheader">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:choice>
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:schema>
|
|
||||||
<resheader name="resmimetype">
|
|
||||||
<value>text/microsoft-resx</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="version">
|
|
||||||
<value>2.0</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="reader">
|
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="writer">
|
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<metadata name="itemAnnotationsBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
|
||||||
<value>17, 17</value>
|
|
||||||
</metadata>
|
|
||||||
</root>
|
|
983
PROMS/VEPROMS User Interface/frmBatchRefresh.Designer.cs
generated
983
PROMS/VEPROMS User Interface/frmBatchRefresh.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@@ -22,25 +22,12 @@ namespace VEPROMS
|
|||||||
set { _MySessionInfo = value; }
|
set { _MySessionInfo = value; }
|
||||||
}
|
}
|
||||||
private bool IsAdministratorUser = false; //C2020-035 used to control what Set Amins can do
|
private bool IsAdministratorUser = false; //C2020-035 used to control what Set Amins can do
|
||||||
// C2017-030 - new Admin Tools user interface
|
// C2017-030 - new Admin Tools user interface
|
||||||
// pass in session info to constructor
|
// pass in session info to constructor
|
||||||
public frmBatchRefresh(SessionInfo sessionInfo)
|
public frmBatchRefresh(SessionInfo sessionInfo)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
_MySessionInfo = sessionInfo;
|
_MySessionInfo = sessionInfo;
|
||||||
|
|
||||||
// When opening Admin tools Check tab will be default.
|
|
||||||
this.sideNavItmCheck.Checked = true;
|
|
||||||
|
|
||||||
if (sideNavItmDelete.Checked)
|
|
||||||
{
|
|
||||||
AdminToolType = (E_AdminToolType)4;
|
|
||||||
if (swDeleteFolder.Value)
|
|
||||||
ResetDelTV(true);
|
|
||||||
else
|
|
||||||
ResetDelTV(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
setupProgessSteps1(); // C2017-030 - new Admin Tools user interface
|
setupProgessSteps1(); // C2017-030 - new Admin Tools user interface
|
||||||
UserInfo ui = UserInfo.GetByUserID(MySessionInfo.UserID);
|
UserInfo ui = UserInfo.GetByUserID(MySessionInfo.UserID);
|
||||||
IsAdministratorUser = ui.IsAdministrator();
|
IsAdministratorUser = ui.IsAdministrator();
|
||||||
@@ -56,25 +43,18 @@ namespace VEPROMS
|
|||||||
swStandardHypenChars.Enabled = false;
|
swStandardHypenChars.Enabled = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Make txtProcess text box available to frmAnnotationsClean form.
|
|
||||||
internal TextBox GettxtProcess()
|
|
||||||
{
|
|
||||||
return txtProcess;
|
|
||||||
}
|
|
||||||
// NOTE: removed the Refresh ROs and Refresh Transitions and ROs options (now only Transitions can be refreshed)
|
// NOTE: removed the Refresh ROs and Refresh Transitions and ROs options (now only Transitions can be refreshed)
|
||||||
// the Update ROs and Refresh ROs logic was merged together. The Update ROs will functionally do both
|
// the Update ROs and Refresh ROs logic was merged together. The Update ROs will functionally do both
|
||||||
// also annotations will be placed on step elements that have RO changes
|
// also annotations will be placed on step elements that have RO changes
|
||||||
|
|
||||||
// make all of the hyphen character consistant so they can all be found with the Search function
|
// make all of the hyphen character consistant so they can all be found with the Search function
|
||||||
|
|
||||||
|
|
||||||
private void FixHyphens()
|
private void FixHyphens()
|
||||||
{
|
{
|
||||||
this.Cursor = Cursors.WaitCursor;
|
this.Cursor = Cursors.WaitCursor;
|
||||||
DateTime pStart = DateTime.Now;
|
DateTime pStart = DateTime.Now;
|
||||||
txtProcess.AppendText("Standardizing Hyphens");
|
txtProcess.AppendText("Standardizing Hyphens");
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
txtProcess.AppendText(string.Format("Started: {0}", pStart.ToString("MM/dd/yyyy @ HH:mm")));
|
txtProcess.AppendText(string.Format("Started: {0}",pStart.ToString("MM/dd/yyyy @ HH:mm")));
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
Application.DoEvents();
|
Application.DoEvents();
|
||||||
int affectedRows = ESP_FixHyphens.Execute("vesp_FixHyphens") / 2;// Two results for each change
|
int affectedRows = ESP_FixHyphens.Execute("vesp_FixHyphens") / 2;// Two results for each change
|
||||||
@@ -85,7 +65,7 @@ namespace VEPROMS
|
|||||||
txtResults.AppendText(Environment.NewLine);
|
txtResults.AppendText(Environment.NewLine);
|
||||||
txtResults.AppendText(Environment.NewLine);
|
txtResults.AppendText(Environment.NewLine);
|
||||||
DateTime pEnd = DateTime.Now;
|
DateTime pEnd = DateTime.Now;
|
||||||
txtProcess.AppendText(string.Format("Completed: {0}", pEnd.ToString("MM/dd/yyyy @ HH:mm")));
|
txtProcess.AppendText(string.Format("Completed: {0}",pEnd.ToString("MM/dd/yyyy @ HH:mm")));
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
Application.DoEvents();
|
Application.DoEvents();
|
||||||
@@ -145,60 +125,6 @@ namespace VEPROMS
|
|||||||
myTV.SelectedNode.Expand();
|
myTV.SelectedNode.Expand();
|
||||||
this.Cursor = Cursors.Default;
|
this.Cursor = Cursors.Default;
|
||||||
}
|
}
|
||||||
private void ResetDelTV()
|
|
||||||
{
|
|
||||||
ResetDelTV(false);
|
|
||||||
}
|
|
||||||
private void ResetDelTV(bool noProcs)
|
|
||||||
{
|
|
||||||
btnFixLinks.Enabled = false;
|
|
||||||
this.Cursor = Cursors.WaitCursor;
|
|
||||||
myTVdel.Nodes.Clear();
|
|
||||||
myDocVersions.Clear();
|
|
||||||
FolderInfo fi = FolderInfo.GetTop();
|
|
||||||
|
|
||||||
if (fi.ChildFolderCount > 0)
|
|
||||||
{
|
|
||||||
if (noProcs)
|
|
||||||
{
|
|
||||||
LoadBottomLevelFolders(fi, myTVdel);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
TreeNode tn = new TreeNode(fi.Name);
|
|
||||||
tn.Tag = fi;
|
|
||||||
tn.StateImageIndex = -1; // Hide the checkbox for the root node
|
|
||||||
LoadChildFolders(fi, tn, noProcs);
|
|
||||||
myTVdel.Nodes.Add(tn);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (myTVdel.SelectedNode != null)
|
|
||||||
myTVdel.SelectedNode.Expand();
|
|
||||||
this.Cursor = Cursors.Default;
|
|
||||||
|
|
||||||
//btnFixLinks.Enabled = false;
|
|
||||||
//this.Cursor = Cursors.WaitCursor;
|
|
||||||
////myTreeNodePath = new List<string>();
|
|
||||||
//myTVdel.Nodes.Clear();
|
|
||||||
//myDocVersions.Clear();
|
|
||||||
//FolderInfo fi = FolderInfo.GetTop();
|
|
||||||
//TreeNode tn = myTVdel.Nodes.Add(fi.Name );
|
|
||||||
//tn.Tag = fi;
|
|
||||||
//if (fi.ChildFolderCount > 0)
|
|
||||||
//{
|
|
||||||
// if (noProcs)
|
|
||||||
// {
|
|
||||||
// LoadBottomLevelFolders(fi, myTVdel);
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// LoadChildFolders(fi, tn, noProcs);
|
|
||||||
//}
|
|
||||||
//if (myTVdel.SelectedNode != null)
|
|
||||||
// myTVdel.SelectedNode.Expand();
|
|
||||||
//this.Cursor = Cursors.Default;
|
|
||||||
}
|
|
||||||
|
|
||||||
// B2021-060 Higher level folders where being removed from the tree even if there was a child folder that containe a working draft set
|
// B2021-060 Higher level folders where being removed from the tree even if there was a child folder that containe a working draft set
|
||||||
private bool LoadChildFolders(FolderInfo fi, TreeNode tn, bool noProcs)
|
private bool LoadChildFolders(FolderInfo fi, TreeNode tn, bool noProcs)
|
||||||
{
|
{
|
||||||
@@ -209,8 +135,8 @@ namespace VEPROMS
|
|||||||
TreeNode tnc = tn.Nodes.Add(fic.Name);
|
TreeNode tnc = tn.Nodes.Add(fic.Name);
|
||||||
tnc.Tag = fic;
|
tnc.Tag = fic;
|
||||||
if (fic.ChildFolderCount > 0)
|
if (fic.ChildFolderCount > 0)
|
||||||
if (LoadChildFolders(fic, tnc, noProcs))
|
if(LoadChildFolders(fic, tnc, noProcs))
|
||||||
loadedChildWorkingDraft = true;
|
loadedChildWorkingDraft=true;
|
||||||
// B2020-114 and C2020-035 only show folders the Set Admin can access
|
// B2020-114 and C2020-035 only show folders the Set Admin can access
|
||||||
if (fic.FolderDocVersionCount > 0)
|
if (fic.FolderDocVersionCount > 0)
|
||||||
{
|
{
|
||||||
@@ -225,34 +151,6 @@ namespace VEPROMS
|
|||||||
tn.Remove();
|
tn.Remove();
|
||||||
return loadedWorkingDraft;
|
return loadedWorkingDraft;
|
||||||
}
|
}
|
||||||
/// <summary>
|
|
||||||
/// Load only bottom layer of folders into treenode.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="fi"></param>
|
|
||||||
/// <param name="tn"></param>
|
|
||||||
private void LoadBottomLevelFolders(FolderInfo fi, TreeView treeView)
|
|
||||||
{
|
|
||||||
foreach (FolderInfo fic in fi.SortedChildFolders)
|
|
||||||
{
|
|
||||||
if (fic.ChildFolderCount > 0)
|
|
||||||
{
|
|
||||||
// Recursively call for child folders
|
|
||||||
LoadBottomLevelFolders(fic, treeView);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (fic.Name != "PROMS")
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// If the folder is a bottom-level folder (no child folders), add it directly to the TreeView
|
|
||||||
TreeNode tnc = treeView.Nodes.Add(fic.Name);
|
|
||||||
tnc.Tag = fic;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
private bool LoadDocVersions(FolderInfo fic, TreeNode tnc, bool noProcs)
|
private bool LoadDocVersions(FolderInfo fic, TreeNode tnc, bool noProcs)
|
||||||
{
|
{
|
||||||
bool rtnval = false;
|
bool rtnval = false;
|
||||||
@@ -303,7 +201,7 @@ namespace VEPROMS
|
|||||||
private void UpdateROValues()
|
private void UpdateROValues()
|
||||||
{
|
{
|
||||||
this.Cursor = Cursors.WaitCursor;
|
this.Cursor = Cursors.WaitCursor;
|
||||||
List<ProcedureInfo> pil = new List<ProcedureInfo>(); // C2023-002: list of checked out procedures, used in frmBatchRefreshCheckedOut dialog
|
List<ProcedureInfo> pil = new List<ProcedureInfo>(); // C2023-002: list of checked out procedures, used in frmBatchRefreshCheckedOut dialog
|
||||||
List<DocVersionInfo> dvil = new List<DocVersionInfo>();
|
List<DocVersionInfo> dvil = new List<DocVersionInfo>();
|
||||||
foreach (TreeNode tn in myDocVersions.Keys)
|
foreach (TreeNode tn in myDocVersions.Keys)
|
||||||
if (tn.Checked)
|
if (tn.Checked)
|
||||||
@@ -353,7 +251,7 @@ namespace VEPROMS
|
|||||||
Application.DoEvents();
|
Application.DoEvents();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Application.DoEvents();
|
Application.DoEvents();
|
||||||
// when processing more than one procedure set, display only one completed message after all are processed
|
// when processing more than one procedure set, display only one completed message after all are processed
|
||||||
if (ROFstInfo.MessageList != null)
|
if (ROFstInfo.MessageList != null)
|
||||||
@@ -375,7 +273,7 @@ namespace VEPROMS
|
|||||||
sb.AppendLine("Have you requested the users to close the procedures and do you want to continue the process?");
|
sb.AppendLine("Have you requested the users to close the procedures and do you want to continue the process?");
|
||||||
frmBatchRefreshCheckedOut frmCO = new frmBatchRefreshCheckedOut(1);
|
frmBatchRefreshCheckedOut frmCO = new frmBatchRefreshCheckedOut(1);
|
||||||
frmCO.MySessionInfo = MySessionInfo;
|
frmCO.MySessionInfo = MySessionInfo;
|
||||||
frmCO.CheckedOutProcedures = pil; // C2023-002: set list of checked out procedures
|
frmCO.CheckedOutProcedures = pil; // C2023-002: set list of checked out procedures
|
||||||
frmCO.Location = new Point(Screen.PrimaryScreen.WorkingArea.Width - frmCO.Width, Screen.PrimaryScreen.WorkingArea.Height - frmCO.Height);
|
frmCO.Location = new Point(Screen.PrimaryScreen.WorkingArea.Width - frmCO.Width, Screen.PrimaryScreen.WorkingArea.Height - frmCO.Height);
|
||||||
// C2023-002: Allow close of dialog that has list of procedures that are checked out
|
// C2023-002: Allow close of dialog that has list of procedures that are checked out
|
||||||
if (frmCO.ShowDialog(this) != DialogResult.Cancel)
|
if (frmCO.ShowDialog(this) != DialogResult.Cancel)
|
||||||
@@ -514,7 +412,7 @@ namespace VEPROMS
|
|||||||
DateTime pStart = DateTime.Now;
|
DateTime pStart = DateTime.Now;
|
||||||
txtProcess.AppendText("Refresh Transitions");
|
txtProcess.AppendText("Refresh Transitions");
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
txtProcess.AppendText(string.Format("Started: {0}", pStart.ToString("MM/dd/yyyy @ HH:mm")));
|
txtProcess.AppendText(string.Format("Started: {0}",pStart.ToString("MM/dd/yyyy @ HH:mm")));
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
txtResults.AppendText("Refresh Transitions");
|
txtResults.AppendText("Refresh Transitions");
|
||||||
txtResults.AppendText(Environment.NewLine);
|
txtResults.AppendText(Environment.NewLine);
|
||||||
@@ -551,19 +449,19 @@ namespace VEPROMS
|
|||||||
Application.DoEvents();
|
Application.DoEvents();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (numTransFixed == 0 && numTransConverted == 0)
|
if (numTransFixed == 0 && numTransConverted ==0)
|
||||||
{
|
{
|
||||||
txtResults.AppendText("No Transitions Needed Updated.");
|
txtResults.AppendText("No Transitions Needed Updated.");
|
||||||
txtResults.AppendText(Environment.NewLine);
|
txtResults.AppendText(Environment.NewLine);
|
||||||
}
|
}
|
||||||
ContentInfo.StaticContentInfoChange -= new StaticContentInfoEvent(ContentInfo_StaticContentInfoChange);
|
ContentInfo.StaticContentInfoChange -= new StaticContentInfoEvent(ContentInfo_StaticContentInfoChange);
|
||||||
DateTime pEnd = DateTime.Now;
|
DateTime pEnd = DateTime.Now;
|
||||||
txtProcess.AppendText(string.Format("Completed: {0}", pEnd.ToString("MM/dd/yyyy @ HH:mm")));
|
txtProcess.AppendText(string.Format("Completed: {0}",pEnd.ToString("MM/dd/yyyy @ HH:mm")));
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
txtProcess.AppendText(string.Format("Transitions Checked: {0}", numTransProcessed));
|
txtProcess.AppendText(string.Format("Transitions Checked: {0}",numTransProcessed));
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
// B2018-002 - Invalid Transitions - Display Transition Refresh Statistics
|
// B2018-002 - Invalid Transitions - Display Transition Refresh Statistics
|
||||||
txtProcess.AppendText(string.Format("Transitions Correct As Is: {0}", numTransProcessed - (numTransConverted + numTransFixed)));
|
txtProcess.AppendText(string.Format("Transitions Correct As Is: {0}",numTransProcessed - (numTransConverted + numTransFixed)));
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
txtProcess.AppendText(string.Format("Transitions Modified: {0}", numTransFixed));
|
txtProcess.AppendText(string.Format("Transitions Modified: {0}", numTransFixed));
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
@@ -592,10 +490,10 @@ namespace VEPROMS
|
|||||||
}
|
}
|
||||||
this.Cursor = Cursors.Default;
|
this.Cursor = Cursors.Default;
|
||||||
// B2018-002 - Invalid Transitions - Display Transition Refresh Statisitic
|
// B2018-002 - Invalid Transitions - Display Transition Refresh Statisitic
|
||||||
if (numTransFixed == 0 && numTransConverted == 0)
|
if (numTransFixed == 0 && numTransConverted ==0)
|
||||||
MessageBox.Show(string.Format("{0} Transitions Checked.\n\nNo Transitions Modified.", numTransProcessed), "Refresh Transitions Completed");
|
MessageBox.Show(string.Format("{0} Transitions Checked.\n\nNo Transitions Modified.",numTransProcessed), "Refresh Transitions Completed");
|
||||||
else
|
else
|
||||||
MessageBox.Show(string.Format("{0} Transitions Checked.\n\n {1} Correct as is.\n\n {2} Transitions modified.\n\n {3} Transitions converted to text.", numTransProcessed, numTransProcessed - (numTransFixed + numTransConverted), numTransFixed, numTransConverted), "Refresh Transitions Completed");
|
MessageBox.Show(string.Format("{0} Transitions Checked.\n\n {1} Correct as is.\n\n {2} Transitions modified.\n\n {3} Transitions converted to text.", numTransProcessed, numTransProcessed - (numTransFixed + numTransConverted),numTransFixed, numTransConverted), "Refresh Transitions Completed");
|
||||||
}
|
}
|
||||||
|
|
||||||
// C2017-030 - new Admin Tools user interface
|
// C2017-030 - new Admin Tools user interface
|
||||||
@@ -608,7 +506,7 @@ namespace VEPROMS
|
|||||||
DateTime pStart = DateTime.Now;
|
DateTime pStart = DateTime.Now;
|
||||||
txtProcess.AppendText("Refreshing Word Attachments");
|
txtProcess.AppendText("Refreshing Word Attachments");
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
txtProcess.AppendText(string.Format("Started: {0}", pStart.ToString("MM/dd/yyyy @ HH:mm")));
|
txtProcess.AppendText(string.Format("Started: {0}",pStart.ToString("MM/dd/yyyy @ HH:mm")));
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
Application.DoEvents();
|
Application.DoEvents();
|
||||||
int affectedRows = ESP_DeletePDFs.Execute("vesp_DeletePDFs");
|
int affectedRows = ESP_DeletePDFs.Execute("vesp_DeletePDFs");
|
||||||
@@ -618,7 +516,7 @@ namespace VEPROMS
|
|||||||
txtResults.AppendText(Environment.NewLine);
|
txtResults.AppendText(Environment.NewLine);
|
||||||
txtResults.AppendText(Environment.NewLine);
|
txtResults.AppendText(Environment.NewLine);
|
||||||
DateTime pEnd = DateTime.Now;
|
DateTime pEnd = DateTime.Now;
|
||||||
txtProcess.AppendText(string.Format("Completed: {0}", pEnd.ToString("MM/dd/yyyy @ HH:mm")));
|
txtProcess.AppendText(string.Format("Completed: {0}",pEnd.ToString("MM/dd/yyyy @ HH:mm")));
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
Application.DoEvents();
|
Application.DoEvents();
|
||||||
@@ -663,7 +561,7 @@ namespace VEPROMS
|
|||||||
private int RefreshForSearch()
|
private int RefreshForSearch()
|
||||||
{
|
{
|
||||||
int cntfix = 0;
|
int cntfix = 0;
|
||||||
List<int> gids = GridInfoList.GetIds(); // get all grids in database
|
List<int> gids = GridInfoList.GetIds(); // get all grids in database
|
||||||
pbProcess.Minimum = 0;
|
pbProcess.Minimum = 0;
|
||||||
pbProcess.Maximum = gids.Count;
|
pbProcess.Maximum = gids.Count;
|
||||||
pbProcess.Step = 1;
|
pbProcess.Step = 1;
|
||||||
@@ -672,7 +570,7 @@ namespace VEPROMS
|
|||||||
using (Content cc = Content.Get(cid))
|
using (Content cc = Content.Get(cid))
|
||||||
{
|
{
|
||||||
StepConfig sc = new StepConfig(cc.Config);
|
StepConfig sc = new StepConfig(cc.Config);
|
||||||
if (!sc.Step_FixedTblForSrch) // if not processed through this code already, get searchable text & save
|
if (!sc.Step_FixedTblForSrch) // if not processed through this code already, get searchable text & save
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -690,7 +588,7 @@ namespace VEPROMS
|
|||||||
cc.UserID = Volian.Base.Library.VlnSettings.UserID;
|
cc.UserID = Volian.Base.Library.VlnSettings.UserID;
|
||||||
cc.DTS = DateTime.Now;
|
cc.DTS = DateTime.Now;
|
||||||
cc.Text = srchtxt;
|
cc.Text = srchtxt;
|
||||||
|
|
||||||
}
|
}
|
||||||
sc.Step_FixedTblForSrch = true;
|
sc.Step_FixedTblForSrch = true;
|
||||||
cc.Config = sc.ToString();
|
cc.Config = sc.ToString();
|
||||||
@@ -717,7 +615,7 @@ namespace VEPROMS
|
|||||||
DateTime pStart = DateTime.Now;
|
DateTime pStart = DateTime.Now;
|
||||||
txtProcess.AppendText("Identifing Orphan Items");
|
txtProcess.AppendText("Identifing Orphan Items");
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
txtProcess.AppendText(string.Format("Started: {0}", pStart.ToString("MM/dd/yyyy @ HH:mm")));
|
txtProcess.AppendText(string.Format("Started: {0}",pStart.ToString("MM/dd/yyyy @ HH:mm")));
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
Application.DoEvents();
|
Application.DoEvents();
|
||||||
int rowCount = ESP_IdentifyDisconnectedItems.Execute("vesp_GetDisconnectedItemsCount");
|
int rowCount = ESP_IdentifyDisconnectedItems.Execute("vesp_GetDisconnectedItemsCount");
|
||||||
@@ -738,7 +636,7 @@ namespace VEPROMS
|
|||||||
txtResults.AppendText(Environment.NewLine);
|
txtResults.AppendText(Environment.NewLine);
|
||||||
}
|
}
|
||||||
DateTime pEnd = DateTime.Now;
|
DateTime pEnd = DateTime.Now;
|
||||||
txtProcess.AppendText(string.Format("Completed: {0}", pEnd.ToString("MM/dd/yyyy @ HH:mm")));
|
txtProcess.AppendText(string.Format("Completed: {0}",pEnd.ToString("MM/dd/yyyy @ HH:mm")));
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
Application.DoEvents();
|
Application.DoEvents();
|
||||||
@@ -754,7 +652,7 @@ namespace VEPROMS
|
|||||||
DateTime pStart = DateTime.Now;
|
DateTime pStart = DateTime.Now;
|
||||||
txtProcess.AppendText("Purging Orphan Items");
|
txtProcess.AppendText("Purging Orphan Items");
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
txtProcess.AppendText(string.Format("Started: {0}", pStart.ToString("MM/dd/yyyy @ HH:mm")));
|
txtProcess.AppendText(string.Format("Started: {0}",pStart.ToString("MM/dd/yyyy @ HH:mm")));
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
Application.DoEvents();
|
Application.DoEvents();
|
||||||
int rowCount = ESP_IdentifyDisconnectedItems.Execute("vesp_GetDisconnectedItemsCount");
|
int rowCount = ESP_IdentifyDisconnectedItems.Execute("vesp_GetDisconnectedItemsCount");
|
||||||
@@ -791,7 +689,7 @@ namespace VEPROMS
|
|||||||
txtResults.AppendText(Environment.NewLine);
|
txtResults.AppendText(Environment.NewLine);
|
||||||
}
|
}
|
||||||
DateTime pEnd = DateTime.Now;
|
DateTime pEnd = DateTime.Now;
|
||||||
txtProcess.AppendText(string.Format("Completed: {0}", pEnd.ToString("MM/dd/yyyy @ HH:mm")));
|
txtProcess.AppendText(string.Format("Completed: {0}",pEnd.ToString("MM/dd/yyyy @ HH:mm")));
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
Application.DoEvents();
|
Application.DoEvents();
|
||||||
@@ -806,7 +704,7 @@ namespace VEPROMS
|
|||||||
DateTime pStart = DateTime.Now;
|
DateTime pStart = DateTime.Now;
|
||||||
txtProcess.AppendText("Identifing Unused RoFsts and Figures");
|
txtProcess.AppendText("Identifing Unused RoFsts and Figures");
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
txtProcess.AppendText(string.Format("Started: {0}", pStart.ToString("MM/dd/yyyy @ HH:mm")));
|
txtProcess.AppendText(string.Format("Started: {0}",pStart.ToString("MM/dd/yyyy @ HH:mm")));
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
Application.DoEvents();
|
Application.DoEvents();
|
||||||
int rowCountRoFst = ESP_GetUnusedRoFsts.Execute("vesp_GetUnusedRoFstsCount");
|
int rowCountRoFst = ESP_GetUnusedRoFsts.Execute("vesp_GetUnusedRoFstsCount");
|
||||||
@@ -829,9 +727,9 @@ namespace VEPROMS
|
|||||||
}
|
}
|
||||||
|
|
||||||
DateTime pEnd = DateTime.Now;
|
DateTime pEnd = DateTime.Now;
|
||||||
txtProcess.AppendText(string.Format("Completed: {0}", pEnd.ToString("MM/dd/yyyy @ HH:mm")));
|
txtProcess.AppendText(string.Format("Completed: {0}",pEnd.ToString("MM/dd/yyyy @ HH:mm")));
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
txtProcess.AppendText(string.Format("Started: {0}", pStart.ToString("MM/dd/yyyy @ HH:mm")));
|
txtProcess.AppendText(string.Format("Started: {0}",pStart.ToString("MM/dd/yyyy @ HH:mm")));
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
Application.DoEvents();
|
Application.DoEvents();
|
||||||
this.Cursor = Cursors.Default;
|
this.Cursor = Cursors.Default;
|
||||||
@@ -844,7 +742,7 @@ namespace VEPROMS
|
|||||||
DateTime pStart = DateTime.Now;
|
DateTime pStart = DateTime.Now;
|
||||||
txtProcess.AppendText("Purging Unused RoFSTs and Figures Items");
|
txtProcess.AppendText("Purging Unused RoFSTs and Figures Items");
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
txtProcess.AppendText(string.Format("Started: {0}", pStart.ToString("MM/dd/yyyy @ HH:mm")));
|
txtProcess.AppendText(string.Format("Started: {0}",pStart.ToString("MM/dd/yyyy @ HH:mm")));
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
Application.DoEvents();
|
Application.DoEvents();
|
||||||
int rowCountRoFst = ESP_GetUnusedRoFsts.Execute("vesp_GetUnusedRoFstsCount");
|
int rowCountRoFst = ESP_GetUnusedRoFsts.Execute("vesp_GetUnusedRoFstsCount");
|
||||||
@@ -885,7 +783,7 @@ namespace VEPROMS
|
|||||||
txtResults.AppendText(Environment.NewLine);
|
txtResults.AppendText(Environment.NewLine);
|
||||||
}
|
}
|
||||||
DateTime pEnd = DateTime.Now;
|
DateTime pEnd = DateTime.Now;
|
||||||
txtProcess.AppendText(string.Format("Completed: {0}", pEnd.ToString("MM/dd/yyyy @ HH:mm")));
|
txtProcess.AppendText(string.Format("Completed: {0}",pEnd.ToString("MM/dd/yyyy @ HH:mm")));
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
Application.DoEvents();
|
Application.DoEvents();
|
||||||
@@ -900,7 +798,7 @@ namespace VEPROMS
|
|||||||
DateTime pStart = DateTime.Now;
|
DateTime pStart = DateTime.Now;
|
||||||
txtProcess.AppendText("Identifing Unused RO Associations");
|
txtProcess.AppendText("Identifing Unused RO Associations");
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
txtProcess.AppendText(string.Format("Started: {0}", pStart.ToString("MM/dd/yyyy @ HH:mm")));
|
txtProcess.AppendText(string.Format("Started: {0}",pStart.ToString("MM/dd/yyyy @ HH:mm")));
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
Application.DoEvents();
|
Application.DoEvents();
|
||||||
int rowCount = ESP_GetROAssoc.Execute("vesp_GetUnusedROAssociationsCount");
|
int rowCount = ESP_GetROAssoc.Execute("vesp_GetUnusedROAssociationsCount");
|
||||||
@@ -919,7 +817,7 @@ namespace VEPROMS
|
|||||||
txtResults.AppendText(Environment.NewLine);
|
txtResults.AppendText(Environment.NewLine);
|
||||||
}
|
}
|
||||||
DateTime pEnd = DateTime.Now;
|
DateTime pEnd = DateTime.Now;
|
||||||
txtProcess.AppendText(string.Format("Completed: {0}", pEnd.ToString("MM/dd/yyyy @ HH:mm")));
|
txtProcess.AppendText(string.Format("Completed: {0}",pEnd.ToString("MM/dd/yyyy @ HH:mm")));
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
Application.DoEvents();
|
Application.DoEvents();
|
||||||
@@ -934,7 +832,7 @@ namespace VEPROMS
|
|||||||
DateTime pStart = DateTime.Now;
|
DateTime pStart = DateTime.Now;
|
||||||
txtProcess.AppendText("Purging Unused Referenced Object Associations");
|
txtProcess.AppendText("Purging Unused Referenced Object Associations");
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
txtProcess.AppendText(string.Format("Started: {0}", pStart.ToString("MM/dd/yyyy @ HH:mm")));
|
txtProcess.AppendText(string.Format("Started: {0}",pStart.ToString("MM/dd/yyyy @ HH:mm")));
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
Application.DoEvents();
|
Application.DoEvents();
|
||||||
int rowCount = ESP_GetROAssoc.Execute("vesp_GetUnusedROAssociationsCount");
|
int rowCount = ESP_GetROAssoc.Execute("vesp_GetUnusedROAssociationsCount");
|
||||||
@@ -968,7 +866,7 @@ namespace VEPROMS
|
|||||||
txtResults.AppendText(Environment.NewLine);
|
txtResults.AppendText(Environment.NewLine);
|
||||||
}
|
}
|
||||||
DateTime pEnd = DateTime.Now;
|
DateTime pEnd = DateTime.Now;
|
||||||
txtProcess.AppendText(string.Format("Completed: {0}", pEnd.ToString("MM/dd/yyyy @ HH:mm")));
|
txtProcess.AppendText(string.Format("Completed: {0}",pEnd.ToString("MM/dd/yyyy @ HH:mm")));
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
Application.DoEvents();
|
Application.DoEvents();
|
||||||
@@ -983,11 +881,11 @@ namespace VEPROMS
|
|||||||
DateTime pStart = DateTime.Now;
|
DateTime pStart = DateTime.Now;
|
||||||
txtProcess.AppendText("Identifing Hidden Item Locations");
|
txtProcess.AppendText("Identifing Hidden Item Locations");
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
txtProcess.AppendText(string.Format("Started: {0}", pStart.ToString("MM/dd/yyyy @ HH:mm")));
|
txtProcess.AppendText(string.Format("Started: {0}",pStart.ToString("MM/dd/yyyy @ HH:mm")));
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
Application.DoEvents();
|
Application.DoEvents();
|
||||||
List<ItemInfo> myItems = ESP_IdentifyNonEditableItems.Execute("vesp_GetNonEditableItems");
|
List<ItemInfo> myItems = ESP_IdentifyNonEditableItems.Execute("vesp_GetNonEditableItems");
|
||||||
txtProcess.AppendText(string.Format("Hidden Items Count: {0}", myItems.Count));
|
txtProcess.AppendText(string.Format("Hidden Items Count: {0}",myItems.Count));
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
if (myItems.Count > 0)
|
if (myItems.Count > 0)
|
||||||
{
|
{
|
||||||
@@ -1008,7 +906,7 @@ namespace VEPROMS
|
|||||||
txtResults.AppendText(Environment.NewLine);
|
txtResults.AppendText(Environment.NewLine);
|
||||||
}
|
}
|
||||||
DateTime pEnd = DateTime.Now;
|
DateTime pEnd = DateTime.Now;
|
||||||
txtProcess.AppendText(string.Format("Completed: {0}", pEnd.ToString("MM/dd/yyyy @ HH:mm")));
|
txtProcess.AppendText(string.Format("Completed: {0}",pEnd.ToString("MM/dd/yyyy @ HH:mm")));
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
Application.DoEvents();
|
Application.DoEvents();
|
||||||
@@ -1023,16 +921,16 @@ namespace VEPROMS
|
|||||||
DateTime pStart = DateTime.Now;
|
DateTime pStart = DateTime.Now;
|
||||||
txtProcess.AppendText("Show Users in PROMS");
|
txtProcess.AppendText("Show Users in PROMS");
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
txtProcess.AppendText(string.Format("Started: {0}", pStart.ToString("MM/dd/yyyy @ HH:mm")));
|
txtProcess.AppendText(string.Format("Started: {0}",pStart.ToString("MM/dd/yyyy @ HH:mm")));
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
Application.DoEvents();
|
Application.DoEvents();
|
||||||
txtResults.Clear();
|
txtResults.Clear();
|
||||||
txtResults.AppendText(ESP_GetDatabaseSessions.Execute("vesp_GetDatabaseSessions"));
|
txtResults.AppendText(ESP_GetDatabaseSessions.Execute("vesp_GetDatabaseSessions"));
|
||||||
DateTime pEnd = DateTime.Now;
|
DateTime pEnd = DateTime.Now;
|
||||||
txtProcess.AppendText(string.Format("Completed: {0}", pEnd.ToString("MM/dd/yyyy @ HH:mm")));
|
txtProcess.AppendText(string.Format("Completed: {0}",pEnd.ToString("MM/dd/yyyy @ HH:mm")));
|
||||||
Application.DoEvents();
|
Application.DoEvents();
|
||||||
this.Cursor = Cursors.Default;
|
this.Cursor = Cursors.Default;
|
||||||
MessageBox.Show("Show Users Completed", "Show Users");
|
MessageBox.Show( "Show Users Completed", "Show Users");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ProcessUpdateROValues(DocVersionInfo dq)
|
private void ProcessUpdateROValues(DocVersionInfo dq)
|
||||||
@@ -1170,7 +1068,7 @@ namespace VEPROMS
|
|||||||
// show the changes made in the Results pannel, include the ItemId of the step element
|
// show the changes made in the Results pannel, include the ItemId of the step element
|
||||||
void ContentInfo_StaticContentInfoChange(object sender, StaticContentInfoEventArgs args)
|
void ContentInfo_StaticContentInfoChange(object sender, StaticContentInfoEventArgs args)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (args.Type == "TX")
|
if (args.Type == "TX")
|
||||||
{
|
{
|
||||||
myFixesCount++;
|
myFixesCount++;
|
||||||
@@ -1187,7 +1085,7 @@ namespace VEPROMS
|
|||||||
}
|
}
|
||||||
else // B2018-002 - Invalid Transitions - Display Transition Cconversion Statistics
|
else // B2018-002 - Invalid Transitions - Display Transition Cconversion Statistics
|
||||||
{
|
{
|
||||||
myFixes.AppendLine(string.Format("Converted Transition to text for {0}({1})", (sender as ItemInfo).ShortPath, (sender as ItemInfo).ItemID));
|
myFixes.AppendLine(string.Format("Converted Transition to text for {0}({1})", (sender as ItemInfo).ShortPath, (sender as ItemInfo).ItemID));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1223,40 +1121,10 @@ namespace VEPROMS
|
|||||||
CheckChildNodes(e.Node, e.Node.Checked);
|
CheckChildNodes(e.Node, e.Node.Checked);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (swDeleteAnnotations.Value)
|
|
||||||
{
|
|
||||||
if (e.Node.Checked)
|
|
||||||
{
|
|
||||||
DiselectParentNodes(e.Node.Parent);
|
|
||||||
DiselectChildNodes(e.Node.Nodes);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
btnFixLinks.Enabled = AtLeastOneNodeChecked(); // C2017-030 support for Refresh Transitions/Update RO Values
|
btnFixLinks.Enabled = AtLeastOneNodeChecked(); // C2017-030 support for Refresh Transitions/Update RO Values
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DiselectParentNodes(TreeNode parent)
|
|
||||||
{
|
|
||||||
while (parent != null)
|
|
||||||
{
|
|
||||||
if (parent.Checked)
|
|
||||||
parent.Checked = false;
|
|
||||||
parent = parent.Parent;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void DiselectChildNodes(TreeNodeCollection childes)
|
|
||||||
{
|
|
||||||
foreach (TreeNode oneChild in childes)
|
|
||||||
{
|
|
||||||
if (oneChild.Checked)
|
|
||||||
oneChild.Checked = false;
|
|
||||||
DiselectChildNodes(oneChild.Nodes);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private void CheckChildNodes(TreeNode treeNode, bool ischecked)
|
private void CheckChildNodes(TreeNode treeNode, bool ischecked)
|
||||||
{
|
{
|
||||||
foreach (TreeNode tn in treeNode.Nodes)
|
foreach (TreeNode tn in treeNode.Nodes)
|
||||||
@@ -1275,9 +1143,9 @@ namespace VEPROMS
|
|||||||
public ProgressBarItem ProgressBar
|
public ProgressBarItem ProgressBar
|
||||||
{
|
{
|
||||||
get { return _ProgressBar; }
|
get { return _ProgressBar; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_ProgressBar = value;
|
_ProgressBar = value;
|
||||||
_ProgressBar.TextVisible = true;
|
_ProgressBar.TextVisible = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1378,25 +1246,6 @@ namespace VEPROMS
|
|||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
// new Admin Tools user interface for deletes
|
|
||||||
private void sideNavItmDelete_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
AdminToolType = E_AdminToolType.Delete;
|
|
||||||
lblAdmToolProgressType.Text = "";
|
|
||||||
setupProgessSteps1();
|
|
||||||
|
|
||||||
if (swDeleteFolder.Value)
|
|
||||||
ResetDelTV(true);
|
|
||||||
else
|
|
||||||
ResetDelTV(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
// new Admin Tools user interface for deletes
|
|
||||||
//private void sideNavItmDelete_Click_1(object sender, EventArgs e)
|
|
||||||
//{
|
|
||||||
|
|
||||||
//}
|
|
||||||
|
|
||||||
#region On/Off Swiches
|
#region On/Off Swiches
|
||||||
|
|
||||||
// C2017-030 new Admin Tools user interface
|
// C2017-030 new Admin Tools user interface
|
||||||
@@ -1405,8 +1254,7 @@ namespace VEPROMS
|
|||||||
Check = 0,
|
Check = 0,
|
||||||
Repair = 1,
|
Repair = 1,
|
||||||
Links = 2,
|
Links = 2,
|
||||||
Users = 3,
|
Users = 3
|
||||||
Delete = 4
|
|
||||||
};
|
};
|
||||||
private E_AdminToolType AdminToolType = 0;
|
private E_AdminToolType AdminToolType = 0;
|
||||||
|
|
||||||
@@ -1457,11 +1305,6 @@ namespace VEPROMS
|
|||||||
splitContainer3.Panel2Collapsed = true;
|
splitContainer3.Panel2Collapsed = true;
|
||||||
progressSteps1.Visible = false;
|
progressSteps1.Visible = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_AdminToolType.Delete:
|
|
||||||
splitContainer3.Panel2Collapsed = true;
|
|
||||||
progressSteps1.Visible = false;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1657,138 +1500,5 @@ namespace VEPROMS
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//C2024-005 Delete Annotations, Delete Folders
|
|
||||||
private void swDeleteAnnotations_ValueChanged(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
swDeleteFolder.Value = !swDeleteAnnotations.Value;
|
|
||||||
if (swDeleteFolder.Value)
|
|
||||||
ResetDelTV(true);
|
|
||||||
else
|
|
||||||
ResetDelTV(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void swDeleteFolder_ValueChanged(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
swDeleteAnnotations.Value = !swDeleteFolder.Value;
|
|
||||||
if (swDeleteFolder.Value)
|
|
||||||
ResetDelTV(true);
|
|
||||||
else
|
|
||||||
ResetDelTV(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void btnDeleteItems_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
//clear
|
|
||||||
txtResults.Clear();
|
|
||||||
txtProcess.Clear();
|
|
||||||
|
|
||||||
|
|
||||||
if (swDeleteFolder.Value)
|
|
||||||
{
|
|
||||||
//TODO process deletions of folders
|
|
||||||
txtProcess.AppendText("Deleting Folders...");
|
|
||||||
|
|
||||||
//List<ProcedureInfo> pil = new List<ProcedureInfo>();
|
|
||||||
//foreach (TreeNode tn in myProcedures.Keys)
|
|
||||||
// if (tn.Checked)
|
|
||||||
// pil.Add(myProcedures[tn]);
|
|
||||||
|
|
||||||
////Load Selected Folders
|
|
||||||
Dictionary<int, string> folderData = new Dictionary<int, string>();
|
|
||||||
|
|
||||||
//List<FolderInfo> Flist = new List<FolderInfo>();
|
|
||||||
//foreach (TreeNode tn in myDocVersions.Keys)
|
|
||||||
// if (tn.Checked)
|
|
||||||
// Flist.Add();
|
|
||||||
|
|
||||||
//List<DocVersionInfo> dvil = new List<DocVersionInfo>();
|
|
||||||
//foreach (TreeNode tn in myDocVersions.Keys)
|
|
||||||
// if (tn.Checked)
|
|
||||||
// dvil.Add(myDocVersions[tn]);
|
|
||||||
|
|
||||||
//foreach (TreeNode tn in myTVdel.Nodes)
|
|
||||||
//{
|
|
||||||
// if (tn.Checked)
|
|
||||||
// {
|
|
||||||
// var itemInfo = myProcedures[tn];
|
|
||||||
// folderData.Add(itemInfo.ItemID, itemInfo.DisplayText);
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
//ProcessDelete(dvil);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Write progress status
|
|
||||||
txtProcess.AppendText("Deleting Annotations...");
|
|
||||||
|
|
||||||
// Create a list of procedures the user selected
|
|
||||||
List<ProcedureInfo> pil = new List<ProcedureInfo>();
|
|
||||||
foreach (TreeNode tn in myProcedures.Keys)
|
|
||||||
if (tn.Checked)
|
|
||||||
pil.Add(myProcedures[tn]);
|
|
||||||
|
|
||||||
// Create a list of doc versions the user selected
|
|
||||||
List<DocVersionInfo> dvil = new List<DocVersionInfo>();
|
|
||||||
foreach (TreeNode tn in myDocVersions.Keys)
|
|
||||||
if (tn.Checked)
|
|
||||||
dvil.Add(myDocVersions[tn]);
|
|
||||||
|
|
||||||
frmAnnotationsCleanup frmAnnoDel = new frmAnnotationsCleanup(this, pil, dvil);
|
|
||||||
|
|
||||||
frmAnnoDel.ShowDialog();
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ProcessDelete(List<DocVersionInfo> foldersToDelete)
|
|
||||||
{
|
|
||||||
DateTime pStart = DateTime.Now;
|
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
|
||||||
txtProcess.AppendText(pStart.ToString("MM/dd/yyyy @ HH:mm"));
|
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
|
||||||
|
|
||||||
foreach (var kvp in foldersToDelete)
|
|
||||||
{
|
|
||||||
int itemID = (int)kvp.ItemID;
|
|
||||||
string folderName = kvp.Name;
|
|
||||||
|
|
||||||
// Perform the deletion operation
|
|
||||||
// Assume DeleteFolderByID is a method that deletes the folder by its ItemID
|
|
||||||
bool deletionSuccessful = DeleteFolderByID(itemID);
|
|
||||||
|
|
||||||
// Update txtProcess with the progress
|
|
||||||
if (deletionSuccessful)
|
|
||||||
{
|
|
||||||
txtProcess.AppendText($"Successfully deleted folder: {folderName} (ID: {itemID})");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
txtProcess.AppendText($"Failed to delete folder: {folderName} (ID: {itemID})");
|
|
||||||
}
|
|
||||||
txtProcess.AppendText(Environment.NewLine);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Example deletion method
|
|
||||||
private bool DeleteFolderByID(int itemID)
|
|
||||||
{
|
|
||||||
// Implement your folder deletion logic here
|
|
||||||
// Return true if deletion was successful, false otherwise
|
|
||||||
return true; // Placeholder
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<ProcedureInfo> RetrieveChkAnnotations()
|
|
||||||
{
|
|
||||||
List<ProcedureInfo> pil = new List<ProcedureInfo>();
|
|
||||||
foreach (TreeNode tn in myProcedures.Keys)
|
|
||||||
if (tn.Checked)
|
|
||||||
pil.Add(myProcedures[tn]);
|
|
||||||
return pil;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -117,43 +117,74 @@
|
|||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
|
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
|
<data name="warningBox3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAplJREFUOE+N
|
||||||
|
k11IU2Ecxv9zouK8CULrzo8SU3QKaSYmOJ2uFL8SK4igEIok6qKUwggySTShC41CRiiGdWNfYBcVWiGl
|
||||||
|
FqN0lh+UTaekzuWcuu2c9316nSdKLPEHz817/s/zPv9zOPQ/nlVQEGulF3ILPe+8SIHK8eYR5lusLwHy
|
||||||
|
Oy08RqpXjjfHVCMlsydbGbekg4/r4HmwRbLWUZzyeGNqD5NK1O5lw8L8NQHckgh5SAdXA3UqIxuzZKSj
|
||||||
|
8ssI8Il9wMQeYDoVfD4HrsdhsNdRgTL2b4yl5Ce1qL+xcQOWxpKxMzwAMVEayIv7IU8XwVnv8+XuEfJV
|
||||||
|
xtfjMlKZ/CYG3JYJ96wOPj6EoCBfMCkfnJdguSMG89eoVBlfS+tJCpCafa1stgBYzAZbzoFGo0ZIiD84
|
||||||
|
KwJ350P+UQxHtfr7vUPkp9j+4GqiM1K3FtyVB8h5wlSI4GB/RIQHgjtzwWaywMb1WHwYg7lKOq3YVrlz
|
||||||
|
jPw8RrWFOUoAJhpwcaNciNDQQMRGB4FNpIMNp4B93A2pXw/7ZbWlufCvFguNdNzzOta7J5S6fP4AdkVq
|
||||||
|
kKQVAQNJYO8TwHq0kD8kwdkWhZkLdMJrrsonlfu2yszmSsA9Bat1p0XdsTTcvxmJtpowyL1ar/m3PKYM
|
||||||
|
2MpVgzcySUWTdWRwd+wAXzoo3r5B7CnqDqVg+lW89yuoVARrR/SaANm0F46mUFjOUjYtN9BTaVQYJzPA
|
||||||
|
RlPB+hNF3XjvP3C9bDuqTm2D9DZuTcCKXN1psJ2ndhGgnpJGciENGyB9zoJk1kMezFonySw0oIf0KVOs
|
||||||
|
oIO7L3MlYITstVTsrKNHCzXU5aimnvmrZPp5hfrtlWS2X6LBuQoatJWTWQz3C5mEeoS6hNqt5yj7FysJ
|
||||||
|
zJwL4b/EAAAAAElFTkSuQmCC
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
<metadata name="superTooltip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="superTooltip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>17, 17</value>
|
<value>17, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<data name="swDeleteFolder.SuperTooltip" xml:space="preserve">
|
<data name="swCkObsoleteROData.SuperTooltip" xml:space="preserve">
|
||||||
<value>This allows the user to check referenced objects links in procedure step data for multiple working drafts in a batch mode.
|
<value>Referenced Objects databases are associated with a procedure set (such as Working Draft).
|
||||||
|
|
||||||
Bad referenced bject links will be identified with an Bad RO Link annotation. Use the PROMS Search tool to list all of the steps that have this annotation.
|
|
||||||
|
|
||||||
Be sure a current backup of the database exists prior performing this function.
|
|
||||||
|
|
||||||
It is recommended that this be done during off hours.
|
|
||||||
|
|
||||||
|
RO paths, ROFST versions, and the contents of RO figures are stored in the database when referenced. This tool will identify stored RO Paths, ROFST versions, and Figures that are no longer used.
|
||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="labelX13.SuperTooltip" xml:space="preserve">
|
<data name="swHiddenDataLocs.SuperTooltip" xml:space="preserve">
|
||||||
<value>This allows the user to check referenced objects links in procedure step data for multiple working drafts in a batch mode.
|
<value>Typically, a section in PROMS only has sub-sections or steps. When and existing section is divided into sub-sections, the resulting main section might have both.
|
||||||
|
|
||||||
Bad referenced bject links will be identified with an Bad RO Link annotation. Use the PROMS Search tool to list all of the steps that have this annotation.
|
When this occurs, the step data in the main section can be marked as non-editable. The user can no longer get to these steps and they can become forgotten as PROMS will ignore these non-editable steps when the procedure is printed.
|
||||||
|
|
||||||
Be sure a current backup of the database exists prior performing this function.
|
This tool will identify if the database has non-editable steps and provide a listing of these steps. The use can then go to these main sections, make them editable via the property page, and delete or move these steps.
|
||||||
|
|
||||||
It is recommended that this be done during off hours.
|
This tool may take an extended period of time to execute.
|
||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="swDeleteAnnotations.SuperTooltip" xml:space="preserve">
|
<data name="labelX3.SuperTooltip" xml:space="preserve">
|
||||||
<value>This function will refresh transitions in all procedures selected below, whether they were selected individually or as a group via a procedure set.
|
<value>Referenced Objects databases are associated with a procedure set (such as Working Draft).
|
||||||
|
|
||||||
Be sure a current backup of the database exists prior to running this function.
|
RO paths, ROFST versions, and the contents of RO figures are stored in the database when referenced. This tool will identify stored RO Paths, ROFST versions, and Figures that are no longer used.
|
||||||
|
</value>
|
||||||
If more than one procedure is selected, it is recommended that this be performed during off hours.</value>
|
|
||||||
</data>
|
</data>
|
||||||
<data name="labelX14.SuperTooltip" xml:space="preserve">
|
<data name="labelX2.SuperTooltip" xml:space="preserve">
|
||||||
<value>This function will refresh transitions in all procedures selected below, whether they were selected individually or as a group via a procedure set.
|
<value>Typically, a section in PROMS only has sub-sections or steps. When and existing section is divided into sub-sections, the resulting main section might have both.
|
||||||
|
|
||||||
Be sure a current backup of the database exists prior to running this function.
|
When this occurs, the step data in the main section can be marked as non-editable. The user can no longer get to these steps and they can become forgotten as PROMS will ignore these non-editable steps when the procedure is printed.
|
||||||
|
|
||||||
If more than one procedure is selected, it is recommended that this be performed during off hours.</value>
|
This tool will identify if the database has non-editable steps and provide a listing of these steps. The use can then go to these main sections, make them editable via the property page, and delete or move these steps.
|
||||||
|
|
||||||
|
This tool may take an extended period of time to execute.
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="swCkOrphanDataRecs.SuperTooltip" xml:space="preserve">
|
||||||
|
<value>Everything in PROMS is inter-related. A working draft knows what is its first procedure and a procedure knows what is its first step. Likewise, a procedure knows what procedure is before it and after it.
|
||||||
|
|
||||||
|
Should an item become orphaned (disconnected) from the rest of the data, it will no longer be accessible. This tool detects any orphaned items in the database.
|
||||||
|
|
||||||
|
This tool may take an extended period of time to execute.
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="labelX1.SuperTooltip" xml:space="preserve">
|
||||||
|
<value>Everything in PROMS is inter-related. A working draft knows what is its first procedure and a procedure knows what is its first step. Likewise, a procedure knows what procedure is before it and after it.
|
||||||
|
|
||||||
|
Should an item become orphaned (disconnected) from the rest of the data, it will no longer be accessible. This tool detects any orphaned items in the database.
|
||||||
|
|
||||||
|
This tool may take an extended period of time to execute.
|
||||||
|
</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="swCheckROLinks.SuperTooltip" xml:space="preserve">
|
<data name="swCheckROLinks.SuperTooltip" xml:space="preserve">
|
||||||
<value>This allows the user to check referenced objects links in procedure step data for multiple working drafts in a batch mode.
|
<value>This allows the user to check referenced objects links in procedure step data for multiple working drafts in a batch mode.
|
||||||
@@ -176,7 +207,6 @@ Be sure a current backup of the database exists prior performing this function.
|
|||||||
It is recommended that this be done during off hours.
|
It is recommended that this be done during off hours.
|
||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
|
||||||
<data name="warningBox5.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="warningBox5.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAplJREFUOE+N
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAplJREFUOE+N
|
||||||
@@ -239,71 +269,6 @@ If more than one procedure is selected, it is recommended that this be performed
|
|||||||
RlPB+hNF3XjvP3C9bDuqTm2D9DZuTcCKXN1psJ2ndhGgnpJGciENGyB9zoJk1kMezFonySw0oIf0KVOs
|
RlPB+hNF3XjvP3C9bDuqTm2D9DZuTcCKXN1psJ2ndhGgnpJGciENGyB9zoJk1kMezFonySw0oIf0KVOs
|
||||||
oIO7L3MlYITstVTsrKNHCzXU5aimnvmrZPp5hfrtlWS2X6LBuQoatJWTWQz3C5mEeoS6hNqt5yj7FysJ
|
oIO7L3MlYITstVTsrKNHCzXU5aimnvmrZPp5hfrtlWS2X6LBuQoatJWTWQz3C5mEeoS6hNqt5yj7FysJ
|
||||||
zJwL4b/EAAAAAElFTkSuQmCC
|
zJwL4b/EAAAAAElFTkSuQmCC
|
||||||
</value>
|
|
||||||
</data>
|
|
||||||
<data name="warningBox3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
<value>
|
|
||||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAplJREFUOE+N
|
|
||||||
k11IU2Ecxv9zouK8CULrzo8SU3QKaSYmOJ2uFL8SK4igEIok6qKUwggySTShC41CRiiGdWNfYBcVWiGl
|
|
||||||
FqN0lh+UTaekzuWcuu2c9316nSdKLPEHz817/s/zPv9zOPQ/nlVQEGulF3ILPe+8SIHK8eYR5lusLwHy
|
|
||||||
Oy08RqpXjjfHVCMlsydbGbekg4/r4HmwRbLWUZzyeGNqD5NK1O5lw8L8NQHckgh5SAdXA3UqIxuzZKSj
|
|
||||||
8ssI8Il9wMQeYDoVfD4HrsdhsNdRgTL2b4yl5Ce1qL+xcQOWxpKxMzwAMVEayIv7IU8XwVnv8+XuEfJV
|
|
||||||
xtfjMlKZ/CYG3JYJ96wOPj6EoCBfMCkfnJdguSMG89eoVBlfS+tJCpCafa1stgBYzAZbzoFGo0ZIiD84
|
|
||||||
KwJ350P+UQxHtfr7vUPkp9j+4GqiM1K3FtyVB8h5wlSI4GB/RIQHgjtzwWaywMb1WHwYg7lKOq3YVrlz
|
|
||||||
jPw8RrWFOUoAJhpwcaNciNDQQMRGB4FNpIMNp4B93A2pXw/7ZbWlufCvFguNdNzzOta7J5S6fP4AdkVq
|
|
||||||
kKQVAQNJYO8TwHq0kD8kwdkWhZkLdMJrrsonlfu2yszmSsA9Bat1p0XdsTTcvxmJtpowyL1ar/m3PKYM
|
|
||||||
2MpVgzcySUWTdWRwd+wAXzoo3r5B7CnqDqVg+lW89yuoVARrR/SaANm0F46mUFjOUjYtN9BTaVQYJzPA
|
|
||||||
RlPB+hNF3XjvP3C9bDuqTm2D9DZuTcCKXN1psJ2ndhGgnpJGciENGyB9zoJk1kMezFonySw0oIf0KVOs
|
|
||||||
oIO7L3MlYITstVTsrKNHCzXU5aimnvmrZPp5hfrtlWS2X6LBuQoatJWTWQz3C5mEeoS6hNqt5yj7FysJ
|
|
||||||
zJwL4b/EAAAAAElFTkSuQmCC
|
|
||||||
</value>
|
|
||||||
</data>
|
|
||||||
<data name="swCkObsoleteROData.SuperTooltip" xml:space="preserve">
|
|
||||||
<value>Referenced Objects databases are associated with a procedure set (such as Working Draft).
|
|
||||||
|
|
||||||
RO paths, ROFST versions, and the contents of RO figures are stored in the database when referenced. This tool will identify stored RO Paths, ROFST versions, and Figures that are no longer used.
|
|
||||||
</value>
|
|
||||||
</data>
|
|
||||||
<data name="swHiddenDataLocs.SuperTooltip" xml:space="preserve">
|
|
||||||
<value>Typically, a section in PROMS only has sub-sections or steps. When and existing section is divided into sub-sections, the resulting main section might have both.
|
|
||||||
|
|
||||||
When this occurs, the step data in the main section can be marked as non-editable. The user can no longer get to these steps and they can become forgotten as PROMS will ignore these non-editable steps when the procedure is printed.
|
|
||||||
|
|
||||||
This tool will identify if the database has non-editable steps and provide a listing of these steps. The use can then go to these main sections, make them editable via the property page, and delete or move these steps.
|
|
||||||
|
|
||||||
This tool may take an extended period of time to execute.
|
|
||||||
</value>
|
|
||||||
</data>
|
|
||||||
<data name="labelX3.SuperTooltip" xml:space="preserve">
|
|
||||||
<value>Referenced Objects databases are associated with a procedure set (such as Working Draft).
|
|
||||||
|
|
||||||
RO paths, ROFST versions, and the contents of RO figures are stored in the database when referenced. This tool will identify stored RO Paths, ROFST versions, and Figures that are no longer used.
|
|
||||||
</value>
|
|
||||||
</data>
|
|
||||||
<data name="labelX2.SuperTooltip" xml:space="preserve">
|
|
||||||
<value>Typically, a section in PROMS only has sub-sections or steps. When and existing section is divided into sub-sections, the resulting main section might have both.
|
|
||||||
|
|
||||||
When this occurs, the step data in the main section can be marked as non-editable. The user can no longer get to these steps and they can become forgotten as PROMS will ignore these non-editable steps when the procedure is printed.
|
|
||||||
|
|
||||||
This tool will identify if the database has non-editable steps and provide a listing of these steps. The use can then go to these main sections, make them editable via the property page, and delete or move these steps.
|
|
||||||
|
|
||||||
This tool may take an extended period of time to execute.
|
|
||||||
</value>
|
|
||||||
</data>
|
|
||||||
<data name="swCkOrphanDataRecs.SuperTooltip" xml:space="preserve">
|
|
||||||
<value>Everything in PROMS is inter-related. A working draft knows what is its first procedure and a procedure knows what is its first step. Likewise, a procedure knows what procedure is before it and after it.
|
|
||||||
|
|
||||||
Should an item become orphaned (disconnected) from the rest of the data, it will no longer be accessible. This tool detects any orphaned items in the database.
|
|
||||||
|
|
||||||
This tool may take an extended period of time to execute.
|
|
||||||
</value>
|
|
||||||
</data>
|
|
||||||
<data name="labelX1.SuperTooltip" xml:space="preserve">
|
|
||||||
<value>Everything in PROMS is inter-related. A working draft knows what is its first procedure and a procedure knows what is its first step. Likewise, a procedure knows what procedure is before it and after it.
|
|
||||||
|
|
||||||
Should an item become orphaned (disconnected) from the rest of the data, it will no longer be accessible. This tool detects any orphaned items in the database.
|
|
||||||
|
|
||||||
This tool may take an extended period of time to execute.
|
|
||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="swRefreshTblsForSrch.SuperTooltip" xml:space="preserve">
|
<data name="swRefreshTblsForSrch.SuperTooltip" xml:space="preserve">
|
||||||
@@ -403,6 +368,6 @@ Should an item become orphaned (disconnected) from the rest of the data, it will
|
|||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>46</value>
|
<value>38</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
</root>
|
</root>
|
||||||
|
17
PROMS/VEPROMS User Interface/frmVEPROMS.Designer.cs
generated
17
PROMS/VEPROMS User Interface/frmVEPROMS.Designer.cs
generated
@@ -45,6 +45,7 @@ namespace VEPROMS
|
|||||||
this.itemContainer3 = new DevComponents.DotNetBar.ItemContainer();
|
this.itemContainer3 = new DevComponents.DotNetBar.ItemContainer();
|
||||||
this.btnNew = new DevComponents.DotNetBar.ButtonItem();
|
this.btnNew = new DevComponents.DotNetBar.ButtonItem();
|
||||||
this.btnOpen = new DevComponents.DotNetBar.ButtonItem();
|
this.btnOpen = new DevComponents.DotNetBar.ButtonItem();
|
||||||
|
this.btnPrint = new DevComponents.DotNetBar.ButtonItem();
|
||||||
this.btnPrepare = new DevComponents.DotNetBar.ButtonItem();
|
this.btnPrepare = new DevComponents.DotNetBar.ButtonItem();
|
||||||
this.btnAdmin = new DevComponents.DotNetBar.ButtonItem();
|
this.btnAdmin = new DevComponents.DotNetBar.ButtonItem();
|
||||||
this.btnUpdateFormats = new DevComponents.DotNetBar.ButtonItem();
|
this.btnUpdateFormats = new DevComponents.DotNetBar.ButtonItem();
|
||||||
@@ -214,7 +215,7 @@ namespace VEPROMS
|
|||||||
this.btnSendErrorLog,
|
this.btnSendErrorLog,
|
||||||
this.btnShowErrFld,
|
this.btnShowErrFld,
|
||||||
this.btnShowPrtFld,
|
this.btnShowPrtFld,
|
||||||
this.btnHelpAbout});
|
this.btnHelpAbout}); ;
|
||||||
this.btnHelp.Text = "Help";
|
this.btnHelp.Text = "Help";
|
||||||
//
|
//
|
||||||
// btnHelpManual
|
// btnHelpManual
|
||||||
@@ -338,6 +339,7 @@ namespace VEPROMS
|
|||||||
this.itemContainer3.SubItems.AddRange(new DevComponents.DotNetBar.BaseItem[] {
|
this.itemContainer3.SubItems.AddRange(new DevComponents.DotNetBar.BaseItem[] {
|
||||||
this.btnNew,
|
this.btnNew,
|
||||||
this.btnOpen,
|
this.btnOpen,
|
||||||
|
this.btnPrint,
|
||||||
this.btnPrepare,
|
this.btnPrepare,
|
||||||
this.btnAdmin});
|
this.btnAdmin});
|
||||||
//
|
//
|
||||||
@@ -363,7 +365,16 @@ namespace VEPROMS
|
|||||||
this.btnOpen.SubItemsExpandWidth = 24;
|
this.btnOpen.SubItemsExpandWidth = 24;
|
||||||
this.btnOpen.Text = "&Open...";
|
this.btnOpen.Text = "&Open...";
|
||||||
this.btnOpen.Click += new System.EventHandler(this.btnOpen_Click);
|
this.btnOpen.Click += new System.EventHandler(this.btnOpen_Click);
|
||||||
|
//
|
||||||
|
// btnPrint
|
||||||
|
//
|
||||||
|
this.btnPrint.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
|
||||||
|
this.btnPrint.Enabled = false;
|
||||||
|
this.btnPrint.Image = ((System.Drawing.Image)(resources.GetObject("btnPrint.Image")));
|
||||||
|
this.btnPrint.Name = "btnPrint";
|
||||||
|
this.btnPrint.SubItemsExpandWidth = 24;
|
||||||
|
this.btnPrint.Text = "Create &PDF";
|
||||||
|
this.btnPrint.Click += new System.EventHandler(this.btnPrint_Click);
|
||||||
//
|
//
|
||||||
// btnPrepare
|
// btnPrepare
|
||||||
//
|
//
|
||||||
@@ -1635,6 +1646,7 @@ namespace VEPROMS
|
|||||||
private DevComponents.DotNetBar.ButtonItem btnNew;
|
private DevComponents.DotNetBar.ButtonItem btnNew;
|
||||||
private DevComponents.DotNetBar.ButtonItem btnOpen;
|
private DevComponents.DotNetBar.ButtonItem btnOpen;
|
||||||
private DevComponents.DotNetBar.ButtonItem btnPrepare;
|
private DevComponents.DotNetBar.ButtonItem btnPrepare;
|
||||||
|
private DevComponents.DotNetBar.ButtonItem btnPrint;
|
||||||
private DevComponents.DotNetBar.ItemContainer icRecentDocs;
|
private DevComponents.DotNetBar.ItemContainer icRecentDocs;
|
||||||
private DevComponents.DotNetBar.LabelItem labelItem8;
|
private DevComponents.DotNetBar.LabelItem labelItem8;
|
||||||
private DevComponents.DotNetBar.ItemContainer itemContainer5;
|
private DevComponents.DotNetBar.ItemContainer itemContainer5;
|
||||||
@@ -1763,4 +1775,3 @@ namespace VEPROMS
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -2098,6 +2098,7 @@ namespace VEPROMS
|
|||||||
btnAdministrativeTools.Click += new EventHandler(btnAdministrativeTools_Click);
|
btnAdministrativeTools.Click += new EventHandler(btnAdministrativeTools_Click);
|
||||||
btnAdmin.SubItems.Add(btnAdministrativeTools);
|
btnAdmin.SubItems.Add(btnAdministrativeTools);
|
||||||
|
|
||||||
|
this.superTooltip1.SetSuperTooltip(btnPrint, new SuperTooltipInfo("Create PDF", null, null, null, null, eTooltipColor.Gray));
|
||||||
this.superTooltip1.SetSuperTooltip(btnExit, new SuperTooltipInfo("Exit", null, null, null, null, eTooltipColor.Gray));
|
this.superTooltip1.SetSuperTooltip(btnExit, new SuperTooltipInfo("Exit", null, null, null, null, eTooltipColor.Gray));
|
||||||
this.superTooltip1.SetSuperTooltip(btnOptions, new SuperTooltipInfo("Options", null, null, null, null, eTooltipColor.Gray));
|
this.superTooltip1.SetSuperTooltip(btnOptions, new SuperTooltipInfo("Options", null, null, null, null, eTooltipColor.Gray));
|
||||||
this.superTooltip1.SetSuperTooltip(btnManageSecurity, new SuperTooltipInfo("Manage Security", null, null, null, null, eTooltipColor.Gray));
|
this.superTooltip1.SetSuperTooltip(btnManageSecurity, new SuperTooltipInfo("Manage Security", null, null, null, null, eTooltipColor.Gray));
|
||||||
@@ -3125,45 +3126,23 @@ namespace VEPROMS
|
|||||||
if (dvi != null)
|
if (dvi != null)
|
||||||
{
|
{
|
||||||
DlgPrintProcedure prnDlg = new DlgPrintProcedure(dvi, true);
|
DlgPrintProcedure prnDlg = new DlgPrintProcedure(dvi, true);
|
||||||
if (dvi.MultiUnitCount == 0)
|
if (dvi.MultiUnitCount == 0) prnDlg.SelectedSlave = -1;
|
||||||
{
|
|
||||||
prnDlg.SelectedSlave = -1;
|
|
||||||
}
|
|
||||||
else if (dvi.MultiUnitCount > 0)
|
|
||||||
{
|
|
||||||
string[] arguments = Environment.GetCommandLineArgs();
|
|
||||||
for (int i = 0; i < arguments.Length; i++)
|
|
||||||
{
|
|
||||||
if (arguments[i].Contains("/C="))
|
|
||||||
{
|
|
||||||
Console.WriteLine("In arguments loop");
|
|
||||||
//int num;
|
|
||||||
string[] childarg = arguments[i].Split('=');
|
|
||||||
if (int.TryParse(childarg[1], out int num))
|
|
||||||
{
|
|
||||||
prnDlg.SelectedSlave = num;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
prnDlg.AllowDateTimePrefixSuffix = false; //C2018-033 don't append any selected date/time pdf file prefix or suffix (defined in working draft properties)
|
prnDlg.AllowDateTimePrefixSuffix = false; //C2018-033 don't append any selected date/time pdf file prefix or suffix (defined in working draft properties)
|
||||||
prnDlg.ShowDialog(this); // RHM 20120925 - Center dialog over PROMS window
|
prnDlg.ShowDialog(this); // RHM 20120925 - Center dialog over PROMS window
|
||||||
//prnDlg.FormClosed += new FormClosedEventHandler(prnDlg_FormClosed);
|
//prnDlg.FormClosed += new FormClosedEventHandler(prnDlg_FormClosed);
|
||||||
//while (!_RunNext) Application.DoEvents();
|
//while (!_RunNext) Application.DoEvents();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ranAuto = true;
|
ranAuto = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ranAuto)
|
|
||||||
{
|
|
||||||
this.Close();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ranAuto)
|
||||||
|
{
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private FontFamily GetFamily(string name)
|
private FontFamily GetFamily(string name)
|
||||||
@@ -4113,6 +4092,10 @@ namespace VEPROMS
|
|||||||
|
|
||||||
lblUser.Text = tc.SelectedDisplayTabItem.MyUserRole;
|
lblUser.Text = tc.SelectedDisplayTabItem.MyUserRole;
|
||||||
|
|
||||||
|
if (tc.SelectedDisplayTabItem.MyItemInfo.MyDocVersion.MultiUnitCount > 1)
|
||||||
|
btnPrint.Visible = false;
|
||||||
|
else
|
||||||
|
btnPrint.Visible = true;
|
||||||
|
|
||||||
// Reset the ribbon buttons B2016-148 (ex. a copystep done in a different procedure tab my require the paste step options to be active
|
// Reset the ribbon buttons B2016-148 (ex. a copystep done in a different procedure tab my require the paste step options to be active
|
||||||
if (tc.SelectedDisplayTabItem != null && tc.SelectedDisplayTabItem.MyStepTabPanel != null) // MyStepTabPanel will be null if the active tab is a Word Attachment
|
if (tc.SelectedDisplayTabItem != null && tc.SelectedDisplayTabItem.MyStepTabPanel != null) // MyStepTabPanel will be null if the active tab is a Word Attachment
|
||||||
@@ -4367,6 +4350,7 @@ namespace VEPROMS
|
|||||||
ctrlAnnotationDetails.UpdateAnnotationGrid(_CurrentItem); // set the CurrentItem (send Message) when the MSWord section is opened.
|
ctrlAnnotationDetails.UpdateAnnotationGrid(_CurrentItem); // set the CurrentItem (send Message) when the MSWord section is opened.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
btnPrint.Enabled = (_CurrentItem != null);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _LastStepRTB_EditModeChanged(object sender, EventArgs args)
|
void _LastStepRTB_EditModeChanged(object sender, EventArgs args)
|
||||||
@@ -4858,7 +4842,12 @@ namespace VEPROMS
|
|||||||
StepRTB.MyFontFamily = cmbFont.SelectedValue as FontFamily;
|
StepRTB.MyFontFamily = cmbFont.SelectedValue as FontFamily;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void btnPrint_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
DlgPrintProcedure prnDlg = new DlgPrintProcedure(this._CurrentItem.MyProcedure);
|
||||||
|
prnDlg.MySessionInfo = MySessionInfo;
|
||||||
|
prnDlg.ShowDialog(this); // RHM 20120925 - Center dialog over PROMS window
|
||||||
|
}
|
||||||
|
|
||||||
private void lblResolution_Click(object sender, EventArgs e)
|
private void lblResolution_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
@@ -254,7 +254,7 @@ namespace VEPROMS
|
|||||||
//
|
//
|
||||||
this.ppBtnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
this.ppBtnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.ppBtnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
this.ppBtnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||||
this.ppBtnCancel.Location = new System.Drawing.Point(742, 338);
|
this.ppBtnCancel.Location = new System.Drawing.Point(742, 342);
|
||||||
this.ppBtnCancel.Margin = new System.Windows.Forms.Padding(2);
|
this.ppBtnCancel.Margin = new System.Windows.Forms.Padding(2);
|
||||||
this.ppBtnCancel.Name = "ppBtnCancel";
|
this.ppBtnCancel.Name = "ppBtnCancel";
|
||||||
this.ppBtnCancel.Size = new System.Drawing.Size(56, 21);
|
this.ppBtnCancel.Size = new System.Drawing.Size(56, 21);
|
||||||
@@ -266,7 +266,7 @@ namespace VEPROMS
|
|||||||
// ppBtnOK
|
// ppBtnOK
|
||||||
//
|
//
|
||||||
this.ppBtnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
this.ppBtnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.ppBtnOK.Location = new System.Drawing.Point(669, 338);
|
this.ppBtnOK.Location = new System.Drawing.Point(669, 342);
|
||||||
this.ppBtnOK.Margin = new System.Windows.Forms.Padding(2);
|
this.ppBtnOK.Margin = new System.Windows.Forms.Padding(2);
|
||||||
this.ppBtnOK.Name = "ppBtnOK";
|
this.ppBtnOK.Name = "ppBtnOK";
|
||||||
this.ppBtnOK.Size = new System.Drawing.Size(56, 21);
|
this.ppBtnOK.Size = new System.Drawing.Size(56, 21);
|
||||||
|
@@ -29,7 +29,6 @@ namespace VEPROMS
|
|||||||
private List<MiniConfig> _DeletedApples;
|
private List<MiniConfig> _DeletedApples;
|
||||||
private List<EnhancedMiniConfig> _Enhanced;
|
private List<EnhancedMiniConfig> _Enhanced;
|
||||||
private DocVersionConfig _DocVersionConfig;
|
private DocVersionConfig _DocVersionConfig;
|
||||||
private string _OrgPDFPath; // B2024-030 used to save last PDF path
|
|
||||||
|
|
||||||
// Default values
|
// Default values
|
||||||
private string _DefaultFormatName = null;
|
private string _DefaultFormatName = null;
|
||||||
@@ -98,7 +97,6 @@ namespace VEPROMS
|
|||||||
|
|
||||||
_Initializing = true;
|
_Initializing = true;
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
_OrgPDFPath = _DocVersionConfig.Print_PDFLocation; // B2024-030 save last PDF path
|
|
||||||
btnGeneral.PerformClick(); // always start with General tab or button
|
btnGeneral.PerformClick(); // always start with General tab or button
|
||||||
_Initializing = false;
|
_Initializing = false;
|
||||||
|
|
||||||
@@ -325,6 +323,8 @@ namespace VEPROMS
|
|||||||
tiApplicability.Visible = false;
|
tiApplicability.Visible = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ppTxtBxPDFLoc.TextChanged += new EventHandler(ppTxtBxPDFLoc_TextChanged);
|
||||||
|
|
||||||
//end add new applicability stuff
|
//end add new applicability stuff
|
||||||
lblProcSetRev.Visible = ppRTxtProcSetRev.Visible = _DocVersionConfig.MyDocVersion.MyDocVersionInfo.ActiveFormat.MyStepSectionPrintData.UseXtraRevNumber;
|
lblProcSetRev.Visible = ppRTxtProcSetRev.Visible = _DocVersionConfig.MyDocVersion.MyDocVersionInfo.ActiveFormat.MyStepSectionPrintData.UseXtraRevNumber;
|
||||||
|
|
||||||
@@ -538,32 +538,11 @@ namespace VEPROMS
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//B2024-030 Check the PDF Location path and prompt to create the folders if needed
|
// The following code was added to fix Bug B2013-117
|
||||||
private void CheckPDFLocationPath()
|
private void ppTxtBxPDFLoc_TextChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
string pdfloc = ppTxtBxPDFLoc.Text;
|
if (_Initializing == false)
|
||||||
if (pdfloc == string.Empty) return;
|
_DocVersionConfig.Print_PDFLocation = ppTxtBxPDFLoc.Text;
|
||||||
if (!Directory.Exists(ppTxtBxPDFLoc.Text))
|
|
||||||
{
|
|
||||||
string msg = string.Format(" The Folder: '{0}' does not exist. \n\nCreate it?", ppTxtBxPDFLoc.Text);
|
|
||||||
DialogResult dr = MessageBox.Show(msg, "PDF Location Folder Not Found", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
|
|
||||||
if (dr == DialogResult.Yes)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Directory.CreateDirectory(ppTxtBxPDFLoc.Text);
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
MessageBox.Show(ex.Message, "Error trying to create folder", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
||||||
_DocVersionConfig.Print_PDFLocation = _OrgPDFPath; // reset to the path we started with
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_DocVersionConfig.Print_PDFLocation = _OrgPDFPath; // reset to the path we started with
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private string AddSlaveNode(MiniConfig mc)
|
private string AddSlaveNode(MiniConfig mc)
|
||||||
@@ -609,9 +588,6 @@ namespace VEPROMS
|
|||||||
|
|
||||||
private void btnVersionsPropOK_Click(object sender, EventArgs e)
|
private void btnVersionsPropOK_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
//B2024-030 Check the PDF Location path and prompt to create the folders if needed
|
|
||||||
CheckPDFLocationPath();
|
|
||||||
|
|
||||||
docVersionConfigBindingSource.EndEdit(); // need to end the edit session first or any format selection chanage will not stick B2015-157
|
docVersionConfigBindingSource.EndEdit(); // need to end the edit session first or any format selection chanage will not stick B2015-157
|
||||||
|
|
||||||
// if there is a change to the format, clean up any overridden formats that point to the selected item before saving the format change:
|
// if there is a change to the format, clean up any overridden formats that point to the selected item before saving the format change:
|
||||||
@@ -797,6 +773,7 @@ namespace VEPROMS
|
|||||||
|
|
||||||
// B2019-132 update the association count for this working draft
|
// B2019-132 update the association count for this working draft
|
||||||
_DocVersionConfig.MyDocVersion.MyDocVersionInfo.RefreshDocVersionAssociations();
|
_DocVersionConfig.MyDocVersion.MyDocVersionInfo.RefreshDocVersionAssociations();
|
||||||
|
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -225,86 +225,6 @@ namespace VEPROMS.CSLA.Library
|
|||||||
throw new DbCslaException("Error on Annotation.Delete", ex);
|
throw new DbCslaException("Error on Annotation.Delete", ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void DeleteAnnotationProcByType(int typID, string procList)
|
|
||||||
{
|
|
||||||
if (!CanDeleteObject())
|
|
||||||
throw new System.Security.SecurityException("User not authorized to remove a Annotation");
|
|
||||||
try
|
|
||||||
{
|
|
||||||
DataPortal.Delete(new DeleteAnnotationProcByTypeCriteria(typID, procList));
|
|
||||||
AnnotationInfo.StaticOnInfoChanged();
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
System.Data.SqlClient.SqlException exSQL = SqlException(ex);
|
|
||||||
if (exSQL != null && exSQL.Message.Contains("###Cannot Delete Item###"))
|
|
||||||
throw exSQL;
|
|
||||||
Console.WriteLine("AnnotationExt: Stacktrace = {0}", ex.StackTrace);
|
|
||||||
throw new DbCslaException("Error on Annotation.Delete", ex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void DeleteAnnotationDocvByType(int typID, string versionID)
|
|
||||||
{
|
|
||||||
if (!CanDeleteObject())
|
|
||||||
throw new System.Security.SecurityException("User not authorized to remove a Annotation");
|
|
||||||
try
|
|
||||||
{
|
|
||||||
DataPortal.Delete(new DeleteAnnotationDocvByTypeCriteria(typID, versionID));
|
|
||||||
AnnotationInfo.StaticOnInfoChanged();
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
System.Data.SqlClient.SqlException exSQL = SqlException(ex);
|
|
||||||
if (exSQL != null && exSQL.Message.Contains("###Cannot Delete Item###"))
|
|
||||||
throw exSQL;
|
|
||||||
Console.WriteLine("AnnotationExt: Stacktrace = {0}", ex.StackTrace);
|
|
||||||
throw new DbCslaException("Error on Annotation.Delete", ex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int getAnnotationProcCnt(int typID, string procList)
|
|
||||||
{
|
|
||||||
if (!CanGetObject())
|
|
||||||
throw new System.Security.SecurityException("User not authorized to remove a Annotation");
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Annotation ProcCnt = DataPortal.Fetch<Annotation>(new getAnnotationCountProcCriteria(typID, procList));
|
|
||||||
AnnotationInfo.StaticOnInfoChanged();
|
|
||||||
return Annotation.ProcCnt;
|
|
||||||
//return Int32.Parse(ProcCnt);
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
System.Data.SqlClient.SqlException exSQL = SqlException(ex);
|
|
||||||
if (exSQL != null && exSQL.Message.Contains("###Cannot retrieve Item###"))
|
|
||||||
throw exSQL;
|
|
||||||
Console.WriteLine("AnnotationExt: Stacktrace = {0}", ex.StackTrace);
|
|
||||||
throw new DbCslaException("Error on getAnnotationCountProcCriteria", ex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int getAnnotationCountDocv(int typID, string procList)
|
|
||||||
{
|
|
||||||
if (!CanGetObject())
|
|
||||||
throw new System.Security.SecurityException("User not authorized to remove a Annotation");
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Annotation DocvCnt = DataPortal.Fetch<Annotation>(new getAnnotationCountDocvCriteria(typID, procList));
|
|
||||||
AnnotationInfo.StaticOnInfoChanged();
|
|
||||||
return Annotation.DocvCnt;
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
System.Data.SqlClient.SqlException exSQL = SqlException(ex);
|
|
||||||
if (exSQL != null && exSQL.Message.Contains("###Cannot retrieve Item###"))
|
|
||||||
throw exSQL;
|
|
||||||
Console.WriteLine("AnnotationExt: Stacktrace = {0}", ex.StackTrace);
|
|
||||||
throw new DbCslaException("Error on getAnnotationCountDocvCriteria", ex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static System.Data.SqlClient.SqlException SqlException(Exception ex)
|
private static System.Data.SqlClient.SqlException SqlException(Exception ex)
|
||||||
{
|
{
|
||||||
Type sqlExType = typeof(System.Data.SqlClient.SqlException);
|
Type sqlExType = typeof(System.Data.SqlClient.SqlException);
|
||||||
@@ -360,209 +280,12 @@ namespace VEPROMS.CSLA.Library
|
|||||||
throw new DbCslaException("Item.DataPortal_Delete", ex);
|
throw new DbCslaException("Item.DataPortal_Delete", ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable()]
|
|
||||||
protected class DeleteAnnotationProcByTypeCriteria
|
|
||||||
{
|
|
||||||
private int _typeID;
|
|
||||||
public int TypeID
|
|
||||||
{ get { return _typeID; } }
|
|
||||||
|
|
||||||
private string _procList;
|
|
||||||
public string ProcList
|
|
||||||
{ get { return _procList; } }
|
|
||||||
public DeleteAnnotationProcByTypeCriteria(int typeID, string procList)
|
|
||||||
{
|
|
||||||
_typeID = typeID;
|
|
||||||
_procList = procList;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
[Transactional(TransactionalTypes.TransactionScope)]
|
|
||||||
private void DataPortal_Delete(DeleteAnnotationProcByTypeCriteria criteria)
|
|
||||||
{
|
|
||||||
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] Item.DataPortal_Delete", GetHashCode());
|
|
||||||
try
|
|
||||||
{
|
|
||||||
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
|
|
||||||
{
|
|
||||||
using (SqlCommand cm = cn.CreateCommand())
|
|
||||||
{
|
|
||||||
cm.CommandType = CommandType.StoredProcedure;
|
|
||||||
cm.CommandTimeout = Database.SQLTimeout;
|
|
||||||
cm.CommandText = "deleteAnnotationsProcByType";
|
|
||||||
cm.Parameters.AddWithValue("@typeid", criteria.TypeID);
|
|
||||||
cm.Parameters.AddWithValue("@procList", criteria.ProcList);
|
|
||||||
cm.ExecuteNonQuery();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
if (_MyLog.IsErrorEnabled) _MyLog.Error("Item.DataPortal_Delete", ex);
|
|
||||||
_ErrorMessage = ex.Message;
|
|
||||||
throw new DbCslaException("Item.DataPortal_Delete Annotations by group", ex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[Serializable()]
|
|
||||||
protected class DeleteAnnotationDocvByTypeCriteria
|
|
||||||
{
|
|
||||||
private int _typeID;
|
|
||||||
public int TypeID
|
|
||||||
{ get { return _typeID; } }
|
|
||||||
|
|
||||||
private string _versionID;
|
|
||||||
public string VersionID
|
|
||||||
{ get { return _versionID; } }
|
|
||||||
public DeleteAnnotationDocvByTypeCriteria(int typeID, string versionID)
|
|
||||||
{
|
|
||||||
_typeID = typeID;
|
|
||||||
_versionID = versionID;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
[Transactional(TransactionalTypes.TransactionScope)]
|
|
||||||
private void DataPortal_Delete(DeleteAnnotationDocvByTypeCriteria criteria)
|
|
||||||
{
|
|
||||||
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] Delete Annotations by Type Docv", GetHashCode());
|
|
||||||
try
|
|
||||||
{
|
|
||||||
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
|
|
||||||
{
|
|
||||||
using (SqlCommand cm = cn.CreateCommand())
|
|
||||||
{
|
|
||||||
cm.CommandType = CommandType.StoredProcedure;
|
|
||||||
cm.CommandTimeout = Database.SQLTimeout;
|
|
||||||
cm.CommandText = "deleteAnnotationsDocvByType";
|
|
||||||
cm.Parameters.AddWithValue("@typeid", criteria.TypeID);
|
|
||||||
cm.Parameters.AddWithValue("@docvList", criteria.VersionID);
|
|
||||||
cm.ExecuteNonQuery();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
if (_MyLog.IsErrorEnabled) _MyLog.Error("Item.DataPortal_Delete", ex);
|
|
||||||
_ErrorMessage = ex.Message;
|
|
||||||
throw new DbCslaException("Item.DataPortal_Delete Annotations by type Docv", ex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static int _procCnt;
|
|
||||||
public static int ProcCnt
|
|
||||||
{
|
|
||||||
get { return _procCnt; }
|
|
||||||
set { _procCnt = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
[Serializable()]
|
|
||||||
protected class getAnnotationCountProcCriteria
|
|
||||||
{
|
|
||||||
private int _procCnt;
|
|
||||||
public int ProcCnt
|
|
||||||
{ get { return _procCnt; }
|
|
||||||
set { _procCnt = value; }
|
|
||||||
}
|
|
||||||
private int _typeID;
|
|
||||||
public int TypeID
|
|
||||||
{ get { return _typeID; } }
|
|
||||||
private string _procList;
|
|
||||||
public string ProcList
|
|
||||||
{ get { return _procList; } }
|
|
||||||
public getAnnotationCountProcCriteria(int typeID, string procList, int procCnt = 0)
|
|
||||||
{
|
|
||||||
_typeID = typeID;
|
|
||||||
_procList = procList;
|
|
||||||
_procCnt = procCnt;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[Transactional(TransactionalTypes.TransactionScope)]
|
|
||||||
private getAnnotationCountProcCriteria DataPortal_Fetch(getAnnotationCountProcCriteria criteria)
|
|
||||||
{
|
|
||||||
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] Item.DataPortal_Fetch", GetHashCode());
|
|
||||||
try
|
|
||||||
{
|
|
||||||
//int ProcCnt;
|
|
||||||
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
|
|
||||||
{
|
|
||||||
using (SqlCommand cm = cn.CreateCommand())
|
|
||||||
{
|
|
||||||
cm.CommandType = CommandType.StoredProcedure;
|
|
||||||
cm.CommandTimeout = Database.SQLTimeout;
|
|
||||||
cm.CommandText = "getAnnotationProcCount";
|
|
||||||
cm.Parameters.AddWithValue("@procList", criteria.ProcList);
|
|
||||||
cm.Parameters.AddWithValue("@typeid", criteria.TypeID);
|
|
||||||
Annotation.ProcCnt = (int)cm.ExecuteScalar();
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return criteria; //_procCnt.ToString();
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
if (_MyLog.IsErrorEnabled) _MyLog.Error("Annotation.GetAnnotationProcCnt", ex);
|
|
||||||
_ErrorMessage = ex.Message;
|
|
||||||
throw new DbCslaException("Annotation.GetAnnotationProcCnt by group", ex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static int _docvCnt;
|
|
||||||
public static int DocvCnt
|
|
||||||
{ get { return _docvCnt; }
|
|
||||||
set { _docvCnt = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
[Serializable()]
|
|
||||||
protected class getAnnotationCountDocvCriteria
|
|
||||||
{
|
|
||||||
private int _docvCnt;
|
|
||||||
public int DocvCnt
|
|
||||||
{ get { return _docvCnt; }
|
|
||||||
set { _docvCnt = value; }
|
|
||||||
}
|
|
||||||
private int _TypeID;
|
|
||||||
public int TypeID
|
|
||||||
{ get { return _TypeID; } }
|
|
||||||
private string _docvList;
|
|
||||||
public string DocvList
|
|
||||||
{ get { return _docvList; } }
|
|
||||||
public getAnnotationCountDocvCriteria(int typeID, string docvList, int docvCnt = 0)
|
|
||||||
{
|
|
||||||
_TypeID = typeID;
|
|
||||||
_docvList = docvList;
|
|
||||||
_docvCnt = docvCnt;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[Transactional(TransactionalTypes.TransactionScope)]
|
|
||||||
private getAnnotationCountDocvCriteria DataPortal_Fetch(getAnnotationCountDocvCriteria criteria)
|
|
||||||
{
|
|
||||||
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] Annotation.DataPortal_Fetch", GetHashCode());
|
|
||||||
try
|
|
||||||
{
|
|
||||||
//int ProcCnt;
|
|
||||||
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
|
|
||||||
{
|
|
||||||
using (SqlCommand cm = cn.CreateCommand())
|
|
||||||
{
|
|
||||||
cm.CommandType = CommandType.StoredProcedure;
|
|
||||||
cm.CommandTimeout = Database.SQLTimeout;
|
|
||||||
cm.CommandText = "getAnnotationDocvCount";
|
|
||||||
cm.Parameters.AddWithValue("@typeid", criteria.TypeID);
|
|
||||||
cm.Parameters.AddWithValue("@DocvList", criteria.DocvList);
|
|
||||||
Annotation.DocvCnt = (int)cm.ExecuteScalar();
|
|
||||||
}
|
|
||||||
return criteria;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
if (_MyLog.IsErrorEnabled) _MyLog.Error("Item.DataPortal_Delete", ex);
|
|
||||||
_ErrorMessage = ex.Message;
|
|
||||||
throw new DbCslaException("Item.DataPortal_Delete Annotations by group", ex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
//public partial class AnnotationTypeAnnotations
|
||||||
|
//{
|
||||||
|
// public static int GetAnnotationID()
|
||||||
|
// {
|
||||||
|
// return AnnotationTypeAnnotat
|
||||||
|
// }
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1309,8 +1309,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
else if (addType == EAddpingPart.Replace) // what about user interface for enhanced pasted steps?
|
else if (addType == EAddpingPart.Replace) // what about user interface for enhanced pasted steps?
|
||||||
{
|
{
|
||||||
ItemInfo enhReplaceItem = ItemInfo.Get(edSource.ItemID);
|
ItemInfo enhReplaceItem = ItemInfo.Get(edSource.ItemID);
|
||||||
TreeNode trn = null;
|
newEnhancedItemInfo = Item.PasteReplace(enhReplaceItem, tmpCopyEnhancedID, chgid);
|
||||||
newEnhancedItemInfo = Item.PasteReplace(enhReplaceItem, tmpCopyEnhancedID, chgid, trn);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// update the config data for the new enhanced item (procedure, section or step) to point back to the correct source
|
// update the config data for the new enhanced item (procedure, section or step) to point back to the correct source
|
||||||
@@ -2498,16 +2497,13 @@ namespace VEPROMS.CSLA.Library
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region PasteReplace
|
#region PasteReplace
|
||||||
|
public static ItemInfo PasteReplace(ItemInfo itemInfo, int copyStartID, string chgid)
|
||||||
|
|
||||||
|
|
||||||
public static ItemInfo PasteReplace(ItemInfo itemInfo, int copyStartID, string chgid, TreeNode treeNodeReplace)
|
|
||||||
{
|
{
|
||||||
bool tmp = false;
|
bool tmp= false;
|
||||||
return PasteReplace(itemInfo, copyStartID, chgid, treeNodeReplace, ref tmp);
|
return PasteReplace(itemInfo, copyStartID, chgid, ref tmp);
|
||||||
}
|
}
|
||||||
// B2017-179 return a bool (firstTrans) if we could not replace the step but the user wants to position to the first transition that needs resolved
|
// B2017-179 return a bool (firstTrans) if we could not replace the step but the user wants to position to the first transition that needs resolved
|
||||||
public static ItemInfo PasteReplace(ItemInfo itemInfo, int copyStartID, string chgid, TreeNode treeNodeReplace, ref bool firstTrans)
|
public static ItemInfo PasteReplace(ItemInfo itemInfo, int copyStartID, string chgid, ref bool firstTrans)
|
||||||
{
|
{
|
||||||
firstTrans = false;
|
firstTrans = false;
|
||||||
if (!CanDeleteObject())
|
if (!CanDeleteObject())
|
||||||
@@ -2547,7 +2543,6 @@ namespace VEPROMS.CSLA.Library
|
|||||||
newItemInfo.UpdateTransitionText();
|
newItemInfo.UpdateTransitionText();
|
||||||
newItemInfo.UpdateROText();
|
newItemInfo.UpdateROText();
|
||||||
newItemInfo.UpdatePastedStepTransitionText();
|
newItemInfo.UpdatePastedStepTransitionText();
|
||||||
|
|
||||||
// Add to tree
|
// Add to tree
|
||||||
if (newItemInfo.NextItem != null)
|
if (newItemInfo.NextItem != null)
|
||||||
{
|
{
|
||||||
@@ -2565,10 +2560,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//Create tree node for copied procedure when no other procedures exist in the working draft (treeNodeReplace)
|
newItemInfo.MyParent.OnNewChild(new ItemInfoInsertEventArgs(newItemInfo, ItemInfo.EAddpingPart.Child));
|
||||||
VETreeNode tn = null;
|
|
||||||
tn = new VETreeNode(newItemInfo);
|
|
||||||
treeNodeReplace.Nodes.Add(tn);
|
|
||||||
}
|
}
|
||||||
return newItemInfo;
|
return newItemInfo;
|
||||||
}
|
}
|
||||||
|
@@ -56,9 +56,6 @@ namespace Volian.Controls.Library
|
|||||||
|
|
||||||
private ROFSTLookup.rochild selectedChld;
|
private ROFSTLookup.rochild selectedChld;
|
||||||
|
|
||||||
private DisplayTags displayTags;
|
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Properties
|
#region Properties
|
||||||
@@ -271,10 +268,6 @@ namespace Volian.Controls.Library
|
|||||||
_searchTimer.Stop();
|
_searchTimer.Stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Initialize the DisplayTags object
|
|
||||||
displayTags = new DisplayTags();
|
|
||||||
|
|
||||||
_progressBar = null;
|
_progressBar = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -934,7 +927,7 @@ namespace Volian.Controls.Library
|
|||||||
bool replacingRO = (_savCurROLink != null);
|
bool replacingRO = (_savCurROLink != null);
|
||||||
|
|
||||||
string insrpl = (replacingRO) ? "Cannot Replace" : "Cannot Insert";
|
string insrpl = (replacingRO) ? "Cannot Replace" : "Cannot Insert";
|
||||||
string errormsg = string.Empty;
|
string errormsg = string.Empty;
|
||||||
|
|
||||||
switch (selectedRO.type)
|
switch (selectedRO.type)
|
||||||
{
|
{
|
||||||
@@ -975,10 +968,7 @@ namespace Volian.Controls.Library
|
|||||||
errormsg = (replacingRO) ? "a graphics RO with a non-graphcis RO." : "a Graphics RO in an non-Figure or a non-Accessory Page type.";
|
errormsg = (replacingRO) ? "a graphics RO with a non-graphcis RO." : "a Graphics RO in an non-Figure or a non-Accessory Page type.";
|
||||||
//TODO: Prompt user to insert a new substep type that handles x/y Plots and place this RO into it
|
//TODO: Prompt user to insert a new substep type that handles x/y Plots and place this RO into it
|
||||||
goodToGo = false;
|
goodToGo = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -346,11 +346,10 @@ namespace Volian.Controls.Library
|
|||||||
ch = (ROFSTLookup.rochild)cmboTreeROs.SelectedNode.Tag;
|
ch = (ROFSTLookup.rochild)cmboTreeROs.SelectedNode.Tag;
|
||||||
chld = ch.children;
|
chld = ch.children;
|
||||||
// build a list of ROs to search
|
// build a list of ROs to search
|
||||||
// B2022-118: remove the ending comma otherwise query will fail
|
return _MyRODbID.ToString() + ":" + GetROsToSearch(chld);
|
||||||
string strRtnStr = _MyRODbID.ToString() + ":" + GetROsToSearch(chld);
|
//return _MyRODbID.ToString() + ":" + ch.roid + "0000," + GetROsToSearch(chld);
|
||||||
if (strRtnStr.EndsWith(","))
|
//if (strRtnStr.EndsWith(","))
|
||||||
strRtnStr = strRtnStr.Substring(0, strRtnStr.Length - 1);
|
// strRtnStr = strRtnStr.Substring(0, strRtnStr.Length - 1);
|
||||||
return strRtnStr;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1940,13 +1939,6 @@ namespace Volian.Controls.Library
|
|||||||
private string GetROsToSearch(ROFSTLookup.rochild[] chld)
|
private string GetROsToSearch(ROFSTLookup.rochild[] chld)
|
||||||
{
|
{
|
||||||
string rtnstr = string.Empty;
|
string rtnstr = string.Empty;
|
||||||
// B2022-118: If the ro has child nodes in tree view but they aren't loaded, load them
|
|
||||||
if ((chld == null || chld.Length <= 0) && (cmboTreeROs.SelectedNode.Nodes != null || cmboTreeROs.SelectedNode.Nodes.Count >= 1))
|
|
||||||
{
|
|
||||||
ROFSTLookup.rochild ro = (ROFSTLookup.rochild)cmboTreeROs.SelectedNode.Tag;
|
|
||||||
MyROFSTLookup.LoadChildren(ref ro);
|
|
||||||
chld = ro.children;
|
|
||||||
}
|
|
||||||
|
|
||||||
// B2022-026 RO Memory Reduction code - check children length
|
// B2022-026 RO Memory Reduction code - check children length
|
||||||
if (chld == null || chld.Length <= 0) // get a single ROID
|
if (chld == null || chld.Length <= 0) // get a single ROID
|
||||||
@@ -1964,17 +1956,7 @@ namespace Volian.Controls.Library
|
|||||||
if (roc.children != null && roc.children.Length > 0)
|
if (roc.children != null && roc.children.Length > 0)
|
||||||
rtnstr += GetROsToSearch(roc.children);
|
rtnstr += GetROsToSearch(roc.children);
|
||||||
else
|
else
|
||||||
{
|
rtnstr += ROFSTLookup.FormatRoidKey(roc.roid, false);
|
||||||
// B2022-118: If the ro has child nodes in tree view but they aren't loaded, load them
|
|
||||||
ROFSTLookup.rochild rot = roc;
|
|
||||||
MyROFSTLookup.LoadChildren(ref rot);
|
|
||||||
chld = rot.children;
|
|
||||||
|
|
||||||
if (rot.children != null && rot.children.Length > 0)
|
|
||||||
rtnstr += GetROsToSearch(rot.children);
|
|
||||||
else
|
|
||||||
rtnstr += string.Format("{0},", ROFSTLookup.FormatRoidKey(roc.roid, false));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -669,7 +669,7 @@ namespace Volian.Controls.Library
|
|||||||
ItemInfo proc = myItemInfo.MyProcedure; // Find procedure Item
|
ItemInfo proc = myItemInfo.MyProcedure; // Find procedure Item
|
||||||
string key = "Item - " + proc.ItemID.ToString();
|
string key = "Item - " + proc.ItemID.ToString();
|
||||||
|
|
||||||
if (_MyDisplayTabItems.ContainsKey(key) && pasteType != ItemInfo.EAddpingPart.Replace) // If procedure page open use it unless replace
|
if (_MyDisplayTabItems.ContainsKey(key)) // If procedure page open use it
|
||||||
{
|
{
|
||||||
DisplayTabItem pg = _MyDisplayTabItems[key];
|
DisplayTabItem pg = _MyDisplayTabItems[key];
|
||||||
if (pg.MyStepTabPanel.MyStepPanel._LookupEditItems.ContainsKey(myItemInfo.ItemID) &&
|
if (pg.MyStepTabPanel.MyStepPanel._LookupEditItems.ContainsKey(myItemInfo.ItemID) &&
|
||||||
@@ -688,14 +688,8 @@ namespace Volian.Controls.Library
|
|||||||
edtitm.PasteSiblingAfter(copyStartID);
|
edtitm.PasteSiblingAfter(copyStartID);
|
||||||
break;
|
break;
|
||||||
case ItemInfo.EAddpingPart.Replace:
|
case ItemInfo.EAddpingPart.Replace:
|
||||||
|
|
||||||
EditItem ei = edtitm.PasteReplace(copyStartID);
|
EditItem ei = edtitm.PasteReplace(copyStartID);
|
||||||
if (ei == null)
|
if (ei == null) return false; //B2017-179 PasteReplace will return null if was aborted
|
||||||
{
|
|
||||||
CloseTabItem(_MyDisplayTabItems["Item - " + myItemInfo.ItemID.ToString()]); //Grab itemID and set to close open tab.
|
|
||||||
return false; //B2017-179 PasteReplace will return null if was aborted
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ei.MyItemInfo.ItemID != edtitm.MyItemInfo.ItemID)
|
if (ei.MyItemInfo.ItemID != edtitm.MyItemInfo.ItemID)
|
||||||
{
|
{
|
||||||
edtitm.Dispose();
|
edtitm.Dispose();
|
||||||
@@ -708,11 +702,6 @@ namespace Volian.Controls.Library
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (_MyDisplayTabItems.ContainsKey(key) && pasteType == ItemInfo.EAddpingPart.Replace)
|
|
||||||
{
|
|
||||||
CloseTabItem(_MyDisplayTabItems["Item - " + myItemInfo.ItemID.ToString()]); //Grab itemID and set to close open tab.
|
|
||||||
return false; //B2017-179 PasteReplace will return null if was aborted
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -640,7 +640,7 @@ namespace Volian.Controls.Library
|
|||||||
this.btnFSrestore.Location = new System.Drawing.Point(112, 27);
|
this.btnFSrestore.Location = new System.Drawing.Point(112, 27);
|
||||||
this.btnFSrestore.Margin = new System.Windows.Forms.Padding(2);
|
this.btnFSrestore.Margin = new System.Windows.Forms.Padding(2);
|
||||||
this.btnFSrestore.Name = "btnFSrestore";
|
this.btnFSrestore.Name = "btnFSrestore";
|
||||||
this.btnFSrestore.Size = new System.Drawing.Size(54, 20);
|
this.btnFSrestore.Size = new System.Drawing.Size(54, 26);
|
||||||
this.btnFSrestore.TabIndex = 6;
|
this.btnFSrestore.TabIndex = 6;
|
||||||
this.btnFSrestore.Text = "Restore";
|
this.btnFSrestore.Text = "Restore";
|
||||||
this.btnFSrestore.UseVisualStyleBackColor = true;
|
this.btnFSrestore.UseVisualStyleBackColor = true;
|
||||||
|
@@ -96,22 +96,6 @@ namespace Volian.Controls.Library
|
|||||||
get { return Visible; }
|
get { return Visible; }
|
||||||
set { if (Visible != value) Visible = value; }
|
set { if (Visible != value) Visible = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Expose text properties for height and widht to handle selecting RO Image Types.
|
|
||||||
/// </summary>
|
|
||||||
public string TbFSwd
|
|
||||||
{
|
|
||||||
get {return tbFSWd.Text;}
|
|
||||||
set { tbFSWd.Text = value; tbFSWd.Refresh(); trBarFS.Value = Convert.ToInt32(value); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public string TbFSht
|
|
||||||
{
|
|
||||||
get { return tbFSHt.Text; }
|
|
||||||
set { tbFSHt.Text = value; tbFSHt.Refresh(); _origFigureSizeRatio = float.Parse(value) / float.Parse(tbFSWd.Text); }
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
#region Constructor
|
#region Constructor
|
||||||
public DisplayTags()
|
public DisplayTags()
|
||||||
@@ -399,8 +383,6 @@ namespace Volian.Controls.Library
|
|||||||
cmbCheckoff.Enabled = false;
|
cmbCheckoff.Enabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// show the part of panel for resizing a figure (if figure already exists: MyImage is set for non-RO existing images & content.text has a link in it)
|
// show the part of panel for resizing a figure (if figure already exists: MyImage is set for non-RO existing images & content.text has a link in it)
|
||||||
if (MyEditItem.MyItemInfo.IsFigure && (MyEditItem.MyItemInfo.MyContent.MyImage != null || MyEditItem.MyItemInfo.MyContent.Text.ToUpper().Contains("#LINK")))
|
if (MyEditItem.MyItemInfo.IsFigure && (MyEditItem.MyItemInfo.MyContent.MyImage != null || MyEditItem.MyItemInfo.MyContent.Text.ToUpper().Contains("#LINK")))
|
||||||
{
|
{
|
||||||
@@ -409,41 +391,20 @@ namespace Volian.Controls.Library
|
|||||||
int wd = (MyEditItem as ImageItem).MyPictureBox.Width;
|
int wd = (MyEditItem as ImageItem).MyPictureBox.Width;
|
||||||
_origFigureSizeRatio = (float)ht / (float)wd; // use this to keep width/height ratio while changing size.
|
_origFigureSizeRatio = (float)ht / (float)wd; // use this to keep width/height ratio while changing size.
|
||||||
float wd1 = (float)MyEditItem.MyItemInfo.MyDocStyle.Layout.PageWidth - (float)MyEditItem.MyItemInfo.MyDocStyle.Layout.LeftMargin;
|
float wd1 = (float)MyEditItem.MyItemInfo.MyDocStyle.Layout.PageWidth - (float)MyEditItem.MyItemInfo.MyDocStyle.Layout.LeftMargin;
|
||||||
float ht1 = (float)MyEditItem.MyItemInfo.MyDocStyle.Layout.PageLength - (float)MyEditItem.MyItemInfo.MyDocStyle.Layout.TopMargin - 36; // 36 is to allow for end message
|
float ht1 = (float)MyEditItem.MyItemInfo.MyDocStyle.Layout.PageLength - (float)MyEditItem.MyItemInfo.MyDocStyle.Layout.TopMargin - 36; // 36 is to allow for end message
|
||||||
float wd2 = Math.Min(wd1, ht1 / _origFigureSizeRatio); // keep original ratio
|
float wd2 = Math.Min(wd1, ht1 / _origFigureSizeRatio); // keep original ratio
|
||||||
|
trBarFS.Maximum = Math.Max((int)wd2, trBarFS.Maximum);
|
||||||
SetFigure(wd1, wd2);
|
if (wd > trBarFS.Maximum) trBarFS.Maximum = wd + 1;
|
||||||
|
trBarFS.Minimum = Math.Min(wd, 72);
|
||||||
tbFSWd.Text = wd.ToString();
|
trBarFS.Value = (int)wd;
|
||||||
tbFSHt.Text = ht.ToString();
|
ImageItem ii = MyEditItem as ImageItem;
|
||||||
|
_origFigureSizeWidth = ii.MyPictureBox.Width;
|
||||||
//trBarFS.Maximum = Math.Max((int)wd2, trBarFS.Maximum);
|
tbFSWd.Text = ii.MyPictureBox.Width.ToString();
|
||||||
//if (wd > trBarFS.Maximum) trBarFS.Maximum = wd + 1;
|
tbFSHt.Text = ii.MyPictureBox.Height.ToString();
|
||||||
//trBarFS.Minimum = Math.Min(wd, 72);
|
|
||||||
//trBarFS.Value = (int)wd;
|
|
||||||
//ImageItem ii = MyEditItem as ImageItem;
|
|
||||||
//_origFigureSizeWidth = ii.MyPictureBox.Width;
|
|
||||||
//tbFSWd.Text = ii.MyPictureBox.Width.ToString();
|
|
||||||
//tbFSHt.Text = ii.MyPictureBox.Height.ToString();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (MyEditItem.MyItemInfo.IsFigure)
|
groupPanelFigSize.Visible = false;
|
||||||
{
|
|
||||||
//No Current image, but still show groupPanelFigSize, will adjust when file is selected, but let's give it a default
|
|
||||||
//size on using the picturebox.
|
|
||||||
groupPanelFigSize.Visible = true;
|
|
||||||
int ht = (MyEditItem as ImageItem).MyPictureBox.Height;
|
|
||||||
int wd = (MyEditItem as ImageItem).MyPictureBox.Width;
|
|
||||||
_origFigureSizeRatio = (float)ht / (float)wd; // use this to keep width/height ratio while changing size.
|
|
||||||
float wd1 = (float)MyEditItem.MyItemInfo.MyDocStyle.Layout.PageWidth - (float)MyEditItem.MyItemInfo.MyDocStyle.Layout.LeftMargin;
|
|
||||||
float ht1 = (float)MyEditItem.MyItemInfo.MyDocStyle.Layout.PageLength - (float)MyEditItem.MyItemInfo.MyDocStyle.Layout.TopMargin - 36; // 36 is to allow for end message
|
|
||||||
float wd2 = Math.Min(wd1, ht1 / _origFigureSizeRatio); // keep original ratio
|
|
||||||
|
|
||||||
SetFigure(wd1, wd2);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
groupPanelFigSize.Visible = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// change bar setting depends on whether step has changed (dts) as compared to date/time off the
|
// change bar setting depends on whether step has changed (dts) as compared to date/time off the
|
||||||
@@ -555,22 +516,6 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
_Initalizing = false;
|
_Initalizing = false;
|
||||||
}
|
}
|
||||||
public void SetFigure(double wd, double wd2)
|
|
||||||
{
|
|
||||||
// Check MyEditItem type and cast if needed
|
|
||||||
ImageItem ii = MyEditItem as ImageItem;
|
|
||||||
if (ii == null) return;
|
|
||||||
|
|
||||||
// Set the values as needed
|
|
||||||
trBarFS.Maximum = Math.Max((int)wd2, trBarFS.Maximum);
|
|
||||||
if (wd > trBarFS.Maximum) trBarFS.Maximum = (int)wd + 1;
|
|
||||||
trBarFS.Minimum = Math.Min((int)wd, 72);
|
|
||||||
trBarFS.Value = (int)wd;
|
|
||||||
_origFigureSizeWidth = ii.MyPictureBox.Width;
|
|
||||||
//tbFSWd.Text = ii.MyPictureBox.Width.ToString();
|
|
||||||
//tbFSHt.Text = ii.MyPictureBox.Height.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
private int DoListStepTypes(FormatData fmtdata, StepData topType, string curType)
|
private int DoListStepTypes(FormatData fmtdata, StepData topType, string curType)
|
||||||
{
|
{
|
||||||
int cursel=-1;
|
int cursel=-1;
|
||||||
@@ -912,7 +857,7 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
private float _origFigureSizeRatio = 0; // keep original ratio & width in case of 'restore'
|
private float _origFigureSizeRatio = 0; // keep original ratio & width in case of 'restore'
|
||||||
public int _origFigureSizeWidth = 0;
|
private int _origFigureSizeWidth = 0;
|
||||||
// support user changing size using slider. This saves change back to ImageItem and sets
|
// support user changing size using slider. This saves change back to ImageItem and sets
|
||||||
// width/height text boxes to slider values.
|
// width/height text boxes to slider values.
|
||||||
private void trBarFS_Scroll(object sender, EventArgs e)
|
private void trBarFS_Scroll(object sender, EventArgs e)
|
||||||
@@ -926,14 +871,11 @@ namespace Volian.Controls.Library
|
|||||||
// restore the orignal image size
|
// restore the orignal image size
|
||||||
private void btnFSrestore_Click(object sender, EventArgs e)
|
private void btnFSrestore_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (_origFigureSizeWidth != 0)
|
tbFSWd.Text = _origFigureSizeWidth.ToString();
|
||||||
{
|
int ht = (int)(_origFigureSizeRatio * _origFigureSizeWidth);
|
||||||
tbFSWd.Text = _origFigureSizeWidth.ToString();
|
tbFSHt.Text = ht.ToString();
|
||||||
int ht = (int)(_origFigureSizeRatio * _origFigureSizeWidth);
|
(MyEditItem as ImageItem).SizeImage(_origFigureSizeWidth, ht);
|
||||||
tbFSHt.Text = ht.ToString();
|
trBarFS.Value = _origFigureSizeWidth;
|
||||||
(MyEditItem as ImageItem).SizeImage(_origFigureSizeWidth, ht);
|
|
||||||
trBarFS.Value = _origFigureSizeWidth;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// user entered width in text box, this event gets called on leave of text box.
|
// user entered width in text box, this event gets called on leave of text box.
|
||||||
private void tbFSWd_Leave(object sender, EventArgs e)
|
private void tbFSWd_Leave(object sender, EventArgs e)
|
||||||
|
@@ -1209,7 +1209,7 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
EditItem child = null;
|
EditItem child = null;
|
||||||
if (MyItemInfo.IsFigure)
|
if (MyItemInfo.IsFigure)
|
||||||
child = new ImageItem(MyItemInfo, MyStepPanel, this, ChildRelation.After, true, nextEditItem, FigInsType, _MyStepPropertiesPanel);
|
child = new ImageItem(MyItemInfo, MyStepPanel, this, ChildRelation.After, true, nextEditItem, FigInsType);
|
||||||
else if (MyItemInfo.IsRtfRaw)
|
else if (MyItemInfo.IsRtfRaw)
|
||||||
child = new RtfRawItem(MyItemInfo, MyStepPanel, this, ChildRelation.After, true, nextEditItem);
|
child = new RtfRawItem(MyItemInfo, MyStepPanel, this, ChildRelation.After, true, nextEditItem);
|
||||||
else if (MyItemInfo.MyContent.MyGrid != null)
|
else if (MyItemInfo.MyContent.MyGrid != null)
|
||||||
@@ -1222,7 +1222,7 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
EditItem child = null;
|
EditItem child = null;
|
||||||
if (MyItemInfo.IsFigure)
|
if (MyItemInfo.IsFigure)
|
||||||
child = new ImageItem(MyItemInfo, MyStepPanel, this, ChildRelation.Before, true, nextEditItem, FigInsType, _MyStepPropertiesPanel);
|
child = new ImageItem(MyItemInfo, MyStepPanel, this, ChildRelation.Before, true, nextEditItem, FigInsType);
|
||||||
else if (MyItemInfo.IsRtfRaw)
|
else if (MyItemInfo.IsRtfRaw)
|
||||||
child = new RtfRawItem(MyItemInfo, MyStepPanel, this, ChildRelation.Before, true, nextEditItem);
|
child = new RtfRawItem(MyItemInfo, MyStepPanel, this, ChildRelation.Before, true, nextEditItem);
|
||||||
if (MyItemInfo.MyContent.MyGrid != null)
|
if (MyItemInfo.MyContent.MyGrid != null)
|
||||||
@@ -1825,16 +1825,7 @@ namespace Volian.Controls.Library
|
|||||||
EditItem newFocus = null;
|
EditItem newFocus = null;
|
||||||
EditItem nextEditItem = MyNextEditItem;
|
EditItem nextEditItem = MyNextEditItem;
|
||||||
EditItem prevEditItem = MyPreviousEditItem;
|
EditItem prevEditItem = MyPreviousEditItem;
|
||||||
EditItem parentEditItem = null; // ActiveParent;
|
EditItem parentEditItem = ActiveParent;
|
||||||
try
|
|
||||||
{
|
|
||||||
parentEditItem = ActiveParent ?? MyStepPanel?.SelectedEditItem?.ActiveParent;
|
|
||||||
}
|
|
||||||
catch (NullReferenceException)
|
|
||||||
{
|
|
||||||
// KL 7/11/2024 - Handle the case where ActiveParent throws a Null Reference Exception
|
|
||||||
parentEditItem = MyStepPanel?.SelectedEditItem?.ActiveParent;
|
|
||||||
}
|
|
||||||
|
|
||||||
StepConfig savOrigPasteConfig = MyItemInfo.MyConfig as StepConfig;
|
StepConfig savOrigPasteConfig = MyItemInfo.MyConfig as StepConfig;
|
||||||
int TopMostYBefore = TopMostEditItem.Top;
|
int TopMostYBefore = TopMostEditItem.Top;
|
||||||
@@ -1844,8 +1835,7 @@ namespace Volian.Controls.Library
|
|||||||
bool gotoFirstTrans = false;
|
bool gotoFirstTrans = false;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
TreeNode treeNodeReplace = null;
|
newItemInfo = Item.PasteReplace(MyItemInfo, copyStartID, GetChangeId(MyItemInfo), ref gotoFirstTrans);
|
||||||
newItemInfo = Item.PasteReplace(MyItemInfo, copyStartID, GetChangeId(MyItemInfo), treeNodeReplace, ref gotoFirstTrans);
|
|
||||||
if (gotoFirstTrans) //B2017-179 could not replace step, we are positioning onto the first transition that needs resolved
|
if (gotoFirstTrans) //B2017-179 could not replace step, we are positioning onto the first transition that needs resolved
|
||||||
{
|
{
|
||||||
MyStepPanel.MyStepTabPanel.MyDisplayTabControl.OpenItem(newItemInfo);
|
MyStepPanel.MyStepTabPanel.MyDisplayTabControl.OpenItem(newItemInfo);
|
||||||
|
@@ -256,8 +256,6 @@ namespace Volian.Controls.Library
|
|||||||
private int _origCfgHt = 0; // keep track if original size was stored in cfg
|
private int _origCfgHt = 0; // keep track if original size was stored in cfg
|
||||||
private int _origCfgWd = 0;
|
private int _origCfgWd = 0;
|
||||||
private bool _pastedNew = false; // need this for flagging newly pasted image (may need to clear cfg)
|
private bool _pastedNew = false; // need this for flagging newly pasted image (may need to clear cfg)
|
||||||
private DisplayTags _displayTags;
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
#region Constructors
|
#region Constructors
|
||||||
public ImageItem()
|
public ImageItem()
|
||||||
@@ -268,7 +266,6 @@ namespace Volian.Controls.Library
|
|||||||
public ImageItem(ItemInfo itemInfo, StepPanel myStepPanel, EditItem myParentEditItem, ChildRelation myChildRelation, bool expand)
|
public ImageItem(ItemInfo itemInfo, StepPanel myStepPanel, EditItem myParentEditItem, ChildRelation myChildRelation, bool expand)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
MyItemInfo = itemInfo;
|
MyItemInfo = itemInfo;
|
||||||
SetupEditItem(itemInfo, myStepPanel, myParentEditItem, myChildRelation, expand, null, false);
|
SetupEditItem(itemInfo, myStepPanel, myParentEditItem, myChildRelation, expand, null, false);
|
||||||
if (MyItemInfo.MyContent.MyImage != null && MyItemInfo.MyContent.MyImage.Data != null) // this is figure/image (not RO)
|
if (MyItemInfo.MyContent.MyImage != null && MyItemInfo.MyContent.MyImage.Data != null) // this is figure/image (not RO)
|
||||||
@@ -310,7 +307,6 @@ namespace Volian.Controls.Library
|
|||||||
this.Height = MyPictureBox.Height + 10;
|
this.Height = MyPictureBox.Height + 10;
|
||||||
_newSizeWd = wd / (MyStepPanel.DPI / 72);
|
_newSizeWd = wd / (MyStepPanel.DPI / 72);
|
||||||
_newSizeHt = ht / (MyStepPanel.DPI / 72);
|
_newSizeHt = ht / (MyStepPanel.DPI / 72);
|
||||||
|
|
||||||
if (!MyItemInfo.FormatStepData.StepEditData.TypeMenu.MenuItem.ToUpper().Contains("AER")) ItemLocation = TableLocation(MyStepSectionLayoutData, ItemWidth);
|
if (!MyItemInfo.FormatStepData.StepEditData.TypeMenu.MenuItem.ToUpper().Contains("AER")) ItemLocation = TableLocation(MyStepSectionLayoutData, ItemWidth);
|
||||||
_IsDirty = true;
|
_IsDirty = true;
|
||||||
}
|
}
|
||||||
@@ -334,23 +330,13 @@ namespace Volian.Controls.Library
|
|||||||
MyPictureBox.SizeMode = PictureBoxSizeMode.Zoom; // as resize matches width/height.
|
MyPictureBox.SizeMode = PictureBoxSizeMode.Zoom; // as resize matches width/height.
|
||||||
this.Width = MyPictureBox.Width + ImageMargin;
|
this.Width = MyPictureBox.Width + ImageMargin;
|
||||||
this.Height = MyPictureBox.Height + 10;
|
this.Height = MyPictureBox.Height + 10;
|
||||||
if (_displayTags != null)
|
|
||||||
{
|
|
||||||
_displayTags._origFigureSizeWidth = wd;
|
|
||||||
_displayTags.TbFSwd = wd.ToString();
|
|
||||||
_displayTags.TbFSht = ht.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
// the following gets called for 'NEW' images
|
// the following gets called for 'NEW' images
|
||||||
private E_ImageSource InsType = E_ImageSource.None;
|
private E_ImageSource InsType = E_ImageSource.None;
|
||||||
public ImageItem(ItemInfo itemInfo, StepPanel myStepPanel, EditItem myParentEditItem, ChildRelation myChildRelation, bool expand, EditItem nextEditItem, ImageItem.E_ImageSource insType, DisplayTags displayTags)
|
public ImageItem(ItemInfo itemInfo, StepPanel myStepPanel, EditItem myParentEditItem, ChildRelation myChildRelation, bool expand, EditItem nextEditItem, ImageItem.E_ImageSource insType)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
MyItemInfo = itemInfo;
|
MyItemInfo = itemInfo;
|
||||||
_displayTags = displayTags;
|
|
||||||
|
|
||||||
if (MyItemInfo.MyContent.MyImage != null && MyItemInfo.MyContent.MyImage.Data != null) // this is figure/image (not RO)
|
if (MyItemInfo.MyContent.MyImage != null && MyItemInfo.MyContent.MyImage.Data != null) // this is figure/image (not RO)
|
||||||
{
|
{
|
||||||
SetupEditItem(itemInfo, myStepPanel, myParentEditItem, myChildRelation, expand, nextEditItem, false);
|
SetupEditItem(itemInfo, myStepPanel, myParentEditItem, myChildRelation, expand, nextEditItem, false);
|
||||||
@@ -382,8 +368,8 @@ namespace Volian.Controls.Library
|
|||||||
FileName = null;
|
FileName = null;
|
||||||
//InitializeComponent();
|
//InitializeComponent();
|
||||||
SetupEditItem(itemInfo, myStepPanel, myParentEditItem, myChildRelation, expand, nextEditItem, false);
|
SetupEditItem(itemInfo, myStepPanel, myParentEditItem, myChildRelation, expand, nextEditItem, false);
|
||||||
//MyPictureBox.Width = 100;
|
MyPictureBox.Width = 100;
|
||||||
//MyPictureBox.Height = 100;
|
MyPictureBox.Height = 100;
|
||||||
this.Width = 100 + ImageMargin;
|
this.Width = 100 + ImageMargin;
|
||||||
this.Height = 100;
|
this.Height = 100;
|
||||||
if (insType == ImageItem.E_ImageSource.File)
|
if (insType == ImageItem.E_ImageSource.File)
|
||||||
@@ -560,7 +546,6 @@ namespace Volian.Controls.Library
|
|||||||
imageText = val;
|
imageText = val;
|
||||||
}
|
}
|
||||||
AddROImageToScreen(W, H, imageText);
|
AddROImageToScreen(W, H, imageText);
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@@ -1612,13 +1612,7 @@ namespace Volian.Controls.Library
|
|||||||
if (!docVersionIsEnhanced && !docVersionIsSource && !procIsSource) canPaste = true;
|
if (!docVersionIsEnhanced && !docVersionIsSource && !procIsSource) canPaste = true;
|
||||||
else if (docVersionIsSource && !procIsSource) canPaste = true;
|
else if (docVersionIsSource && !procIsSource) canPaste = true;
|
||||||
else if (docVersionIsSource) canPaste = (!procIsSource || (iiClipboard.MyDocVersion.ItemID == dvi.ItemID));
|
else if (docVersionIsSource) canPaste = (!procIsSource || (iiClipboard.MyDocVersion.ItemID == dvi.ItemID));
|
||||||
else if (docVersionIsEnhanced)
|
else if (docVersionIsEnhanced) canPaste = !procIsSource;
|
||||||
{
|
|
||||||
// B2024-028 Do not allow paste of non-enhanced into enhanced set
|
|
||||||
// (consistent with paste before/after, i.e. don't allow)
|
|
||||||
canPaste = false;
|
|
||||||
cm.MenuItems.Add("CANNOT PASTE HERE, Click for more information...", new EventHandler(mi_Click));
|
|
||||||
}
|
|
||||||
if (iiClipboard.IsRtfRaw) canPaste = false; // never paste an equation.
|
if (iiClipboard.IsRtfRaw) canPaste = false; // never paste an equation.
|
||||||
if (canPaste) cm.MenuItems.Add("Paste Procedure", new EventHandler(mi_Click));
|
if (canPaste) cm.MenuItems.Add("Paste Procedure", new EventHandler(mi_Click));
|
||||||
}
|
}
|
||||||
@@ -1676,9 +1670,9 @@ namespace Volian.Controls.Library
|
|||||||
if (!prCanPaste)
|
if (!prCanPaste)
|
||||||
{
|
{
|
||||||
if (prToIsEnhanced)
|
if (prToIsEnhanced)
|
||||||
cm.MenuItems.Add("CANNOT PASTE HERE, Click for more information...", new EventHandler(mi_Click));
|
cm.MenuItems.Add("CANNOT PASTE HERE, Click for more information...", new EventHandler(mi_Click));
|
||||||
else
|
else
|
||||||
cm.MenuItems.Add("CANNOT PASTE HERE. Click for more information...", new EventHandler(mi_Click));
|
cm.MenuItems.Add("CANNOT PASTE HERE. Click for more information...", new EventHandler(mi_Click));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@@ -2018,6 +2012,7 @@ namespace Volian.Controls.Library
|
|||||||
// lots of paste options:
|
// lots of paste options:
|
||||||
case "Paste Procedure":
|
case "Paste Procedure":
|
||||||
case "Paste Procedure Before":
|
case "Paste Procedure Before":
|
||||||
|
case "Replace Existing Procedure":
|
||||||
case "Paste Procedure After":
|
case "Paste Procedure After":
|
||||||
case "Paste Section":
|
case "Paste Section":
|
||||||
case "Paste Section Before":
|
case "Paste Section Before":
|
||||||
@@ -2030,18 +2025,6 @@ namespace Volian.Controls.Library
|
|||||||
case "Paste Subsection":
|
case "Paste Subsection":
|
||||||
tv_NodePaste(mi.Text);
|
tv_NodePaste(mi.Text);
|
||||||
break;
|
break;
|
||||||
case "Replace Existing Procedure":
|
|
||||||
DialogResult ovewriteEx = FlexibleMessageBox.Show("This will overwrite the selected procedure with then one you copied, would you like to overwrite it?\r\n\r\nSelecting 'Cancel' will cancel the paste action.", "Overwrite the procedure?", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);// == DialogResult.Yes;
|
|
||||||
|
|
||||||
if (ovewriteEx == DialogResult.Cancel) break;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
TreeNode treenodeDirectory = SelectedNode.Parent;
|
|
||||||
tv_NodePaste(mi.Text);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
case "Delete":
|
case "Delete":
|
||||||
if (tv_NodeDelete())
|
if (tv_NodeDelete())
|
||||||
{
|
{
|
||||||
@@ -2120,9 +2103,8 @@ namespace Volian.Controls.Library
|
|||||||
"It can only be pasted before or after another document, within the set, that is linked to an Enhanced Document.", "Cannot Paste Here");
|
"It can only be pasted before or after another document, within the set, that is linked to an Enhanced Document.", "Cannot Paste Here");
|
||||||
break;
|
break;
|
||||||
case "CANNOT PASTE HERE, Click for more information...":
|
case "CANNOT PASTE HERE, Click for more information...":
|
||||||
// B2024-028 clarify message
|
|
||||||
FlexibleMessageBox.Show("You have copied a document that is NOT linked to an Enhanced Document.\n\n" +
|
FlexibleMessageBox.Show("You have copied a document that is NOT linked to an Enhanced Document.\n\n" +
|
||||||
"You cannot paste a Non-Enhanced Procedure into an Enhanced Procedure Set.", "Cannot Paste Here");
|
"It CANNOT be pasted before or after an Enhanced Document.", "Cannot Paste Here");
|
||||||
break;
|
break;
|
||||||
//case "Check Out Procedure Set":
|
//case "Check Out Procedure Set":
|
||||||
// CheckOutDocVersion(SelectedNode as VETreeNode);
|
// CheckOutDocVersion(SelectedNode as VETreeNode);
|
||||||
@@ -2408,7 +2390,6 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
VETreeNode tn = SelectedNode as VETreeNode;
|
VETreeNode tn = SelectedNode as VETreeNode;
|
||||||
TreeNode treeNodeReplace = SelectedNode.Parent; //Get Tree Node of Parent we are proc we are placing into.
|
|
||||||
DocVersionInfo dvi = tn.VEObject as DocVersionInfo;
|
DocVersionInfo dvi = tn.VEObject as DocVersionInfo;
|
||||||
// Check for paste into a docversion - queries/code is different than paste related to an item (into a proc or section)
|
// Check for paste into a docversion - queries/code is different than paste related to an item (into a proc or section)
|
||||||
if (dvi != null)
|
if (dvi != null)
|
||||||
@@ -2444,17 +2425,13 @@ namespace Volian.Controls.Library
|
|||||||
else if (p.IndexOf("After") > -1)
|
else if (p.IndexOf("After") > -1)
|
||||||
PasteBeforeOrAfter(MenuSelections.StepAfter, tn, iiClipboard.ItemID);
|
PasteBeforeOrAfter(MenuSelections.StepAfter, tn, iiClipboard.ItemID);
|
||||||
else if (p.IndexOf("Replace") > -1)
|
else if (p.IndexOf("Replace") > -1)
|
||||||
{
|
PasteReplace(tn, iiClipboard.ItemID);
|
||||||
PasteReplace(tn, iiClipboard.ItemID, treeNodeReplace);
|
|
||||||
}
|
|
||||||
else // paste as child
|
else // paste as child
|
||||||
PasteAsChild(tn, iiClipboard.ItemID);
|
PasteAsChild(tn, iiClipboard.ItemID);
|
||||||
|
this.Cursor = Cursors.Default;
|
||||||
//if (p.IndexOf("Replace") <= -1)
|
|
||||||
this.Cursor = Cursors.Default;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PasteAsDocVersionChild(VETreeNode tn, int copyStartID)
|
private void PasteAsDocVersionChild(VETreeNode tn, int copyStartID)
|
||||||
{
|
{
|
||||||
// Only need to handle paste in tree since this will create a new procedure.
|
// Only need to handle paste in tree since this will create a new procedure.
|
||||||
DocVersionInfo dvi = tn.VEObject as DocVersionInfo;
|
DocVersionInfo dvi = tn.VEObject as DocVersionInfo;
|
||||||
@@ -2541,7 +2518,7 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
SelectedNode = (VETreeNode)((newtype == MenuSelections.StepAfter) ? tn.NextNode : tn.PrevNode);
|
SelectedNode = (VETreeNode)((newtype == MenuSelections.StepAfter) ? tn.NextNode : tn.PrevNode);
|
||||||
}
|
}
|
||||||
private void PasteReplace(VETreeNode tn, int copyStartID, TreeNode treeNodeReplace)
|
private void PasteReplace(VETreeNode tn, int copyStartID)
|
||||||
{
|
{
|
||||||
VETreeNode prevtn = (VETreeNode) tn.PrevNode;
|
VETreeNode prevtn = (VETreeNode) tn.PrevNode;
|
||||||
VETreeNode partn = (VETreeNode) tn.Parent;
|
VETreeNode partn = (VETreeNode) tn.Parent;
|
||||||
@@ -2552,43 +2529,23 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
// first, check if a changeid is required.
|
// first, check if a changeid is required.
|
||||||
string chgId = OnGetChangeId(this, new vlnTreeItemInfoEventArgs(ii));
|
string chgId = OnGetChangeId(this, new vlnTreeItemInfoEventArgs(ii));
|
||||||
ItemInfo replItemInfo = Item.PasteReplace(ii, copyStartID, chgId, treeNodeReplace);
|
ItemInfo replItemInfo = Item.PasteReplace(ii, copyStartID, chgId);
|
||||||
|
|
||||||
StepConfig replItemConfig = ii.MyConfig as StepConfig;
|
StepConfig replItemConfig = ii.MyConfig as StepConfig;
|
||||||
if (replItemInfo != null)
|
if (replItemInfo != null)
|
||||||
{
|
{
|
||||||
|
OnOpenItem(this, new vlnTreeItemInfoEventArgs(replItemInfo));
|
||||||
ItemInfo newEnhStep = replItemInfo.PasteEnhancedItems(copyStartID, ii, ItemInfo.EAddpingPart.Replace, chgId);
|
ItemInfo newEnhStep = replItemInfo.PasteEnhancedItems(copyStartID, ii, ItemInfo.EAddpingPart.Replace, chgId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// B2018-047: was crashing on the following line (before change it was casting the result to a VETreeNote when the partn.FirstNode was just a TreeNode)
|
// B2018-047: was crashing on the following line (before change it was casting the result to a VETreeNote when the partn.FirstNode was just a TreeNode)
|
||||||
SelectedNode = prevtn != null ? prevtn.NextNode : partn.FirstNode;
|
SelectedNode = prevtn != null ? prevtn.NextNode : partn.FirstNode;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
public void PasteRepalceEmpty(VETreeNode tn, int copyStartID)
|
private void tv_NodeCopy()
|
||||||
{
|
{
|
||||||
// Only need to handle paste in tree since this will create a new procedure.
|
if (SelectedNode==null)return;
|
||||||
DocVersionInfo dvi = tn.VEObject as DocVersionInfo;
|
|
||||||
if (dvi.DocVersionAssociationCount == 0)
|
|
||||||
{
|
|
||||||
// Set docversionassociation to the copied docversion association
|
|
||||||
// so that the rofst for ro's can be found. (if there is no association set)
|
|
||||||
ROFstInfo rfi = GetAssociationRofstId(copyStartID);
|
|
||||||
Association myAs = Association.MakeAssociation(dvi.Get(), rfi.GetJustROFst(), "");
|
|
||||||
dvi.RefreshDocVersionAssociations();
|
|
||||||
}
|
|
||||||
ItemInfo newProc = dvi.PasteChild(copyStartID);
|
|
||||||
VETreeNode tn1 = new VETreeNode(newProc);
|
|
||||||
SelectedNode.Nodes.Add(tn1); // add tree node to end of list.
|
|
||||||
SelectedNode = tn1;
|
|
||||||
}
|
|
||||||
private void tv_NodeCopy()
|
|
||||||
{
|
|
||||||
if (SelectedNode == null) return;
|
|
||||||
VETreeNode tn = SelectedNode as VETreeNode;
|
VETreeNode tn = SelectedNode as VETreeNode;
|
||||||
OnNodeCopy(this, new vlnTreeEventArgs(tn));
|
OnNodeCopy(this, new vlnTreeEventArgs(tn));
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
#region PropertyPagesInterface
|
#region PropertyPagesInterface
|
||||||
private void SetupNodeProperties()
|
private void SetupNodeProperties()
|
||||||
@@ -3101,15 +3058,6 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
SaveEnhancedForSection(sourceSect, newenhSection, sed.Type);
|
SaveEnhancedForSection(sourceSect, newenhSection, sed.Type);
|
||||||
RefreshRelatedNode(SectionInfo.Get(newenhSection.ItemID));
|
RefreshRelatedNode(SectionInfo.Get(newenhSection.ItemID));
|
||||||
// B2024-023: when inserting a source section, the associated
|
|
||||||
// enhanced section did not appear in tree view or in edit window (if it
|
|
||||||
// was displayed in editor). Add to tree view and close the enhanced
|
|
||||||
// procedure edit window. Note that closing of edit window was done to
|
|
||||||
// be consistent on what happens upon delete of source w/ and enhanced
|
|
||||||
// section.
|
|
||||||
SectionInfo tmpsi = SectionInfo.Get(newenhSection.ItemID);
|
|
||||||
RefreshRelatedNode(ProcedureInfo.Get(tmpsi.MyParent.ItemID));
|
|
||||||
OnSectionShouldClose(this, new vlnTreeSectionInfoEventArgs(tmpsi, true));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
@@ -699,7 +699,7 @@ namespace Volian.Print.Library
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (File.Exists(outputFileName) && !OverWrite && !outputFileName.Contains("PageNumberPass") && !outputFileName.Contains("Foldout"))
|
if (File.Exists(outputFileName))
|
||||||
{
|
{
|
||||||
if (!BaselineTesting && !SaveLinks) // B2024-031 don't do if creating PDF hyperlinks
|
if (!BaselineTesting && !SaveLinks) // B2024-031 don't do if creating PDF hyperlinks
|
||||||
{
|
{
|
||||||
@@ -836,6 +836,14 @@ namespace Volian.Print.Library
|
|||||||
OnStatusChanged("Print " + myProcedure.DisplayNumber, PromsPrinterStatusType.Start);
|
OnStatusChanged("Print " + myProcedure.DisplayNumber, PromsPrinterStatusType.Start);
|
||||||
string outputFileName = pdfFolder + "\\" + Prefix + PDFFile; // RHM20150506 Multiline ItemID TextBox
|
string outputFileName = pdfFolder + "\\" + Prefix + PDFFile; // RHM20150506 Multiline ItemID TextBox
|
||||||
|
|
||||||
|
if (!OverWrite && File.Exists(outputFileName))
|
||||||
|
{
|
||||||
|
if (MessageBox.Show(outputFileName + " exists. Overwrite file?", "File Exists", MessageBoxButtons.YesNo) == DialogResult.No)
|
||||||
|
{
|
||||||
|
ProfileTimer.Pop(profileDepth);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
string retval = PrintProcedureOrFoldout(myProcedure, null, outputFileName, makePlacekeeper, makeContinuousActionSummary, makeTimeCriticalAction);
|
string retval = PrintProcedureOrFoldout(myProcedure, null, outputFileName, makePlacekeeper, makeContinuousActionSummary, makeTimeCriticalAction);
|
||||||
ProfileTimer.Pop(profileDepth);
|
ProfileTimer.Pop(profileDepth);
|
||||||
return retval;
|
return retval;
|
||||||
|
Reference in New Issue
Block a user