|
1 |
| -/// <reference types="@microsoft/msfs-types/Pages/VCockpit/Core/VCockpit" /> |
2 |
| - |
3 |
| -import { EventBus, FSComponent } from "@microsoft/msfs-sdk" |
4 |
| -import { NavigraphLogin } from "./Components/NavigraphLogin" |
5 |
| -import { AuthService } from "./Services/AuthService" |
6 |
| -import "./MyInstrument.css" |
7 |
| - |
8 |
| -class MyInstrument extends BaseInstrument { |
9 |
| - private readonly bus: EventBus |
10 |
| - |
11 |
| - constructor() { |
12 |
| - super() |
13 |
| - |
14 |
| - this.bus = new EventBus() |
15 |
| - } |
16 |
| - |
17 |
| - get templateID(): string { |
18 |
| - return "MyInstrument" |
19 |
| - } |
20 |
| - |
21 |
| - get isInteractive(): boolean { |
22 |
| - return true |
23 |
| - } |
24 |
| - |
25 |
| - public connectedCallback(): void { |
26 |
| - super.connectedCallback() |
27 |
| - |
28 |
| - AuthService.init(this.bus) |
29 |
| - FSComponent.render(<NavigraphLogin bus={this.bus} />, document.getElementById("InstrumentContent")) |
30 |
| - } |
31 |
| -} |
32 |
| - |
33 |
| -registerInstrument("my-instrument", MyInstrument) |
| 1 | +/// <reference types="@microsoft/msfs-types/Pages/VCockpit/Core/VCockpit" /> |
| 2 | + |
| 3 | +import { EventBus, FSComponent } from "@microsoft/msfs-sdk" |
| 4 | +import { InterfaceSample } from "./Components/InterfaceSample" |
| 5 | +import { AuthService } from "./Services/AuthService" |
| 6 | +import "./MyInstrument.css" |
| 7 | + |
| 8 | +class MyInstrument extends BaseInstrument { |
| 9 | + private readonly bus: EventBus |
| 10 | + |
| 11 | + constructor() { |
| 12 | + super() |
| 13 | + |
| 14 | + this.bus = new EventBus() |
| 15 | + } |
| 16 | + |
| 17 | + get templateID(): string { |
| 18 | + return "MyInstrument" |
| 19 | + } |
| 20 | + |
| 21 | + get isInteractive(): boolean { |
| 22 | + return true |
| 23 | + } |
| 24 | + |
| 25 | + public connectedCallback(): void { |
| 26 | + super.connectedCallback() |
| 27 | + |
| 28 | + AuthService.init(this.bus) |
| 29 | + FSComponent.render(<InterfaceSample bus={this.bus} />, document.getElementById("InstrumentContent")) |
| 30 | + } |
| 31 | +} |
| 32 | + |
| 33 | +registerInstrument("my-instrument", MyInstrument) |
0 commit comments