How to use the @bentley/imodeljs-frontend.OutputMessagePriority.Info function in @bentley/imodeljs-frontend

To help you get started, we’ve selected a few @bentley/imodeljs-frontend examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github imodeljs / imodeljs / test-apps / display-test-app / src / frontend / Viewer.ts View on Github external
public onClosed(): void {
    if (undefined === IModelApp.viewManager.selectedView) {
      IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, "Closing iModel..."));
      this._imodel.closeSnapshot().then(() => IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, "iModel closed."))); // tslint:disable-line:no-floating-promises
    }
  }
}
github imodeljs / imodeljs / core / frontend-devtools / src / tools / MeasureTileLoadTime.ts View on Github external
public constructor(vp: Viewport) {
    this._vp = vp;
    this._stopwatch = new StopWatch();

    // Purge tile trees for all models.
    IModelApp.viewManager.refreshForModifiedModels(undefined);

    const removeOnRender = vp.onRender.addListener(() => this.onRender());
    const removeOnClose = vp.iModel.onClose.addOnce(() => this.cancel());
    this._cleanup = () => { removeOnRender(); removeOnClose(); };

    IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, "Tile loading timer started."));
    this._stopwatch.start();
  }
github imodeljs / imodeljs / test-apps / ui-test-app / src / frontend / tools / ToolSpecifications.tsx View on Github external
let displayString = "Current Snap Mode(s):";

        if (SampleAppIModelApp.store.getState().frameworkState) {
          const snapModes = IModelApp.accuSnap.getActiveSnapModes();
          for (const mode of snapModes) {
            if (mode === SnapMode.Bisector) displayString += " Bisector";
            if (mode === SnapMode.Center) displayString += " Center";
            if (mode === SnapMode.Intersection) displayString += " Intersection";
            if (mode === SnapMode.MidPoint) displayString += " MidPoint";
            if (mode === SnapMode.Nearest) displayString += " Nearest";
            if (mode === SnapMode.NearestKeypoint) displayString += " NearestKeypoint";
            if (mode === SnapMode.Origin) displayString += " Origin";
          }
        }

        IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, displayString));
      },
    });
github imodeljs / imodeljs / test-apps / ui-test-app / src / frontend / tools / AccuDrawPopupTools.tsx View on Github external
private static _calculatorOnOk = (value: number) => {
    IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, `Calculated value is ${value}`));
    AccuDrawPopupTools._closeCalculator();
  }
github imodeljs / imodeljs / test-apps / ui-test-app / src / frontend / appui / frontstages / ViewsFrontstage.tsx View on Github external
private _handleTool4Keypress = (event: any) => {
    const details = new NotifyMessageDetails(OutputMessagePriority.Info, "", this._tool4Detailed);
    let changed = false;

    switch (event.keyCode) {
      case 37:
        details.briefMessage = "Left pressed";
        this._toolRelativePosition = RelativePosition.Left;
        changed = true;
        break;
      case 38:
        details.briefMessage = "Up pressed";
        this._toolRelativePosition = RelativePosition.Top;
        changed = true;
        break;
      case 39:
        details.briefMessage = "Right pressed";
        this._toolRelativePosition = RelativePosition.Right;
github imodeljs / imodeljs / core / frontend-devtools / src / tools / InspectElementTool.ts View on Github external
private async process(elementIds: Id64String[]) {
    const request = {
      elementIds,
      options: this._options,
    };
    let messageDetails: NotifyMessageDetails;
    try {
      const str = await IModelReadRpcInterface.getClient().getGeometrySummary(this.iModel.iModelToken.toJSON(), request);
      if (this._doCopy)
        copyStringToClipboard(str);

      const brief = "Summary " + (this._doCopy ? "copied to clipboard." : "complete.");
      messageDetails = new NotifyMessageDetails(OutputMessagePriority.Info, brief, str);

      if (this._modal) {
        const div = document.createElement("div");
        const appendText = (toAppend: string) => {
          const txt = document.createElement("div");
          txt.innerText = toAppend;
          div.append(txt);
        };

        const lines = str.split("\n");
        const maxLines = 30;
        let curLine = 0;
        for (const line of lines) {
          appendText(line);
          if (++curLine > maxLines) {
            appendText("...");
github imodeljs / imodeljs / ui / framework / src / ui-framework / messages / MessageManager.tsx View on Github external
public static getIconType(details: NotifyMessageDetails): MessageBoxIconType {
    let iconType = MessageBoxIconType.NoSymbol;

    switch (details.priority) {
      case OutputMessagePriority.None:
        iconType = MessageBoxIconType.NoSymbol;
        break;
      case OutputMessagePriority.Info:
        iconType = MessageBoxIconType.Information;
        break;
      case OutputMessagePriority.Warning:
        iconType = MessageBoxIconType.Warning;
        break;
      case OutputMessagePriority.Error:
        iconType = MessageBoxIconType.Critical;
        break;
      case OutputMessagePriority.Fatal:
        iconType = MessageBoxIconType.Critical;
        break;
    }

    return iconType;
  }
github imodeljs / imodeljs / core / frontend-devtools / src / tools / SavedViews.ts View on Github external
public run(): boolean {
    const vp = IModelApp.viewManager.selectedView;
    if (undefined === vp) {
      IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Error, "No viewport"));
      return true;
    }

    try {
      const json = serializeViewState(vp.view);
      copyStringToClipboard(JSON.stringify(json));
      IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, "JSON copied to clipboard"));
    } catch (err) {
      IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Error, err.toString()));
    }

    return true;
  }
}
github imodeljs / imodeljs / plugins / geo-photo / src / geoPhoto.ts View on Github external
public async showMarkers(): Promise {
    if (!this._markers) {
      this._markers = new GeoPhotoMarkerManager(this.plugin, this);
    }
    const message: string = this.plugin.i18n.translate("geoPhoto:messages.ShowingMarkers");
    const msgDetails: NotifyMessageDetails = new NotifyMessageDetails(OutputMessagePriority.Info, message);
    IModelApp.notifications.outputMessage(msgDetails);
    return this._markers.startDecorating();
  }
github imodeljs / imodeljs / core / frontend-devtools / src / tools / MeasureTileLoadTime.ts View on Github external
private cancel(): void {
    IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Info, "Tile loading timer canceled."));
    this.stop();
  }