B2020-107: Search Save/Load (continued)

This commit is contained in:
Kathy Ruffing 2020-08-17 15:32:51 +00:00
parent 9142e7b168
commit 003874be8f
2 changed files with 10 additions and 1 deletions

View File

@ -2633,6 +2633,7 @@ namespace VEPROMS.CSLA.Library
public int SearchAnnotationID
{
get { return _SearchAnnotationID; }
set { _SearchAnnotationID = value; }
}
internal string _SearchAnnotationText;
public string SearchAnnotationText

View File

@ -2164,6 +2164,8 @@ namespace Volian.Controls.Library
private void btnLoadSearchResults_Click(object sender, System.EventArgs e)
{
_fromLoad = true;
_LoadingList = true;
ofdSearchResults.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\VEPROMS";
if (ofdSearchResults.ShowDialog(this) == DialogResult.OK)
{
lbSrchResults.DataSource = null;
@ -2276,7 +2278,11 @@ namespace Volian.Controls.Library
int itemID = int.Parse(nd.Attributes.GetNamedItem("id").InnerText);
ItemInfo ii = ItemInfo.Get(itemID);
// B2020-107: The following was needed to set the Step Path result type for annotations
if (ii.SearchAnnotationText == null && ii.ItemAnnotations != null) ii.SearchAnnotationText = AnnotationInfo.Get(ii.ItemAnnotations[0].AnnotationID).SearchText;
if (ii.SearchAnnotationText == null && ii.ItemAnnotations != null)
{
ii.SearchAnnotationText = AnnotationInfo.Get(ii.ItemAnnotations[0].AnnotationID).SearchText;
ii.SearchAnnotationID = ii.ItemAnnotations[0].AnnotationID;
}
SearchResults.AddItemInfo(ii);
}
lbSrchResults.DataSource = SearchResults;
@ -2305,6 +2311,7 @@ namespace Volian.Controls.Library
}
Cursor = Cursors.Default;
}
_LoadingList = false;
}
private void btnSaveSearchResults_Click(object sender, System.EventArgs e)
@ -2315,6 +2322,7 @@ namespace Volian.Controls.Library
FlexibleMessageBox.Show(this, "Saving Referenced Objects and Transitions searches is under construction.", "Under Construction", MessageBoxButtons.OK);
return;
}
sfdSearchResults.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\VEPROMS";
if (sfdSearchResults.ShowDialog(this) == DialogResult.OK)
{
int k = sfdSearchResults.FilterIndex;