Esempio n. 1
0
 Widget _buildContent()
 {
     return(new Flexible(
                child: new Container(
                    color: CColors.Background,
                    child: new ListView(
                        physics: new AlwaysScrollableScrollPhysics(),
                        children: new List <Widget> {
         this.widget.viewModel.hasReviewUrl || this.widget.viewModel.anonymous
                         ? _buildGapView()
                         : new Container(),
         this.widget.viewModel.hasReviewUrl
                         ? _buildCellView("评分",
                                          () => {
             AnalyticsManager.ClickSetGrade();
             this.widget.actionModel.openUrl(obj: this.widget.viewModel.reviewUrl);
         })
                         : new Container(),
         this.widget.viewModel.anonymous
                         ? _buildCellView("绑定 Unity ID",
                                          () => this.widget.actionModel.mainRouterPushTo(MainNavigatorRoutes.BindUnity))
                         : new Container(),
         _buildGapView(),
         _buildCellView("检查更新", () => {
             AnalyticsManager.ClickCheckUpdate();
             VersionManager.checkForUpdates(CheckVersionType.setting);
         }),
         _buildGapView(),
         _buildCellView("清理缓存", () => {
             AnalyticsManager.ClickClearCache();
             CustomDialogUtils.showCustomDialog(
                 child: new CustomLoadingDialog(
                     message: "正在清理缓存"
                     )
                 );
             this.widget.actionModel.clearCache();
             Window.instance.run(TimeSpan.FromSeconds(1), () => {
                 CustomDialogUtils.hiddenCustomDialog();
                 CustomDialogUtils.showToast("缓存已清除", Icons.check_circle_outline);
             }
                                 );
         }),
         _buildGapView(),
         _switchRow(
             CCommonUtils.isIPhone ? "帧率监测" : "帧率监测 (暂仅支持 TinyGame)",
             value: this.fpsLabelIsOpen,
             value => {
             LocalDataManager.setFPSLabelStatus(isOpen: value);
             this.fpsLabelIsOpen = value;
             this.setState(() => {});
             FPSLabelPlugin.SwitchFPSLabelShowStatus(isOpen: value);
         }
             ),
         this.widget.viewModel.isLoggedIn ? _buildGapView() : new Container(),
         this.widget.viewModel.isLoggedIn ? this._buildLogoutBtn() : new Container()
     }
                        )
                    )
                ));
 }
Esempio n. 2
0
 protected override void OnEnable()
 {
     base.OnEnable();
     Debuger.EnableLog          = Config.enableDebug;
     Screen.fullScreen          = false;
     Screen.orientation         = ScreenOrientation.Portrait;
     Window.onFrameRateCoolDown = CustomFrameRateCoolDown;
     LoadFonts();
     VideoPlayerManager.instance.initPlayer(this.gameObject);
     WebViewManager.instance.initWebView(this.gameObject);
     InitBugly();
     AnalyticsManager.EnterApp();
     if (CCommonUtils.isIPhone)
     {
         if (LocalDataManager.getFPSLabelStatus())
         {
             FPSLabelPlugin.SwitchFPSLabelShowStatus(true);
         }
     }
 }