Changed: FSX state is now more accurately reflected in the UI

Added: seperate left/right/nose/tail gear functions
Added: flaps handle position based on index and percentage
This commit is contained in:
Mark van Renswoude 2015-12-29 11:22:23 +00:00
parent 7a1e4ed494
commit 57037928ca
22 changed files with 2713 additions and 58 deletions

View File

@ -798,9 +798,9 @@ object MainForm: TMainForm
object lblFSXState: TLabel
Left = 42
Top = 23
Width = 70
Width = 31
Height = 13
Caption = 'Not connected'
Caption = 'Status'
end
end
object pnlG940: TPanel

View File

@ -266,8 +266,9 @@ const
TextStateNotFound = 'Not found';
TextStateFound = 'Connected';
TextFSXConnecting = 'Connecting...';
TextFSXConnected = 'Connected';
TextFSXDisconnected = 'Not connected';
TextFSXDisconnected = 'No buttons configured';
TextFSXFailed = 'Failed to connect';
@ -313,6 +314,8 @@ begin
PageControl.ActivePageIndex := 0;
AlignBevel(bvlProfileSwitching, lblProfileSwitching);
SetFSXState(TextFSXDisconnected, False);
FEventMonitor := TOmniEventMonitor.Create(Self);
Log.Info('Starting G940 LED state consumer thread');
@ -1253,6 +1256,9 @@ begin
scsDisconnected:
SetFSXState(TextFSXDisconnected, False);
scsConnecting:
SetFSXState(TextFSXConnecting, False);
scsConnected:
SetFSXState(TextFSXConnected, True);

View File

@ -49,7 +49,7 @@
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Base)'!=''">
<VerInfo_Release>2</VerInfo_Release>
<VerInfo_Release>4</VerInfo_Release>
<VerInfo_MinorVer>1</VerInfo_MinorVer>
<DCC_UsePackage>rtl;dbrtl;$(DCC_UsePackage)</DCC_UsePackage>
<DCC_DcuOutput>Lib</DCC_DcuOutput>
@ -59,7 +59,7 @@
<Manifest_File>None</Manifest_File>
<Icon_MainIcon>G940LEDControl_Icon.ico</Icon_MainIcon>
<DCC_Namespace>Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;System.Win;$(DCC_Namespace)</DCC_Namespace>
<VerInfo_Keys>CompanyName=X²Software;FileDescription=G940 LED Control;FileVersion=1.1.2.0;InternalName=;LegalCopyright=© 2011 - 2015 X²Software;LegalTrademarks=;OriginalFilename=G940LEDControl.exe;ProductName=G940 LED Control;ProductVersion=1.1;Comments=</VerInfo_Keys>
<VerInfo_Keys>CompanyName=X²Software;FileDescription=G940 LED Control;FileVersion=1.1.4.0;InternalName=;LegalCopyright=© 2011 - 2015 X²Software;LegalTrademarks=;OriginalFilename=G940LEDControl.exe;ProductName=G940 LED Control;ProductVersion=1.1;Comments=</VerInfo_Keys>
<VerInfo_Locale>1033</VerInfo_Locale>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win64)'!=''">
@ -97,7 +97,7 @@
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
<Debugger_RunParams>/restart</Debugger_RunParams>
<VerInfo_IncludeVerInfo>false</VerInfo_IncludeVerInfo>
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.1.1.1;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=0.2;Comments=</VerInfo_Keys>
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.1.3.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=0.2;Comments=</VerInfo_Keys>
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
</PropertyGroup>
<ItemGroup>

Binary file not shown.

View File

@ -42,10 +42,44 @@ type
function GetWorkerClass: TCustomLEDMultiStateFunctionWorkerClass; override;
end;
TFSXGearFunction = class(TCustomFSXSystemsFunction)
TCustomFSXGearFunction = class(TCustomFSXSystemsFunction)
protected
procedure RegisterStates; override;
function GetWorkerClass: TCustomLEDMultiStateFunctionWorkerClass; override;
procedure InitializeWorker(AWorker: TCustomLEDMultiStateFunctionWorker); override;
protected
function GetGearVariableName: string; virtual; abstract;
function GetGearPercentageFloat: Boolean; virtual; abstract;
end;
TFSXGearFunction = class(TCustomFSXGearFunction)
protected
function GetGearVariableName: string; override;
function GetGearPercentageFloat: Boolean; override;
end;
TFSXLeftGearFunction = class(TCustomFSXGearFunction)
protected
function GetGearVariableName: string; override;
function GetGearPercentageFloat: Boolean; override;
end;
TFSXRightGearFunction = class(TCustomFSXGearFunction)
protected
function GetGearVariableName: string; override;
function GetGearPercentageFloat: Boolean; override;
end;
TFSXCenterGearFunction = class(TCustomFSXGearFunction)
protected
function GetGearVariableName: string; override;
function GetGearPercentageFloat: Boolean; override;
end;
TFSXTailGearFunction = class(TCustomFSXGearFunction)
protected
function GetGearVariableName: string; override;
function GetGearPercentageFloat: Boolean; override;
end;
TFSXParkingBrakeFunction = class(TCustomFSXInvertedOnOffFunction)
@ -120,6 +154,21 @@ type
function GetWorkerClass: TCustomLEDMultiStateFunctionWorkerClass; override;
end;
TFSXFlapsHandleIndexFunction = class(TCustomFSXFunction)
protected
function GetCategoryName: string; override;
procedure RegisterStates; override;
function GetWorkerClass: TCustomLEDMultiStateFunctionWorkerClass; override;
end;
TFSXFlapsHandlePercentageFunction = class(TCustomFSXFunction)
protected
function GetCategoryName: string; override;
procedure RegisterStates; override;
function GetWorkerClass: TCustomLEDMultiStateFunctionWorkerClass; override;
end;
TFSXSpoilersFunction = class(TCustomFSXFunction)
protected
function GetCategoryName: string; override;
@ -141,7 +190,7 @@ type
function GetCategoryName: string; override;
function GetWorkerClass: TCustomLEDMultiStateFunctionWorkerClass; override;
function DoCreateWorker(ASettings: ILEDFunctionWorkerSettings; const APreviousState: string = ''): TCustomLEDFunctionWorker; override;
procedure InitializeWorker(AWorker: TCustomLEDMultiStateFunctionWorker); override;
protected
function GetLightMask: Integer; virtual; abstract;
end;
@ -331,7 +380,7 @@ end;
{ TFSXGearFunction }
procedure TFSXGearFunction.RegisterStates;
procedure TCustomFSXGearFunction.RegisterStates;
begin
RegisterState(TLEDState.Create(FSXStateUIDGearNotRetractable, FSXStateDisplayNameGearNotRetractable, lcOff));
RegisterState(TLEDState.Create(FSXStateUIDGearRetracted, FSXStateDisplayNameGearRetracted, lcRed));
@ -342,12 +391,90 @@ begin
end;
function TFSXGearFunction.GetWorkerClass: TCustomLEDMultiStateFunctionWorkerClass;
function TCustomFSXGearFunction.GetWorkerClass: TCustomLEDMultiStateFunctionWorkerClass;
begin
Result := TFSXGearFunctionWorker;
end;
procedure TCustomFSXGearFunction.InitializeWorker(AWorker: TCustomLEDMultiStateFunctionWorker);
var
gearFunctionWorker: TFSXGearFunctionWorker;
begin
gearFunctionWorker := (AWorker as TFSXGearFunctionWorker);
gearFunctionWorker.GearVariableName := GetGearVariableName;
gearFunctionWorker.GearPercentageFloat := GetGearPercentageFloat;
// Note: inherited sets SimConnect, which triggers RegisterVariables
inherited InitializeWorker(AWorker);
end;
{ TFSXGearFunction }
function TFSXGearFunction.GetGearVariableName: string;
begin
Result := 'GEAR TOTAL PCT EXTENDED';
end;
function TFSXGearFunction.GetGearPercentageFloat: Boolean;
begin
Result := True;
end;
{ TFSXLefGearFunction }
function TFSXLeftGearFunction.GetGearVariableName: string;
begin
Result := 'GEAR LEFT POSITION';
end;
function TFSXLeftGearFunction.GetGearPercentageFloat: Boolean;
begin
Result := False;
end;
{ TFSXRightGearFunction }
function TFSXRightGearFunction.GetGearVariableName: string;
begin
Result := 'GEAR RIGHT POSITION';
end;
function TFSXRightGearFunction.GetGearPercentageFloat: Boolean;
begin
Result := False;
end;
{ TFSXCenterGearFunction }
function TFSXCenterGearFunction.GetGearVariableName: string;
begin
Result := 'GEAR CENTER POSITION';
end;
function TFSXCenterGearFunction.GetGearPercentageFloat: Boolean;
begin
Result := False;
end;
{ TFSXTailGearFunction }
function TFSXTailGearFunction.GetGearVariableName: string;
begin
Result := 'GEAR TAIL POSITION';
end;
function TFSXTailGearFunction.GetGearPercentageFloat: Boolean;
begin
Result := False;
end;
{ TFSXParkingBrakeFunction }
function TFSXParkingBrakeFunction.GetCategoryName: string;
begin
@ -543,6 +670,62 @@ begin
end;
{ TFSXFlapsHandleIndexFunction }
function TFSXFlapsHandleIndexFunction.GetCategoryName: string;
begin
Result := FSXCategoryControlSurfaces;
end;
procedure TFSXFlapsHandleIndexFunction.RegisterStates;
begin
RegisterState(TLEDState.Create(FSXStateUIDFlapsHandleIndexNotAvailable, FSXStateDisplayNameFlapsHandleIndexNotAvailable, lcOff));
RegisterState(TLEDState.Create(FSXStateUIDFlapsHandleIndex0, FSXStateDisplayNameFlapsHandleIndex0, lcGreen));
RegisterState(TLEDState.Create(FSXStateUIDFlapsHandleIndex1, FSXStateDisplayNameFlapsHandleIndex1, lcAmber));
RegisterState(TLEDState.Create(FSXStateUIDFlapsHandleIndex2, FSXStateDisplayNameFlapsHandleIndex2, lcAmber));
RegisterState(TLEDState.Create(FSXStateUIDFlapsHandleIndex3, FSXStateDisplayNameFlapsHandleIndex3, lcAmber));
RegisterState(TLEDState.Create(FSXStateUIDFlapsHandleIndex4, FSXStateDisplayNameFlapsHandleIndex4, lcAmber));
RegisterState(TLEDState.Create(FSXStateUIDFlapsHandleIndex5, FSXStateDisplayNameFlapsHandleIndex5, lcAmber));
RegisterState(TLEDState.Create(FSXStateUIDFlapsHandleIndex6, FSXStateDisplayNameFlapsHandleIndex6, lcAmber));
RegisterState(TLEDState.Create(FSXStateUIDFlapsHandleIndex7, FSXStateDisplayNameFlapsHandleIndex7, lcAmber));
end;
function TFSXFlapsHandleIndexFunction.GetWorkerClass: TCustomLEDMultiStateFunctionWorkerClass;
begin
Result := TFSXFlapsHandleIndexFunctionWorker;
end;
{ TFSXFlapsHandlePercentageFunction }
function TFSXFlapsHandlePercentageFunction.GetCategoryName: string;
begin
Result := FSXCategoryControlSurfaces;
end;
procedure TFSXFlapsHandlePercentageFunction.RegisterStates;
begin
RegisterState(TLEDState.Create(FSXStateUIDFlapsHandlePercentageNotAvailable, FSXStateDisplayNameFlapsHandlePercentageNotAvailable, lcOff));
RegisterState(TLEDState.Create(FSXStateUIDFlapsHandlePercentage0To10, FSXStateDisplayNameFlapsHandlePercentage0To10, lcGreen));
RegisterState(TLEDState.Create(FSXStateUIDFlapsHandlePercentage10To20, FSXStateDisplayNameFlapsHandlePercentage10To20, lcAmber));
RegisterState(TLEDState.Create(FSXStateUIDFlapsHandlePercentage20To30, FSXStateDisplayNameFlapsHandlePercentage20To30, lcAmber));
RegisterState(TLEDState.Create(FSXStateUIDFlapsHandlePercentage30To40, FSXStateDisplayNameFlapsHandlePercentage30To40, lcAmber));
RegisterState(TLEDState.Create(FSXStateUIDFlapsHandlePercentage40To50, FSXStateDisplayNameFlapsHandlePercentage40To50, lcAmber));
RegisterState(TLEDState.Create(FSXStateUIDFlapsHandlePercentage50To60, FSXStateDisplayNameFlapsHandlePercentage50To60, lcAmber));
RegisterState(TLEDState.Create(FSXStateUIDFlapsHandlePercentage60To70, FSXStateDisplayNameFlapsHandlePercentage60To70, lcAmber));
RegisterState(TLEDState.Create(FSXStateUIDFlapsHandlePercentage70To80, FSXStateDisplayNameFlapsHandlePercentage70To80, lcAmber));
RegisterState(TLEDState.Create(FSXStateUIDFlapsHandlePercentage80To90, FSXStateDisplayNameFlapsHandlePercentage80To90, lcAmber));
RegisterState(TLEDState.Create(FSXStateUIDFlapsHandlePercentage90To100, FSXStateDisplayNameFlapsHandlePercentage90To100, lcRed));
end;
function TFSXFlapsHandlePercentageFunction.GetWorkerClass: TCustomLEDMultiStateFunctionWorkerClass;
begin
Result := TFSXFlapsHandlePercentageFunctionWorker;
end;
{ TFSXSpoilersFunction }
function TFSXSpoilersFunction.GetCategoryName: string;
begin
@ -599,10 +782,12 @@ begin
end;
function TCustomFSXLightFunction.DoCreateWorker(ASettings: ILEDFunctionWorkerSettings; const APreviousState: string): TCustomLEDFunctionWorker;
procedure TCustomFSXLightFunction.InitializeWorker(AWorker: TCustomLEDMultiStateFunctionWorker);
begin
Result := inherited DoCreateWorker(ASettings, APreviousState);
(Result as TFSXLightStatesFunctionWorker).StateMask := GetLightMask;
(AWorker as TFSXLightStatesFunctionWorker).StateMask := GetLightMask;
// Note: inherited sets SimConnect, which triggers RegisterVariables
inherited InitializeWorker(AWorker);
end;

View File

@ -48,7 +48,7 @@ type
FDisplayName: string;
FUID: string;
protected
function DoCreateWorker(ASettings: ILEDFunctionWorkerSettings; const APreviousState: string = ''): TCustomLEDFunctionWorker; override;
procedure InitializeWorker(AWorker: TCustomLEDMultiStateFunctionWorker); override;
property Provider: TFSXLEDFunctionProvider read FProvider;
protected
@ -132,52 +132,58 @@ end;
procedure TFSXLEDFunctionProvider.RegisterFunctions;
begin
{ Systems }
RegisterFunction(TFSXBatteryMasterFunction.Create( Self, FSXFunctionDisplayNameBatteryMaster, FSXFunctionUIDBatteryMaster));
RegisterFunction(TFSXDeIceFunction.Create( Self, FSXFunctionDisplayNameDeIce, FSXFunctionUIDDeIce));
RegisterFunction(TFSXExitDoorFunction.Create( Self, FSXFunctionDisplayNameExitDoor, FSXFunctionUIDExitDoor));
RegisterFunction(TFSXGearFunction.Create( Self, FSXFunctionDisplayNameGear, FSXFunctionUIDGear));
RegisterFunction(TFSXParkingBrakeFunction.Create( Self, FSXFunctionDisplayNameParkingBrake, FSXFunctionUIDParkingBrake));
RegisterFunction(TFSXAutoBrakeFunction.Create( Self, FSXFunctionDisplayNameAutoBrake, FSXFunctionUIDAutoBrake));
RegisterFunction(TFSXPressDumpSwitchFunction.Create( Self, FSXFunctionDisplayNamePressDumpSwitch, FSXFunctionUIDPressDumpSwitch));
RegisterFunction(TFSXTailHookFunction.Create( Self, FSXFunctionDisplayNameTailHook, FSXFunctionUIDTailHook));
RegisterFunction(TFSXBatteryMasterFunction.Create( Self, FSXFunctionDisplayNameBatteryMaster, FSXFunctionUIDBatteryMaster));
RegisterFunction(TFSXDeIceFunction.Create( Self, FSXFunctionDisplayNameDeIce, FSXFunctionUIDDeIce));
RegisterFunction(TFSXExitDoorFunction.Create( Self, FSXFunctionDisplayNameExitDoor, FSXFunctionUIDExitDoor));
RegisterFunction(TFSXGearFunction.Create( Self, FSXFunctionDisplayNameGear, FSXFunctionUIDGear));
RegisterFunction(TFSXLeftGearFunction.Create( Self, FSXFunctionDisplayNameLeftGear, FSXFunctionUIDLeftGear));
RegisterFunction(TFSXRightGearFunction.Create( Self, FSXFunctionDisplayNameRightGear, FSXFunctionUIDRightGear));
RegisterFunction(TFSXCenterGearFunction.Create( Self, FSXFunctionDisplayNameCenterGear, FSXFunctionUIDCenterGear));
RegisterFunction(TFSXTailGearFunction.Create( Self, FSXFunctionDisplayNameTailGear, FSXFunctionUIDTailGear));
RegisterFunction(TFSXParkingBrakeFunction.Create( Self, FSXFunctionDisplayNameParkingBrake, FSXFunctionUIDParkingBrake));
RegisterFunction(TFSXAutoBrakeFunction.Create( Self, FSXFunctionDisplayNameAutoBrake, FSXFunctionUIDAutoBrake));
RegisterFunction(TFSXPressDumpSwitchFunction.Create( Self, FSXFunctionDisplayNamePressDumpSwitch, FSXFunctionUIDPressDumpSwitch));
RegisterFunction(TFSXTailHookFunction.Create( Self, FSXFunctionDisplayNameTailHook, FSXFunctionUIDTailHook));
{ Instruments }
RegisterFunction(TFSXPitotOnOffFunction.Create( Self, FSXFunctionDisplayNamePitotOnOff, FSXFunctionUIDPitotOnOff));
RegisterFunction(TFSXPitotWarningFunction.Create( Self, FSXFunctionDisplayNamePitotWarning, FSXFunctionUIDPitotWarning));
RegisterFunction(TFSXPitotOnOffFunction.Create( Self, FSXFunctionDisplayNamePitotOnOff, FSXFunctionUIDPitotOnOff));
RegisterFunction(TFSXPitotWarningFunction.Create( Self, FSXFunctionDisplayNamePitotWarning, FSXFunctionUIDPitotWarning));
{ Engines }
RegisterFunction(TFSXEngineAntiIceFunction.Create( Self, FSXFunctionDisplayNameEngineAntiIce, FSXFunctionUIDEngineAntiIce));
RegisterFunction(TFSXEngineFunction.Create( Self, FSXFunctionDisplayNameEngine, FSXFunctionUIDEngine));
RegisterFunction(TFSXThrottleFunction.Create( Self, FSXFunctionDisplayNameThrottle, FSXFunctionUIDThrottle));
RegisterFunction(TFSXEngineAntiIceFunction.Create( Self, FSXFunctionDisplayNameEngineAntiIce, FSXFunctionUIDEngineAntiIce));
RegisterFunction(TFSXEngineFunction.Create( Self, FSXFunctionDisplayNameEngine, FSXFunctionUIDEngine));
RegisterFunction(TFSXThrottleFunction.Create( Self, FSXFunctionDisplayNameThrottle, FSXFunctionUIDThrottle));
{ Control surfaces }
RegisterFunction(TFSXFlapsFunction.Create( Self, FSXFunctionDisplayNameFlaps, FSXFunctionUIDFlaps));
RegisterFunction(TFSXSpoilersFunction.Create( Self, FSXFunctionDisplayNameSpoilers, FSXFunctionUIDSpoilers));
RegisterFunction(TFSXSpoilersArmedFunction.Create( Self, FSXFunctionDisplayNameSpoilersArmed, FSXFunctionUIDSpoilersArmed));
RegisterFunction(TFSXFlapsFunction.Create( Self, FSXFunctionDisplayNameFlaps, FSXFunctionUIDFlaps));
RegisterFunction(TFSXFlapsHandleIndexFunction.Create( Self, FSXFunctionDisplayNameFlapsHandleIndex, FSXFunctionUIDFlapsHandleIndex));
RegisterFunction(TFSXFlapsHandlePercentageFunction.Create(Self, FSXFunctionDisplayNameFlapsHandlePercentage, FSXFunctionUIDFlapsHandlePercentage));
RegisterFunction(TFSXSpoilersFunction.Create( Self, FSXFunctionDisplayNameSpoilers, FSXFunctionUIDSpoilers));
RegisterFunction(TFSXSpoilersArmedFunction.Create( Self, FSXFunctionDisplayNameSpoilersArmed, FSXFunctionUIDSpoilersArmed));
{ Lights }
RegisterFunction(TFSXBeaconLightsFunction.Create( Self, FSXFunctionDisplayNameBeaconLights, FSXFunctionUIDBeaconLights));
RegisterFunction(TFSXInstrumentLightsFunction.Create( Self, FSXFunctionDisplayNameInstrumentLights, FSXFunctionUIDInstrumentLights));
RegisterFunction(TFSXLandingLightsFunction.Create( Self, FSXFunctionDisplayNameLandingLights, FSXFunctionUIDLandingLights));
RegisterFunction(TFSXNavLightsFunction.Create( Self, FSXFunctionDisplayNameNavLights, FSXFunctionUIDNavLights));
RegisterFunction(TFSXRecognitionLightsFunction.Create( Self, FSXFunctionDisplayNameRecognitionLights, FSXFunctionUIDRecognitionLights));
RegisterFunction(TFSXStrobeLightsFunction.Create( Self, FSXFunctionDisplayNameStrobeLights, FSXFunctionUIDStrobeLights));
RegisterFunction(TFSXTaxiLightsFunction.Create( Self, FSXFunctionDisplayNameTaxiLights, FSXFunctionUIDTaxiLights));
RegisterFunction(TFSXAllLightsFunction.Create( Self, FSXFunctionDisplayNameAllLights, FSXFunctionUIDAllLights));
RegisterFunction(TFSXBeaconLightsFunction.Create( Self, FSXFunctionDisplayNameBeaconLights, FSXFunctionUIDBeaconLights));
RegisterFunction(TFSXInstrumentLightsFunction.Create( Self, FSXFunctionDisplayNameInstrumentLights, FSXFunctionUIDInstrumentLights));
RegisterFunction(TFSXLandingLightsFunction.Create( Self, FSXFunctionDisplayNameLandingLights, FSXFunctionUIDLandingLights));
RegisterFunction(TFSXNavLightsFunction.Create( Self, FSXFunctionDisplayNameNavLights, FSXFunctionUIDNavLights));
RegisterFunction(TFSXRecognitionLightsFunction.Create( Self, FSXFunctionDisplayNameRecognitionLights, FSXFunctionUIDRecognitionLights));
RegisterFunction(TFSXStrobeLightsFunction.Create( Self, FSXFunctionDisplayNameStrobeLights, FSXFunctionUIDStrobeLights));
RegisterFunction(TFSXTaxiLightsFunction.Create( Self, FSXFunctionDisplayNameTaxiLights, FSXFunctionUIDTaxiLights));
RegisterFunction(TFSXAllLightsFunction.Create( Self, FSXFunctionDisplayNameAllLights, FSXFunctionUIDAllLights));
{ Autopilot }
RegisterFunction(TFSXAutoPilotFunction.Create( Self, FSXFunctionDisplayNameAutoPilot, FSXFunctionUIDAutoPilot));
RegisterFunction(TFSXAutoPilotAltitudeFunction.Create( Self, FSXFunctionDisplayNameAutoPilotAltitude, FSXFunctionUIDAutoPilotAltitude));
RegisterFunction(TFSXAutoPilotApproachFunction.Create( Self, FSXFunctionDisplayNameAutoPilotApproach, FSXFunctionUIDAutoPilotApproach));
RegisterFunction(TFSXAutoPilotBackcourseFunction.Create(Self, FSXFunctionDisplayNameAutoPilotBackcourse, FSXFunctionUIDAutoPilotBackcourse));
RegisterFunction(TFSXAutoPilotHeadingFunction.Create( Self, FSXFunctionDisplayNameAutoPilotHeading, FSXFunctionUIDAutoPilotHeading));
RegisterFunction(TFSXAutoPilotNavFunction.Create( Self, FSXFunctionDisplayNameAutoPilotNav, FSXFunctionUIDAutoPilotNav));
RegisterFunction(TFSXAutoPilotFunction.Create( Self, FSXFunctionDisplayNameAutoPilot, FSXFunctionUIDAutoPilot));
RegisterFunction(TFSXAutoPilotAltitudeFunction.Create( Self, FSXFunctionDisplayNameAutoPilotAltitude, FSXFunctionUIDAutoPilotAltitude));
RegisterFunction(TFSXAutoPilotApproachFunction.Create( Self, FSXFunctionDisplayNameAutoPilotApproach, FSXFunctionUIDAutoPilotApproach));
RegisterFunction(TFSXAutoPilotBackcourseFunction.Create( Self, FSXFunctionDisplayNameAutoPilotBackcourse, FSXFunctionUIDAutoPilotBackcourse));
RegisterFunction(TFSXAutoPilotHeadingFunction.Create( Self, FSXFunctionDisplayNameAutoPilotHeading, FSXFunctionUIDAutoPilotHeading));
RegisterFunction(TFSXAutoPilotNavFunction.Create( Self, FSXFunctionDisplayNameAutoPilotNav, FSXFunctionUIDAutoPilotNav));
{ Radios }
RegisterFunction(TFSXAvionicsMasterFunction.Create( Self, FSXFunctionDisplayNameAvionicsMaster, FSXFunctionUIDAvionicsMaster));
RegisterFunction(TFSXAvionicsMasterFunction.Create( Self, FSXFunctionDisplayNameAvionicsMaster, FSXFunctionUIDAvionicsMaster));
{ Fuel }
RegisterFunction(TFSXFuelFunction.Create( Self, FSXFunctionDisplayNameFuel, FSXFunctionUIDFuel));
RegisterFunction(TFSXFuelFunction.Create( Self, FSXFunctionDisplayNameFuel, FSXFunctionUIDFuel));
{ ATC }
RegisterFunction(TFSXATCVisibilityFunction.Create(FSXProviderUID));
@ -245,11 +251,9 @@ begin
end;
function TCustomFSXFunction.DoCreateWorker(ASettings: ILEDFunctionWorkerSettings; const APreviousState: string): TCustomLEDFunctionWorker;
procedure TCustomFSXFunction.InitializeWorker(AWorker: TCustomLEDMultiStateFunctionWorker);
begin
Result := inherited DoCreateWorker(ASettings, APreviousState);
(Result as TCustomFSXFunctionWorker).SimConnect := Provider.GetSimConnect;
(AWorker as TCustomFSXFunctionWorker).SimConnect := Provider.GetSimConnect;
end;

View File

@ -35,9 +35,15 @@ type
end;
TFSXGearFunctionWorker = class(TCustomFSXFunctionWorker)
private
FGearVariableName: string;
FGearPercentageFloat: Boolean;
protected
procedure RegisterVariables(ADefinition: IFSXSimConnectDefinition); override;
procedure HandleData(AData: Pointer); override;
public
property GearVariableName: string read FGearVariableName write FGearVariableName;
property GearPercentageFloat: Boolean read FGearPercentageFloat write FGearPercentageFloat;
end;
TFSXParkingBrakeFunctionWorker = class(TCustomFSXOnOffFunctionWorker)
@ -103,6 +109,18 @@ type
procedure HandleData(AData: Pointer); override;
end;
TFSXFlapsHandleIndexFunctionWorker = class(TCustomFSXFunctionWorker)
protected
procedure RegisterVariables(ADefinition: IFSXSimConnectDefinition); override;
procedure HandleData(AData: Pointer); override;
end;
TFSXFlapsHandlePercentageFunctionWorker = class(TCustomFSXFunctionWorker)
protected
procedure RegisterVariables(ADefinition: IFSXSimConnectDefinition); override;
procedure HandleData(AData: Pointer); override;
end;
TFSXSpoilersFunctionWorker = class(TCustomFSXFunctionWorker)
protected
procedure RegisterVariables(ADefinition: IFSXSimConnectDefinition); override;
@ -277,10 +295,10 @@ end;
{ TFSXGearFunctionWorker }
procedure TFSXGearFunctionWorker.RegisterVariables(ADefinition: IFSXSimConnectDefinition);
begin
ADefinition.AddVariable('IS GEAR RETRACTABLE', FSX_UNIT_BOOL, SIMCONNECT_DATAType_INT32);
ADefinition.AddVariable('GEAR TOTAL PCT EXTENDED', FSX_UNIT_PERCENT, SIMCONNECT_DATAType_FLOAT64);
ADefinition.AddVariable('GEAR DAMAGE BY SPEED', FSX_UNIT_BOOL, SIMCONNECT_DATAType_INT32);
ADefinition.AddVariable('GEAR SPEED EXCEEDED', FSX_UNIT_BOOL, SIMCONNECT_DATAType_INT32);
ADefinition.AddVariable('IS GEAR RETRACTABLE', FSX_UNIT_BOOL, SIMCONNECT_DATAType_INT32);
ADefinition.AddVariable(GearVariableName, FSX_UNIT_PERCENT, SIMCONNECT_DATAType_FLOAT64);
ADefinition.AddVariable('GEAR DAMAGE BY SPEED', FSX_UNIT_BOOL, SIMCONNECT_DATAType_INT32);
ADefinition.AddVariable('GEAR SPEED EXCEEDED', FSX_UNIT_BOOL, SIMCONNECT_DATAType_INT32);
end;
@ -289,13 +307,14 @@ type
PGearData = ^TGearData;
TGearData = packed record
IsGearRetractable: Cardinal;
TotalPctExtended: Double;
PercentageExtended: Double;
DamageBySpeed: Integer;
SpeedExceeded: Integer;
end;
var
gearData: PGearData;
gearExtended: Double;
begin
gearData := AData;
@ -308,7 +327,12 @@ begin
else if gearData^.IsGearRetractable <> 0 then
begin
case Trunc(gearData ^.TotalPctExtended * 100) of
if GearPercentageFloat then
gearExtended := gearData^.PercentageExtended * 100
else
gearExtended := gearData^.PercentageExtended;
case Trunc(gearExtended) of
0: SetCurrentState(FSXStateUIDGearRetracted);
95..100: SetCurrentState(FSXStateUIDGearExtended);
else SetCurrentState(FSXStateUIDGearBetween);
@ -651,6 +675,90 @@ begin
end;
{ TFSXFlapsHandleIndexFunctionWorker }
procedure TFSXFlapsHandleIndexFunctionWorker.RegisterVariables(ADefinition: IFSXSimConnectDefinition);
begin
ADefinition.AddVariable('FLAPS AVAILABLE', FSX_UNIT_BOOL, SIMCONNECT_DATAType_INT32);
ADefinition.AddVariable('FLAPS HANDLE INDEX', FSX_UNIT_NUMBER, SIMCONNECT_DATAType_INT32);
ADefinition.AddVariable('FLAPS NUM HANDLE POSITIONS', FSX_UNIT_NUMBER, SIMCONNECT_DATAType_INT32);
end;
procedure TFSXFlapsHandleIndexFunctionWorker.HandleData(AData: Pointer);
type
PFlapsData = ^TFlapsData;
TFlapsData = packed record
FlapsAvailable: Cardinal;
FlapsHandleIndex: Cardinal;
FlapsNumHandles: Cardinal;
end;
var
flapsData: PFlapsData;
begin
flapsData := AData;
if flapsData^.FlapsAvailable <> 0 then
begin
case flapsData^.FlapsHandleIndex of
0: SetCurrentState(FSXStateUIDFlapsHandleIndex0);
1: SetCurrentState(FSXStateUIDFlapsHandleIndex1);
2: SetCurrentState(FSXStateUIDFlapsHandleIndex2);
3: SetCurrentState(FSXStateUIDFlapsHandleIndex3);
4: SetCurrentState(FSXStateUIDFlapsHandleIndex4);
5: SetCurrentState(FSXStateUIDFlapsHandleIndex5);
6: SetCurrentState(FSXStateUIDFlapsHandleIndex6);
else
SetCurrentState(FSXStateUIDFlapsHandleIndex7);
end;
end else
SetCurrentState(FSXStateUIDFlapsHandleIndexNotAvailable);
end;
{ TFSXFlapsHandlePercentageFunctionWorker }
procedure TFSXFlapsHandlePercentageFunctionWorker.RegisterVariables(ADefinition: IFSXSimConnectDefinition);
begin
ADefinition.AddVariable('FLAPS AVAILABLE', FSX_UNIT_BOOL, SIMCONNECT_DATAType_INT32);
ADefinition.AddVariable('FLAPS HANDLE PERCENT', FSX_UNIT_PERCENT, SIMCONNECT_DATAType_FLOAT64);
end;
procedure TFSXFlapsHandlePercentageFunctionWorker.HandleData(AData: Pointer);
type
PFlapsData = ^TFlapsData;
TFlapsData = packed record
FlapsAvailable: Cardinal;
FlapsHandlePercent: Double;
end;
var
flapsData: PFlapsData;
begin
flapsData := AData;
if flapsData^.FlapsAvailable <> 0 then
begin
case Trunc(flapsData^.FlapsHandlePercent) of
0..9: SetCurrentState(FSXStateUIDFlapsHandlePercentage0To10);
10..19: SetCurrentState(FSXStateUIDFlapsHandlePercentage10To20);
20..29: SetCurrentState(FSXStateUIDFlapsHandlePercentage20To30);
30..39: SetCurrentState(FSXStateUIDFlapsHandlePercentage30To40);
40..49: SetCurrentState(FSXStateUIDFlapsHandlePercentage40To50);
50..59: SetCurrentState(FSXStateUIDFlapsHandlePercentage50To60);
60..69: SetCurrentState(FSXStateUIDFlapsHandlePercentage60To70);
70..79: SetCurrentState(FSXStateUIDFlapsHandlePercentage70To80);
80..89: SetCurrentState(FSXStateUIDFlapsHandlePercentage80To90);
else
SetCurrentState(FSXStateUIDFlapsHandlePercentage90To100);
end;
end else
SetCurrentState(FSXStateUIDFlapsHandlePercentageNotAvailable);
end;
{ TFSXSpoilersFunctionWorker }
procedure TFSXSpoilersFunctionWorker.RegisterVariables(ADefinition: IFSXSimConnectDefinition);
begin

View File

@ -75,6 +75,18 @@ const
FSXStateDisplayNameGearSpeedExceeded = 'Speed exceeded';
FSXStateDisplayNameGearDamageBySpeed = 'Damage by speed';
FSXFunctionUIDLeftGear = 'leftGear';
FSXFunctionDisplayNameLeftGear = 'Left main landing gear';
FSXFunctionUIDRightGear = 'rightGear';
FSXFunctionDisplayNameRightGear = 'Right main landing gear';
FSXFunctionUIDCenterGear = 'centerGear';
FSXFunctionDisplayNameCenterGear = 'Nose landing gear';
FSXFunctionUIDTailGear = 'tailGear';
FSXFunctionDisplayNameTailGear = 'Tail landing gear';
FSXFunctionUIDLandingLights = 'landingLights';
FSXFunctionDisplayNameLandingLights = 'Landing lights';
@ -147,6 +159,58 @@ const
FSXStateDisplayNameFlapsDamageBySpeed = 'Damage by speed';
FSXFunctionUIDFlapsHandleIndex = 'flapsHandleIndex';
FSXFunctionDisplayNameFlapsHandleIndex = 'Flaps (handle position)';
FSXStateUIDFlapsHandleIndexNotAvailable = 'notAvailable';
FSXStateUIDFlapsHandleIndex0 = '0';
FSXStateUIDFlapsHandleIndex1 = '1';
FSXStateUIDFlapsHandleIndex2 = '2';
FSXStateUIDFlapsHandleIndex3 = '3';
FSXStateUIDFlapsHandleIndex4 = '4';
FSXStateUIDFlapsHandleIndex5 = '5';
FSXStateUIDFlapsHandleIndex6 = '6';
FSXStateUIDFlapsHandleIndex7 = '7';
FSXStateDisplayNameFlapsHandleIndexNotAvailable = 'notAvailable';
FSXStateDisplayNameFlapsHandleIndex0 = 'Position 0 (Up)';
FSXStateDisplayNameFlapsHandleIndex1 = 'Position 1';
FSXStateDisplayNameFlapsHandleIndex2 = 'Position 2';
FSXStateDisplayNameFlapsHandleIndex3 = 'Position 3';
FSXStateDisplayNameFlapsHandleIndex4 = 'Position 4';
FSXStateDisplayNameFlapsHandleIndex5 = 'Position 5';
FSXStateDisplayNameFlapsHandleIndex6 = 'Position 6';
FSXStateDisplayNameFlapsHandleIndex7 = 'Position 7';
FSXFunctionUIDFlapsHandlePercentage = 'flapsHandlePercentage';
FSXFunctionDisplayNameFlapsHandlePercentage = 'Flaps (handle position - percentage)';
FSXStateUIDFlapsHandlePercentageNotAvailable = 'notAvailable';
FSXStateUIDFlapsHandlePercentage0To10 = '0To10';
FSXStateUIDFlapsHandlePercentage10To20 = '10To20';
FSXStateUIDFlapsHandlePercentage20To30 = '20To30';
FSXStateUIDFlapsHandlePercentage30To40 = '30To40';
FSXStateUIDFlapsHandlePercentage40To50 = '40To50';
FSXStateUIDFlapsHandlePercentage50To60 = '50To60';
FSXStateUIDFlapsHandlePercentage60To70 = '60To70';
FSXStateUIDFlapsHandlePercentage70To80 = '70To80';
FSXStateUIDFlapsHandlePercentage80To90 = '80To90';
FSXStateUIDFlapsHandlePercentage90To100 = '90To100';
FSXStateDisplayNameFlapsHandlePercentageNotAvailable = 'No flaps';
FSXStateDisplayNameFlapsHandlePercentage0To10 = '0% - 10%';
FSXStateDisplayNameFlapsHandlePercentage10To20 = '10% - 20%';
FSXStateDisplayNameFlapsHandlePercentage20To30 = '20% - 30%';
FSXStateDisplayNameFlapsHandlePercentage30To40 = '30% - 40%';
FSXStateDisplayNameFlapsHandlePercentage40To50 = '40% - 50%';
FSXStateDisplayNameFlapsHandlePercentage50To60 = '50% - 60%';
FSXStateDisplayNameFlapsHandlePercentage60To70 = '60% - 70%';
FSXStateDisplayNameFlapsHandlePercentage70To80 = '70% - 80%';
FSXStateDisplayNameFlapsHandlePercentage80To90 = '80% - 90%';
FSXStateDisplayNameFlapsHandlePercentage90To100 = '90% - 100%';
FSXFunctionUIDSpoilers = 'spoilers';
FSXFunctionDisplayNameSpoilers = 'Spoilers';

View File

@ -436,6 +436,8 @@ begin
if SimConnectHandle <> 0 then
exit;
TFSXSimConnectStateMonitor.SetCurrentState(scsConnecting);
TrySimConnect('FSX-SimConnect.dll');
if SimConnectHandle = 0 then
TrySimConnect('FSX-SE-SimConnect.dll');

View File

@ -61,7 +61,7 @@ type
end;
TFSXSimConnectState = (scsDisconnected, scsConnected, scsFailed);
TFSXSimConnectState = (scsDisconnected, scsConnecting, scsConnected, scsFailed);
IFSXSimConnectStateObserver = interface
['{0508904F-8189-479D-AF70-E98B00C9D9B2}']

View File

@ -11,6 +11,7 @@ uses
type
TCustomLEDFunctionWorker = class;
TCustomLEDMultiStateFunctionWorker = class;
TCustomLEDMultiStateFunctionWorkerClass = class of TCustomLEDMultiStateFunctionWorker;
@ -53,6 +54,7 @@ type
function GetWorkerClass: TCustomLEDMultiStateFunctionWorkerClass; virtual; abstract;
function DoCreateWorker(ASettings: ILEDFunctionWorkerSettings; const APreviousState: string = ''): TCustomLEDFunctionWorker; virtual;
procedure InitializeWorker(AWorker: TCustomLEDMultiStateFunctionWorker); virtual;
protected
function CreateWorker(ASettings: ILEDFunctionWorkerSettings; const APreviousState: string = ''): ILEDFunctionWorker; override;
@ -185,8 +187,19 @@ end;
function TCustomMultiStateLEDFunction.DoCreateWorker(ASettings: ILEDFunctionWorkerSettings; const APreviousState: string): TCustomLEDFunctionWorker;
var
worker: TCustomLEDMultiStateFunctionWorker;
begin
worker := GetWorkerClass.Create(FProviderUID, GetUID, Self, ASettings, APreviousState);
InitializeWorker(worker);
Result := worker;
end;
procedure TCustomMultiStateLEDFunction.InitializeWorker(AWorker: TCustomLEDMultiStateFunctionWorker);
begin
Result := GetWorkerClass.Create(FProviderUID, GetUID, Self, ASettings, APreviousState);
end;

2054
MSDN/SimConnect.html Normal file

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -0,0 +1,7 @@
epx=window.epx||{};epx.printExportButton=function(){function init(){initialized||(initialized=!0,epx.utilities&&epx.utilities.supportsHtml5())&&($pabLink=$("#isd_printABook, #isd_printABook2"),$toolbar=$("#exportToolBar"),$pabLink.click(pabLinkClicked),$toolbar.length>0&&$toolbar.is(":visible")&&($pabLink.addClass("exportToolBarShown"),$pabLink.css("cursor","text")),refreshExportCount(),$pabLink.show(),$("#isd_archiveControl").click(function(){var control=$("#isd_archiveControl");control.text()!=""&&($("#tocnav").hasClass("hide-archive")?control.text(control.attr("data-exclude-archive")):control.text(control.attr("data-include-archive")),$("#tocnav, #content.bumper").toggleClass("hide-archive"))}))}function pabLinkClicked(event){if($toolbar.length>0&&$toolbar.is(":visible")){event.preventDefault();return}getTopicCount()>0&&(window.epx.utilities.setCookie("ShowPrintToolBar","true",365,"/"),location.reload(!0),event.preventDefault())}function getTopicCount(){var topicsCount=0,book,c,t;if(typeof localStorage.book!="undefined"){book=JSON.parse(localStorage.book);for(c in book.Chapters)for(t in book.Chapters[c].Topics)if(topicsCount=topicsCount+book.Chapters[c].Topics[t].Count,book.Chapters[c].Topics[t].Count<=0||book.Chapters[c].Topics[t].Type==="node"&&book.Chapters[c].Topics[t].Count===1||book.Chapters[c].Topics[t].Type==="topic"&&book.Chapters[c].Topics[t].Count!==1||book.Chapters[c].Topics[t].Type!=="topic"&&book.Chapters[c].Topics[t].Type!=="node")return 0}return topicsCount}function refreshExportCount(count){localStorage.book&&(count||(count=getTopicCount()),initialized||init(),$pabLink.find(".count").text(count))}function removeExportBorder(){$pabLink.removeClass("exportToolBarShown");$pabLink.css("cursor","pointer")}var $pabLink,$toolbar,initialized=!1;return{init:init,refreshExportCount:refreshExportCount,removeExportBorder:removeExportBorder}}();$(document).ready(function(){epx.printExportButton.init()});;
(function(){var tocFixedModule=function(w,d,$){function init(){var $rtlDirAttribute,$parameters,param;window.epx&&window.epx.topic&&window.epx.topic.isPrintExperience()===!0||($rtlDirAttribute=$('html[dir="rtl"]'),isRtl=$rtlDirAttribute&&$rtlDirAttribute.length>0,$parameters=$("#fixLeftNavParameters"),param=$parameters.length>0?$parameters.val().split(","):null,$leftNav=param!=null&&param[1]!=null?$(param[1]):$("#leftNav"),$toc=param!=null&&param[2]!=null?$(param[2]):$("#tocnav"),$mainContent=param!=null&&param[3]!=null?$(param[3]):$leftNav.next(),$footer=$("#lib-footer"),$footer.length===0&&($footer=$("#ux-footer")),w&&d&&$leftNav.length!==0&&$toc.length!==0&&$footer.length!==0)&&(param!=null&&param[0]!=null&&(fixedTocTop=Number(param[0])),setPosition(),setHorizontalPosition(),$(w).scroll(function(){setPosition();setHorizontalPosition()}),$(w).resize(function(){setPosition();setHorizontalPosition()}))}function setHorizontalPosition(){if(isDesktopView()){var positionToChange=isRtl?"right":"left",documentScrollLeft=$(d).scrollLeft();lastScrollLeft!=documentScrollLeft?(lastScrollLeft=documentScrollLeft,$toc.css(positionToChange,isRtl?documentScrollLeft:-documentScrollLeft)):documentScrollLeft==0&&$toc.css(positionToChange,"")}}function isDesktopView(){return epx.library!=undefined&&epx.library!=null&&epx.library.responsive!=undefined&&epx.library.responsive!=null?epx.library.responsive.getCurrentViewType()==epx.library.responsive.viewTypes.Desktop:!0}function setPosition(){var nonFooterViewable,visibleContentHeight;if(isDesktopView()){var windowHeight=$(w).height(),documentHeight=$(d).height(),tocHeight=$toc.height(),mainContentHeight=$mainContent.height();windowHeight>tocHeight+fixedTocTop&&mainContentHeight>tocHeight+fixedTocTop&&$(w).scrollTop()+fixedTocTop>$leftNav.offset().top?($toc.width($leftNav.width()).css("position","fixed"),$leftNav.css("height",tocHeight),nonFooterViewable=$footer.offset().top-$(w).scrollTop()-60,nonFooterViewable>=tocHeight+fixedTocTop?$toc.css("top",fixedTocTop+"px"):$toc.css("top",(tocHeight-nonFooterViewable)*-1)):windowHeight<tocHeight+fixedTocTop&&mainContentHeight>tocHeight+fixedTocTop&&$(w).scrollTop()+windowHeight>tocHeight+$leftNav.offset().top?($toc.width($leftNav.width()).css("position","fixed"),$leftNav.css("height",tocHeight),visibleContentHeight=$footer.offset().top-$(w).scrollTop()-60,visibleContentHeight>=windowHeight?$toc.css("top",(tocHeight-windowHeight)*-1):$toc.css("top",(tocHeight-visibleContentHeight)*-1)):($toc.css("width","").css("position","").css("top",""),$leftNav.css("height","auto"))}}var $leftNav,$toc,$footer,$mainContent,fixedTocTop=60,lastScrollLeft=0,isRtl=!1;return $(document).ready(function(){init()}),{init:init,setPosition:setPosition}};typeof define=="function"&&window.mtpsAmd?define("tocFixed",["jquery"],function($){return tocFixedModule(window,document,$)}):(window.epx=window.epx||{},window.epx.library=window.epx.library||{},window.epx.library.tocFixed=tocFixedModule(window,document,$))})();;
epx=window.epx||{};epx.codeSnippetModule=function(w,d){function init(){scrollOnLoad();initCopyLinks()}function initCopyLinks(){w.clipboardData&&$("a[name=CodeSnippetCopyLink]").css("display","block")}function copyCode(id){if(w.clipboardData){var obj=d.getElementById(id);w.clipboardData.setData("Text",obj.innerText)}}function scrollOnLoad(){var hash=location.hash,hashY;hash.length>1&&hash.substr(1,1)==="Y"&&(hashY=Number(hash.substr(2)),isNaN(hashY)||w.scrollTo(0,hashY))}return{init:init,initCopyLinks:initCopyLinks,copyCode:copyCode,scrollOnLoad:scrollOnLoad}};epx.codeSnippet=epx.codeSnippetModule(window,document);$(document).ready(function(){epx.codeSnippet.init()});;
function TopicNotInScope_ShowPicker(){var topicNotInScopePicker=document.getElementById("topicNotInScopeCollectionPicker");topicNotInScopePicker&&(topicNotInScopePicker.style.display=topicNotInScopePicker.style.display!="block"?"block":"none")}function TopicNotInScope_HidePicker(e){var topicNotInScopePicker=document.getElementById("topicNotInScopeCollectionPicker"),src,e;topicNotInScopePicker&&(e=e||window.event,e.target?src=e.target:e.srcElement&&(src=e.srcElement),src.tagName=="A"&&src.parentNode.parentNode&&src.parentNode.parentNode.id=="topicNotInScopeCollectionPicker"||src.id=="topicNotInScopeSwitchCollection"||src.id=="topicNotInScopeDropdownImage"||src.id=="topicNotInScopeSwitchCollectionContainer"||topicNotInScopePicker.style.display!="block"||(topicNotInScopePicker.style.display="none"))}document.addEventListener?document.addEventListener("mouseup",TopicNotInScope_HidePicker,!1):document.attachEvent&&document.attachEvent("onmouseup",TopicNotInScope_HidePicker);;
epx=window.epx||{};epx.collapsibleArea=function(){function init(){$expandCollapseAllButton=$("a#expandCollapseAll");$titleAnchor=$("a.LW_CollapsibleArea_TitleAhref");$titleAnchor.length===0&&(isEnhanced=!1);$expandCollapseAllButton.length===0&&(isEnhanced=!1);isEnhanced||$expandCollapseAllButton.hide();expandedCaretClass="cl_CollapsibleArea_expanding LW_CollapsibleArea_Img";collapsedCaretClass="cl_CollapsibleArea_collapsing LW_CollapsibleArea_Img";expandedCaretSelector="span.cl_CollapsibleArea_expanding.LW_CollapsibleArea_Img";collapsedCaretSelector="span.cl_CollapsibleArea_collapsing.LW_CollapsibleArea_Img";var stringsAvailable=typeof window.MTPS!="undefined"&&typeof window.MTPS.LocalizedStrings!="undefined";stringsAvailable&&(isEnhanced?(expandTooltip=window.MTPS.LocalizedStrings.EnhancedExpandTooltip,collapseTooltip=window.MTPS.LocalizedStrings.EnhancedCollapseTooltip):(expandTooltip=window.MTPS.LocalizedStrings.ExpandButtonTooltip,collapseTooltip=window.MTPS.LocalizedStrings.CollapseButtonTooltip),$(".cl_CollapsibleArea_expanding").parent().attr("title",collapseTooltip),$(".cl_CollapsibleArea_collapsing").parent().attr("title",expandTooltip),$(collapsedCaretSelector).length===0&&$expandCollapseAllButton.text(window.MTPS.LocalizedStrings.CollapseAllButtonTooltip));setupEventHandlers()}function titleAnchorClicked(){var $this=$(this),$image=$this.children("span").first(),$content=$this.parent().parent().next();$image&&$content&&($this.removeAttr("title"),$content.attr("class")==="sectionblock"?($image.attr("class",collapsedCaretClass),$content.attr("class","sectionnone"),$this.attr("title",expandTooltip),$image.attr("title",expandTooltip)):($image.attr("class",expandedCaretClass),$content.attr("class","sectionblock"),$this.attr("title",collapseTooltip),$image.attr("title",collapseTooltip)),setECAButtonText())}function expandCollapseAllButtonClicked(){$(this).text()===window.MTPS.LocalizedStrings.ExpandAllButtonTooltip?expandAll():collapseAll()}function collapseAll(){$(expandedCaretSelector).parent().click();$expandCollapseAllButton.text(window.MTPS.LocalizedStrings.ExpandAllButtonTooltip)}function expandAll(){$(collapsedCaretSelector).parent().click();$expandCollapseAllButton.text(window.MTPS.LocalizedStrings.CollapseAllButtonTooltip)}function expandCollapseAll(){if(isEnhanced){var $eca=$(this);$eca.hasClass("LW_CollapsibleArea_Title")&&($eca=$($eca.parent().children().first()));$eca.hasClass("cl_CollapsibleArea_collapsing")?expandAll():$eca.hasClass("cl_CollapsibleArea_expanding")&&collapseAll();$("html, body").scrollTop($eca.offset().top-10)}}function setupEventHandlers(){$titleAnchor.click(titleAnchorClicked);$expandCollapseAllButton.click(expandCollapseAllButtonClicked);$("span.LW_CollapsibleArea_Img").dblclick(expandCollapseAll);$("span.LW_CollapsibleArea_Title").dblclick(expandCollapseAll);$(window).keyup(function(e){return e.keyCode==69&&e.shiftKey&&e.ctrlKey?($expandCollapseAllButton.trigger("click"),!1):!0})}function setECAButtonText(){$(collapsedCaretSelector).length===0?$expandCollapseAllButton.text(window.MTPS.LocalizedStrings.CollapseAllButtonTooltip):$(expandedCaretSelector).length===0&&$expandCollapseAllButton.text(window.MTPS.LocalizedStrings.ExpandAllButtonTooltip)}var isEnhanced=!0,expandTooltip="",collapseTooltip="",expandedCaretClass="",collapsedCaretClass="",expandedCaretSelector="",collapsedCaretSelector="",$expandCollapseAllButton,$titleAnchor;return{init:init}}();$(document).ready(function(){epx.collapsibleArea.init()});;
epx=window.epx||{};epx.versionSelector=function(){function init(){$link<=0||$arrow<=0||$list<=0||$expand<=0||($list.find("li.archived").length>0&&($expand.show(),$expand.click(function(){$expand.hide();$list.find("li.archived").show();open()})),$link.click(function(){epx.versionSelector.open()}),$arrow.click(function(){epx.versionSelector.open()}),$(document).mouseup(function(){epx.versionSelector.close()}))}function open(){$list.show()}function close(){$list.hide()}var $link=$("#vsLink"),$arrow=$("#vsArrow"),$list=$("#vsPanel"),$expand=$("#vsExpand");return{init:init,open:open,close:close}}();$(document).ready(function(){epx.versionSelector.init()});;
var isMetroIE10=navigator.userAgent.indexOf("MSIE 10.0")!=-1&&window.innerWidth==screen.width&&window.innerHeight==screen.height,brokerScript;isMetroIE10||(brokerScript=document.createElement("script"),brokerScript.src=window.location.protocol=="https:"?"https://www.microsoft.com/library/svy/sto/https/broker.js":"//js.microsoft.com/library/svy/sto/broker.js",document.getElementsByTagName("head")[0].appendChild(brokerScript));;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

View File

@ -0,0 +1 @@
body{font-family:'Segoe UI',Verdana,Arial!important;font-size:.813em;margin:0 41px!important;}.BookTitleHeading{text-align:center;font-size:5.231em;margin-top:28px;margin-bottom:16px;}.pageBlank{min-height:780px;position:relative;}.pageFooter{position:absolute;bottom:0;text-align:center;}.pageFooterSeparater{height:0;border-top:0;border-left:0;border-right:0;border-bottom:3px solid #add9e8;}.pageFooterText{font-size:.615em;text-align:center;margin-top:6px;margin-bottom:41px;}.pageSplitter{margin-top:33px;height:0;border-top:0;border-left:0;border-right:0;border-bottom:6px solid #add9e8;}.TableOfContentsTitle{font-size:3.692em;margin-top:-14px;margin-bottom:20px;}.ChapterName{font-weight:bold;font-size:1.077em;margin-top:26px;margin-bottom:15px;}.TopicLink{color:#1364c4;font-size:.923em;}.ChapterTitle{-ms-word-wrap:break-word;word-wrap:break-word;font-size:5.538em;margin-top:48px;text-align:center;}.commentEditLink{display:none;}#TocResize{display:none;}#MTPSTranslator{display:none;}.PabLogo{margin-right:0;}

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 999 B

View File

@ -0,0 +1,5 @@
<!--
gWtId="d0a7013d-fcb2-46a6-a94f-3cd20cae39ce";
gWtAccountRollup=1;
// -->