当前位置: 首页>>代码示例>>C#>>正文


C# ProgressDialog.SetIcon方法代码示例

本文整理汇总了C#中Android.App.ProgressDialog.SetIcon方法的典型用法代码示例。如果您正苦于以下问题:C# ProgressDialog.SetIcon方法的具体用法?C# ProgressDialog.SetIcon怎么用?C# ProgressDialog.SetIcon使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Android.App.ProgressDialog的用法示例。


在下文中一共展示了ProgressDialog.SetIcon方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Main);

            Button start = FindViewById<Button>(Resource.Id.startButton);
            Button stop = FindViewById<Button>(Resource.Id.stopButton);

            ProgressDialog pd = new ProgressDialog(this)
            {
                Indeterminate = true,
            };

            pd.SetMessage("Waiting");

            pd.SetButton("cancel", (s, e) => Stop(pd));
            pd.SetIcon(Resource.Drawable.Icon);

            //pd.SetCancelable(false);

            Drawable myIcon = Resources.GetDrawable(Resource.Animation.progress_dialog_icon_drawable_animation);
            pd.SetIndeterminateDrawable(myIcon);

            start.Click += delegate { Start(pd); };
            stop.Click += delegate { Stop(pd); };
        }
开发者ID:adbk,项目名称:spikes,代码行数:26,代码来源:Activity1.cs

示例2: DownloadingProgressDialog

        public ProgressDialog DownloadingProgressDialog(string title, string message)
        {
            ProgressDialog progress = new ProgressDialog(context);
            progress.SetMessage(message);
            progress.SetTitle(title);
            progress.SetIcon(Resource.Drawable.Icon);
            progress.SetButton("Cancel", (sender, args) =>
            {
                // Close progress dialog
                progress.Dismiss();

                // Stop all downloads
                client.CancelAsync();

                // Remove any language folders that were to be downloaded
                for (var i = 0; i < downloadQueue.Count; i++)
                {
                    DeleteLanguagePack(downloadQueue[i]);
                }

                // No downloads to be downloaded
                downloadQueue = new List<string>();
                // No files to be download
                FilesCoutner = 0;
                // They didn't all download, but set to true anyways
                allDownloaded = true;

                if (DownloadedLanguages.Count > 0)
                {
                    Language = Language;
                }
            });
            progress.SetProgressStyle(ProgressDialogStyle.Horizontal);
            progress.SetCancelable(false);
            progress.SetCanceledOnTouchOutside(false);

            return progress;
        }
开发者ID:GuyMicciche,项目名称:SuperNWTBible,代码行数:38,代码来源:App.cs


注:本文中的Android.App.ProgressDialog.SetIcon方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。