EditorLicense.ts 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import EditorUI = require("../ui/EditorUI");
  2. class EditorLicense extends Atomic.ScriptObject {
  3. constructor() {
  4. super();
  5. this.subscribeToEvent("LicenseEulaRequired", (eventData) => this.handleLicenseEulaRequired(eventData));
  6. this.subscribeToEvent("LicenseActivationRequired", (eventData) => this.handleLicenseActivationRequired(eventData));
  7. this.subscribeToEvent("LicenseSuccess", (eventData) => this.handleLicenseSuccess(eventData));
  8. }
  9. handleLicenseEulaRequired(eventData) {
  10. var ops = EditorUI.getModelOps();
  11. ops.showEULAWindow();
  12. }
  13. handleLicenseActivationRequired(eventData) {
  14. var ops = EditorUI.getModelOps();
  15. ops.showActivationWindow();
  16. }
  17. handleLicenseSuccess(eventData) {
  18. if (ToolCore.licenseSystem.sourceBuild && ToolCore.licenseSystem.isStandardLicense()) {
  19. var ops = EditorUI.getModelOps();
  20. ops.showProWindow("AtomicEditor/editor/ui/sourceinfo.tb.txt");
  21. }
  22. }
  23. }
  24. export = EditorLicense;