![]() |
#1 |
Участник
|
axaptapedia: AOT Search Results Save/Load
Источник: http://www.axaptapedia.com/AOT_Search_Results_Save/Load
============== Summary: Saving and Loading AOT Search Results <div>So, this might not interest a lot of people... But, then again... It takes me on average about 45 Minutes to do a full scan of the AOT when I'm looking at all levels. That's a lot of time when you're analysing a system and I don't like repeating the search, because it's the end of the day or someone wants to restart the AOS or some such. So I came up with a way of saving and loading search results. Here are the Methods for accomplishing this. I'll leave setting up the Buttons on the Form SysAOTFind, getting the Filename and calling the Methods up to You! Have fun and I hope that it helps you out! void SaveResults(Filename _file) { FormListColumn formListColumn; FormListItem formListItem; AsciiIo asciiIo = new AsciiIo(_file, 'w'); int columns = resultListView.getColumnCount(); int rows = resultListView.getCount(); int i; int j; str text; str productName; str licenceHolder; str applicationDirectory; anytype data; int image, overlay, indent; boolean foundProperties; ; productName = xInfo::productName() + ' ' + xInfo::releaseVersion() + ' Build #' + xInfo::buildNo() + '/' + ApplicationVersion::buildNo(); licenceHolder = xInfo::licenseName() ? xInfo::licenseName() : 'Internal'; applicationDirectory = xInfo::directory(DirectoryType::Appl); asciiIo.inRecordDelimiter('\n'); asciiIo.write("***Element: System"); asciiIo.write(" "); asciiIo.write(strfmt(" ProductName: %1", productName)); asciiIo.write(strfmt(" LicenseHolder: %1", licenceHolder)); asciiIo.write(strfmt(" ApplicationDirectory: %1", applicationDirectory)); asciiIo.write(" "); asciiIo.write("***Element: Search Definition"); asciiIo.write(" "); asciiIo.write(strfmt(" Search: %1", search.selection())); asciiIo.write(strfmt(" Named: %1", Named.text())); asciiIo.write(strfmt(" ContainingText: %1", ContainingText.text())); asciiIo.write(strfmt(" LookInRange: %1", LookInRange.text())); asciiIo.write(strfmt(" ShowSource: %1", ShowSource.checked())); asciiIo.write(strfmt(" UseTreeSelection: %1", UseTreeSelection.checked())); asciiIo.write(strfmt(" DateRange: %1", DateRange.text())); asciiIo.write(strfmt(" ByRange: %1", ByRange.text())); asciiIo.write(strfmt(" IncludeEmpty: %1", IncludeEmpty.checked())); asciiIo.write(strfmt(" ApplObjectTypeRange: %1", ApplObjectTypeRange.text())); asciiIo.write(strfmt(" SizeRange: %1", SizeRange.text())); asciiIo.write(strfmt(" applObjectLayerRange: %1", applObjectLayerRange.text())); asciiIo.write(strfmt(" RunModeRange: %1", RunModeRange.text())); asciiIo.write(strfmt(" FilterMethod: %1", FilterMethod.text())); if (search.selection() == 0) { while select tmpPropertySelection index Selected where tmpPropertySelection.Selected == true || tmpPropertySelection.Criteria != '' { if (!foundProperties) { asciiIo.write(" Properties: "); foundProperties = true; } asciiIo.write(strfmt(" Property: %1", tmpPropertySelection.Property)); asciiIo.write(strfmt(" Selected: %1", tmpPropertySelection.Selected)); asciiIo.write(strfmt(" Criteria: %1", tmpPropertySelection.Criteria)); } if (foundProperties) asciiIo.write(" EndProperties:"); } asciiIo.write(" "); asciiIo.write("***Element: Result Count"); asciiIo.write(" "); asciiIo.write(strfmt(" Count: %1", counterHits)); asciiIo.write(" "); asciiIo.write("***Element: Result Definition"); asciiIo.write(" "); for (i = 0; i 0) hitsText.text(strFmt("@SYS26824", counter)); } } catch { element.unLock(); endLengthyOperation(); throw error("@SYS79625"); } element.resetSize(); element.unLock(); endLengthyOperation(); } boolean CheckIsSystemOkay(container _data) { str line; str token, value; str productName; str licenseHolder; str applicationDirectory; int i; int lines = conlen(_data); boolean foundProdName; boolean foundLicHolder; boolean foundAppDir; boolean ok = true; boolean ret; ; productName = xInfo::productName() + ' ' + xInfo::releaseVersion() + ' Build #' + xInfo::buildNo() + '/' + ApplicationVersion::buildNo(); licenseHolder = xInfo::licenseName() ? xInfo::licenseName() : 'Internal'; applicationDirectory = xInfo::directory(DirectoryType::Appl); for (i = 2; i
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|