@@ -404,6 +404,7 @@ public void UiLoadPackageWithNew(
404
404
if ( info == null )
405
405
info = loadLocalFilename ;
406
406
Log . Singleton . Info ( "Loading new AASX from: {0} as auxiliary {1} .." , info , onlyAuxiliary ) ;
407
+
407
408
if ( ! packItem . Load ( PackageCentral , loadLocalFilename , loadLocalFilename ,
408
409
overrideLoadResident : true ,
409
410
PackageContainerOptionsBase . CreateDefault ( Options . Curr ) ) )
@@ -965,6 +966,7 @@ private async void Window_Loaded(object sender, RoutedEventArgs e)
965
966
RepoListControl . PackageCentral = PackageCentral ;
966
967
RepoListControl . FlyoutProvider = this ;
967
968
RepoListControl . ManageVisuElems = DisplayElements ;
969
+ RepoListControl . ExecuteMainCommand = this ;
968
970
this . UiShowRepositories ( visible : false ) ;
969
971
970
972
// event viewer
@@ -1011,26 +1013,63 @@ private async void Window_Loaded(object sender, RoutedEventArgs e)
1011
1013
1012
1014
if ( repo is PackageContainerListHttpRestRepository restRepo )
1013
1015
{
1014
- var fetchContext = new PackageContainerHttpRepoSubsetFetchContext ( )
1016
+ // find a specific location
1017
+ if ( PackageContainerHttpRepoSubset . IsValidUriAnyMatch ( fi ? . Location ) )
1015
1018
{
1016
- Record = new ConnectExtendedRecord ( )
1019
+ // try load that specific location
1020
+ // check if load fresh or aggregate
1021
+ if ( PackageCentral . Main is AdminShellPackageDynamicFetchEnv )
1017
1022
{
1018
- BaseType = ConnectExtendedRecord . BaseTypeEnum . Repository ,
1019
- BaseAddress = restRepo . Endpoint ? . ToString ( )
1023
+ // load aggregate
1024
+ Log . Singleton . Info ( "Aggregating location {0} .." , fi . Location ) ;
1025
+ var res = await UiSearchRepoAndExtendEnvironmentAsync (
1026
+ PackageCentral . Main ,
1027
+ fullItemLocation : fi . Location ,
1028
+ trySelect : true ) ;
1029
+
1030
+ // error?
1031
+ if ( res == null )
1032
+ Log . Singleton . Error ( "Not able to access location {0}" , fi . Location ) ;
1033
+
1034
+ // in any case, stop here
1035
+ return ;
1036
+ }
1037
+ else
1038
+ {
1039
+ // load
1040
+ Log . Singleton . Info ( "Switching to location {0} .." , fi . Location ) ;
1041
+ UiLoadPackageWithNew ( PackageCentral . MainItem , null ,
1042
+ fi . Location , onlyAuxiliary : false , preserveEditMode : true ) ;
1043
+
1044
+ // in any case, stop here
1045
+ return ;
1020
1046
}
1021
- } ;
1022
-
1023
- // refer to (static) function
1024
- var res = await DispEditHelperEntities . ExecuteUiForFetchOfElements (
1025
- PackageCentral , DisplayContext ,
1026
- ticket : null ,
1027
- mainWindow : this ,
1028
- fetchContext : fetchContext ,
1029
- preserveEditMode : true ,
1030
- doEditNewRecord : true ,
1031
- doCheckTainted : true ,
1032
- doFetchGoNext : false ,
1033
- doFetchExec : true ) ;
1047
+ }
1048
+
1049
+ // if not a specific location is available, display general dialogue
1050
+ if ( true )
1051
+ {
1052
+ var fetchContext = new PackageContainerHttpRepoSubsetFetchContext ( )
1053
+ {
1054
+ Record = new ConnectExtendedRecord ( )
1055
+ {
1056
+ BaseType = ConnectExtendedRecord . BaseTypeEnum . Repository ,
1057
+ BaseAddress = restRepo . Endpoint ? . ToString ( )
1058
+ }
1059
+ } ;
1060
+
1061
+ // refer to (static) function
1062
+ var res = await DispEditHelperEntities . ExecuteUiForFetchOfElements (
1063
+ PackageCentral , DisplayContext ,
1064
+ ticket : null ,
1065
+ mainWindow : this ,
1066
+ fetchContext : fetchContext ,
1067
+ preserveEditMode : true ,
1068
+ doEditNewRecord : true ,
1069
+ doCheckTainted : true ,
1070
+ doFetchGoNext : false ,
1071
+ doFetchExec : true ) ;
1072
+ }
1034
1073
}
1035
1074
1036
1075
//
@@ -1766,7 +1805,7 @@ private void UiHandleReRenderAnyUiInEntityPanel(
1766
1805
AdminShellPackageEnvBase packEnv ,
1767
1806
Aas . IReference workRef = null ,
1768
1807
string fullItemLocation = null ,
1769
- bool tryDisplay = false )
1808
+ bool trySelect = false )
1770
1809
{
1771
1810
await Task . Yield ( ) ;
1772
1811
@@ -1841,7 +1880,7 @@ private void UiHandleReRenderAnyUiInEntityPanel(
1841
1880
var newIdf = newIdfs . FirstOrDefault ( ) ;
1842
1881
1843
1882
// display
1844
- if ( tryDisplay )
1883
+ if ( trySelect )
1845
1884
{
1846
1885
var veFound = this . DisplayElements . SearchVisualElementOnMainDataObject ( newIdf , alsoDereferenceObjects : true ) ;
1847
1886
if ( veFound != null )
0 commit comments