SortingMode: VisualizatorSortingMode;
SortingMode: Prognoz.Platform.Interop.Visualizators.VisualizatorSortingMode;
The SortingMode property determine mode of sorting territory info elements.
To determine mode of selecting territory info elements, use IVZTerritoryTranscript.SelectEvent.
Executing the example requires that the repository contains an express report with the EXPRESS identifier containing a map.
Add links to the Drawing, Express, Metabase, Visualizators system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Express: IEaxAnalyzer;
MC: IVZMapChart;
TT: IVZTerritoryTranscript;
Color: IGxColor;
Begin
// Get repository
MB := MetabaseClass.Active;
// Get express report
Express := MB.ItemById("EXPRESS").Edit As IEaxAnalyzer;
// Get map
MC := Express.MapChart.MapChart;
// Get territory info
TT := MC.TerritoryTranscript;
// Enable territory info
TT.Visible := True;
// Set the number of columns in territory info
TT.ColumnsCount := 2;
// Reduce map scale
TT.IsOverlap := False;
// Set maximum number of elements in info
TT.MaxItemsCount := 10;
// Change element font color
Color := New GxColor.CreateRGB(120, 0, 120);
TT.ItemsStyle.FontColor := Color;
// Change sorting mode - ascending
TT.SortingMode := VisualizatorSortingMode.Asc;
// Change element selection mode - by click
TT.SelectEvent := VisualizatorTerritoryTranscriptSelectEvent.SelectOnClick;
// Output name of parent info layer to console window
Debug.WriteLine("Name of parent info layer - " + TT.ParentLayer.Name);
// Save changes
(Express As IMetabaseObject).Save;
End Sub UserProc;
After executing the example territory info changes are applied. The console window displays name of parent info layer.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
Imports Prognoz.Platform.Interop.Drawing;
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Visualizators;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
Express: IEaxAnalyzer;
MC: IVZMapChart;
TT: IVZTerritoryTranscript;
Color: GxColorClass_2 = New GxColorClass_2();
Begin
// Get repository
MB := Params.Metabase;
// Get express report
Express := MB.ItemById["EXPRESS"].Edit() As IEaxAnalyzer;
// Get map
MC := Express.MapChart.MapChart;
// Get territory info
TT := MC.TerritoryTranscript;
// Enable territory info
TT.Visible := True;
// Set the number of columns in territory info
TT.ColumnsCount := 2;
// Reduce map scale
TT.IsOverlap := False;
// Set maximum number of elements in info
TT.MaxItemsCount := 10;
// Change element font color
Color.CreateRGB(120, 0, 120);
TT.ItemsStyle.FontColor := Color;
// Change sorting mode - ascending
TT.SortingMode := VisualizatorSortingMode.vsmAsc;
// Change element selection mode - by click
TT.SelectEvent := VisualizatorTerritoryTranscriptSelectEvent.vttseSelectOnClick;
// Output name of parent info layer to console window
System.Diagnostics.Debug.WriteLine("Name of parent info layer - " + TT.ParentLayer.Name);
// Save changes
(Express As IMetabaseObject).Save();
End Sub;
See also: