當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript dialogs.confirm函數代碼示例

本文整理匯總了TypeScript中ui/dialogs.confirm函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript confirm函數的具體用法?TypeScript confirm怎麽用?TypeScript confirm使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了confirm函數的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: setTimeout

 setTimeout(() => {
     Dialogs.confirm({
         title: this.configuration.title,
         message: this.configuration.text,
         okButtonText: this.configuration.agreeButtonText,
         cancelButtonText: this.configuration.declineButtonText,
         neutralButtonText: this.configuration.remindButtonText
     }).then(result => {
         if (result == true) {
             let appStore = "";
             if (Application.android) {
                 let androidPackageName = this.configuration.androidPackageId ? this.configuration.androidPackageId : Application.android.packageName;
                 let uri = android.net.Uri.parse("market://details?id=" + androidPackageName);
                 let myAppLinkToMarket = new android.content.Intent(android.content.Intent.ACTION_VIEW, uri);
                 // Launch the PlayStore
                 Application.android.foregroundActivity.startActivity(myAppLinkToMarket);
             } else if (Application.ios) {
                 appStore = "itms-apps://itunes.apple.com/en/app/id" + this.configuration.iTunesAppId;
             }
             Utility.openUrl(appStore);
         } else if (result == false) {
             // Decline
         } else {
             ApplicationSettings.setNumber(this.configuration.id, 0);
         }
     });
 });
開發者ID:nraboy,項目名稱:nativescript-ratings,代碼行數:27,代碼來源:ratings.ts

示例2: confirm

 export function confirm(title: string, message: string): Promise<boolean> {
     return dialogsModule.confirm({
         title: title,
         message: message,
         okButtonText: "YES",
         cancelButtonText: "NO"
     });
 }
開發者ID:Progress-Hackaton2016-Team3,項目名稱:PlatformPal,代碼行數:8,代碼來源:notifications.ts

示例3: onLowScore

 onLowScore(): void {
   Dialogs.confirm({
     title: 'W i n n e r',
     message: 'You solved the puzzle in ' + this.board.moves + ' moves!',
     okButtonText: 'Ok'
   }).then(() => {
     this._stateService.updateLevel(2);
   });
 }
開發者ID:bradyhouse,項目名稱:house,代碼行數:9,代碼來源:level-one.component.ts

示例4: showDialog

export function showDialog(args: EventData) {
    let options = {
        title: "Dialog",
        message: "Message",
        okButtonText: "Yes",
        cancelButtonText: "No"

    }

    confirm(options).then((result: boolean) => {
        console.log(result);
    })
}
開發者ID:NathanWalker,項目名稱:NativeScript,代碼行數:13,代碼來源:modal-no-page.ts

示例5: onShowDialog

    onShowDialog(title: string, result: string) {
        let options: any = {
            title: title,
            message: result,
            okButtonText: "Ok"
        }

        confirm(options).then((result: boolean) => {
            console.log(result);
        })
    }
開發者ID:NathanWalker,項目名稱:nativescript-angular,代碼行數:11,代碼來源:tabs.component.ts

示例6: onLowScore

 onLowScore(): void {
   Dialogs.confirm({
     title: 'W i n n e r',
     message: 'You solved the puzzle in ' + this.board.moves + ' moves!',
     okButtonText: 'Ok'
   }).then(() => {
     this._router.navigate([
       '/:target', {
         target: this.board.nextScreen
       }
     ], Config.transition);
   });
 }
開發者ID:bradyhouse,項目名稱:house,代碼行數:13,代碼來源:level-three.component.ts

示例7: displayConfirmDialog

 displayConfirmDialog() {
     // >> confirm-dialog-code
     let options = {
         title: "Race selection",
         message: "Are you sure you want to be a Unicorn?",
         okButtonText: "Yes",
         cancelButtonText: "No",
         neutralButtonText: "Cancel"
     };
     dialogs.confirm(options).then((result: boolean) => {
         console.log(result);
     });
     // << confirm-dialog-code
 }
開發者ID:aymenbraiek,項目名稱:nativescript-sdk-examples-ng,代碼行數:14,代碼來源:confirm-dialog.component.ts

示例8: onHighScore

 onHighScore(): void {
   this.consoleLogMsg('level-three.component', 'onHighScore');
   Dialogs.confirm({
     title: 'W i n n e r',
     message: 'You solved the puzzle in ' + this.board.moves + ' moves!',
     okButtonText: 'Ok'
   }).then(() => {
     this._router.navigate([
       'add-high-score/:level:moves:caller', {
         moves: this.board.moves,
         level: this.board.level,
         caller: this.board.nextScreen
       }
     ], Config.transition);
   });
 }
開發者ID:bradyhouse,項目名稱:house,代碼行數:16,代碼來源:level-three.component.ts

示例9: onHighScore

 onHighScore(): void {
   Dialogs.confirm({
     title: 'W i n n e r',
     message: 'You solved the puzzle in ' + this.board.moves + ' moves!',
     okButtonText: 'Ok'
   }).then(() => {
     this.isBoardLoaded = false;
     this._stateService.updateLevel(2);
     this._router.navigate([
       'add-high-score/:level:moves:caller', {
         moves: this.board.moves,
         level: this.board.level,
         caller: this.board.nextScreen
       }
     ], Config.transition);
   });
 }
開發者ID:bradyhouse,項目名稱:house,代碼行數:17,代碼來源:level-one.component.ts

示例10: confirm

 public confirm(msg: string): Promise<any> {
   return dialogs.confirm(msg);
 }
開發者ID:Adam-Michalski,項目名稱:angular2-seed-advanced,代碼行數:3,代碼來源:window-native.service.ts


注:本文中的ui/dialogs.confirm函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。