本文整理汇总了C#中Android.App.ProgressDialog.SetProgressStyle方法的典型用法代码示例。如果您正苦于以下问题:C# ProgressDialog.SetProgressStyle方法的具体用法?C# ProgressDialog.SetProgressStyle怎么用?C# ProgressDialog.SetProgressStyle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Android.App.ProgressDialog
的用法示例。
在下文中一共展示了ProgressDialog.SetProgressStyle方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnViewModelSet
protected override void OnViewModelSet()
{
base.OnViewModelSet();
// show a progress box if there is some work
var events = ViewModel as EventsViewModel;
if (events != null)
{
ProgressDialog progress = null;
events.PropertyChanged += (sender, e) =>
{
if (e.PropertyName == "IsWorking")
{
if (events.IsWorking)
{
if (progress == null)
{
progress = new ProgressDialog(this);
progress.SetProgressStyle(ProgressDialogStyle.Spinner);
progress.SetMessage("Doing absolutely nothing in the background...");
progress.Show();
}
}
else
{
if (progress != null)
{
progress.Dismiss();
progress = null;
}
}
}
};
}
}
示例2: ProgressDialogHelper
public ProgressDialogHelper(Context context) {
this.progress = new ProgressDialog(context);
progress.SetProgressStyle(ProgressDialogStyle.Spinner);
progress.Indeterminate = false;
progress.Progress = 99;
progress.SetCanceledOnTouchOutside(false);
}
示例3: CreateProgressDialog
public static ProgressDialog CreateProgressDialog(string message, Activity activity)
{
var mProgressDialog = new ProgressDialog(activity, Resource.Style.LightDialog);
mProgressDialog.SetMessage(message);
mProgressDialog.SetCancelable(false);
mProgressDialog.SetProgressStyle(ProgressDialogStyle.Spinner);
return mProgressDialog;
}
示例4: OnClick
public void OnClick(View V)
{
ProgressDialog progress = new ProgressDialog(this);
try
{
switch(V.Id)
{
case Resource.Id.bSignIn :
{
isLogin=false;
Boolean blnValidate= FieldValidation();
if (blnValidate==true)
{
progress.Indeterminate = true;
progress.SetProgressStyle(ProgressDialogStyle.Spinner);
progress.SetMessage("Contacting server. Please wait...");
progress.SetCancelable(true);
progress.Show();
var progressDialog = ProgressDialog.Show(this, "Please wait...", "Checking Login info...", true);
new Thread(new ThreadStart(delegate
{
RunOnUiThread(() => ValidateSqluserpwd(etUsername.Text.ToString() , etpwd.Text.ToString()));
if (isLogin== true){
RunOnUiThread(() => Toast.MakeText(this, "Login detail found in system...", ToastLength.Short).Show());
}
RunOnUiThread(() => progressDialog.Hide());
})).Start();
}
break;
}
case Resource.Id.tvforget :
{
var toast = Toast.MakeText(this,"Forget link clicked",ToastLength.Short);
toast.Show();
break;
}
case Resource.Id.tvregister :
{
var myIntent = new Intent (this, typeof(MainActivity));
StartActivityForResult (myIntent, 0);
break;
}
}
}
catch (NullReferenceException ex) {
var toast = Toast.MakeText (this, ex.Message ,ToastLength.Short);
toast.Show ();
}
finally
{
// Now hide the progress dialog
progress.Dismiss();
}
}
示例5: OnPreExecute
protected override void OnPreExecute()
{
base.OnPreExecute();
progDialog = new ProgressDialog(activity);
progDialog.SetMessage("Logging Out...");
progDialog.Indeterminate=false;
progDialog.SetProgressStyle(ProgressDialogStyle.Spinner);
progDialog.SetCancelable(true);
progDialog.Show();
}
示例6: ShowLoadingDialog
public static ProgressDialog ShowLoadingDialog(Context context)
{
var loadingDialog = new ProgressDialog(context);
loadingDialog.SetProgressStyle(ProgressDialogStyle.Spinner);
loadingDialog.Show();
return loadingDialog;
// Alt
//ProgressDialog.Show(this, "Retrieving Nearby Places", "Please wait...", true);
}
示例7: DownloadFileHelper
public DownloadFileHelper(Activity parent)
{
CallingActivity = parent;
progress = new ProgressDialog(CallingActivity);
progress.Indeterminate = false;
progress.SetProgressStyle(ProgressDialogStyle.Horizontal);
progress.SetMessage("Downloading. Please wait...");
progress.SetCancelable(false);
progress.Max = 100;
//OnFinishDownloadHandle += new OnFinishDownload (FinishDownload);
}
示例8: ShowProgressDialog
public static ProgressDialog ShowProgressDialog(Activity activity, int messageResId, /*int titleResId,*/ bool allowCancel, ProgressDialogStyle style=ProgressDialogStyle.Spinner)
{
ProgressDialog dialog = new ProgressDialog(activity);
dialog.SetProgressStyle(style);
//dialog.SetTitle(titleResId);
dialog.SetMessage(activity.Resources.GetString(messageResId));
dialog.SetCancelable(allowCancel);
dialog.SetCanceledOnTouchOutside(allowCancel);
dialog.Show();
return dialog;
}
示例9: CreateProgressDialog
private ProgressDialog CreateProgressDialog()
{
var progress = new ProgressDialog(this)
{
Indeterminate = true
};
progress.SetCancelable(false);
progress.SetProgressStyle(ProgressDialogStyle.Spinner);
progress.SetMessage("Contacting server. Please wait...");
return progress;
}
示例10: ShowProgressDialog
public static void ShowProgressDialog(Activity context, string msg="Loading", string title="",bool isCancle=false) {
if(_mProgressDialog != null) return;
_mProgressDialog = new ProgressDialog(context);
_mProgressDialog.SetProgressStyle(ProgressDialogStyle.Spinner);
_mProgressDialog.SetTitle(title);
_mProgressDialog.SetMessage(msg);
_mProgressDialog.SetCancelable(isCancle);
if (!context.IsFinishing)
{
_mProgressDialog.Show();
}
}
示例11: ShowProgressDialog
private void ShowProgressDialog(ProgressDialog progressDialog, string message, bool show)
{
if (show)
{
progressDialog.Indeterminate = true;
progressDialog.SetProgressStyle(ProgressDialogStyle.Spinner);
progressDialog.SetMessage(message);
progressDialog.SetCancelable(false);
progressDialog.Show();
}
else
progressDialog.Hide();
}
示例12: OnCreateView
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
// Use this to return your custom view for this Fragment
// return inflater.Inflate(Resource.Layout.YourFragment, container, false);
base.OnCreateView (inflater, container, savedInstanceState);
dates = SyncQueueManager.GetAvailableDates ();
View view = inflater.Inflate (Resource.Layout.SyncFragment, container, false);
SavedInflater = inflater;
spnDates = view.FindViewById<Spinner> (Resource.Id.sfSelectedDateSpinner);
spnDates.Adapter = new ArrayAdapter (Activity, Android.Resource.Layout.SimpleSpinnerItem, SyncQueueManager.DatesToString(dates));
spnDates.ItemSelected += (object sender, AdapterView.ItemSelectedEventArgs e) => {
// TextView tv = (TextView) e.View;
selectedDate = dates[e.Position];
Toast.MakeText(Activity, selectedDate.ToString(@"d"), ToastLength.Short).Show();
queue = (List<SyncQueue>) SyncQueueManager.GetSyncQueue(dates[e.Position]);
RefreshContent();
};
llSyncItems = view.FindViewById<LinearLayout> (Resource.Id.sfList);
ivSync = view.FindViewById<ImageView> (Resource.Id.sfSyncImage);
ivSync.Click += (object sender, EventArgs e) => {
progressDialog = ProgressDialog.Show(Activity, "", "Loading rooms...", true);
progressDialog.SetProgressStyle(ProgressDialogStyle.Spinner);
new Thread(new ThreadStart(delegate
{
//LOAD METHOD TO GET ACCOUNT INFO
Activity.RunOnUiThread(() => progressDialog.SetMessage(@"Начало загрузки информации о посещениях"));
UpLoadAttendances();
UpLoadAttendanceResults();
UpLoadAttendancePhotos();
//HIDE PROGRESS DIALOG
Activity.RunOnUiThread(() => { progressDialog.SetMessage(@"Обновление данных"); RefreshContent(); progressDialog.Dismiss(); }); //progressBar.Visibility = ViewStates.Gone);
})).Start();
};
Activity.Window.AddFlags (WindowManagerFlags.KeepScreenOn);
return view;
}
示例13: OnCreate
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
// Set our view from the "main" layout resource
SetContentView (Resource.Layout.MyShop_ProductDetails);
product_id = Intent.GetIntExtra("product_id",0);
//setup background worker for data loading
worker = new BackgroundWorker ();
worker.DoWork += worker_DoWork;
worker.WorkerSupportsCancellation = true;
worker.RunWorkerCompleted += worker_RunWorkerCompleted;
worker.RunWorkerAsync ();
progress = new ProgressDialog(this);
progress.Indeterminate = true;
progress.SetProgressStyle(ProgressDialogStyle.Spinner);
progress.SetMessage("Memuatkan data..");
progress.SetCancelable(false);
progress.Show();
productImage = FindViewById<MultiImageView>(Resource.Id.productImage);
tv_price = FindViewById <TextView> (Resource.Id.tv_price);
tv_prodTitle = FindViewById <TextView> (Resource.Id.tv_prodTitle);
wv_prodDesc = FindViewById <WebView> (Resource.Id.wv_prodDesc);
// btn_addToCart = FindViewById <Button> (Resource.Id.btn_addToCart);
btn_sellerInfo = FindViewById <Button> (Resource.Id.btn_sellerInfo);
var toolbar = FindViewById<V7Toolbar>(Resource.Id.toolbar);
SetSupportActionBar (toolbar);
toolbar.SetBackgroundColor (Color.ParseColor ("#9C27B0"));
SupportActionBar.SetDisplayHomeAsUpEnabled (true);
SupportActionBar.SetDisplayShowHomeEnabled (true);
//call addToCart method
// btn_addToCart.Click += (sender, e) => {
// addToCart();
// };
btn_sellerInfo.Click += btnSellerInfo_click;
}
示例14: OnCreateView
public override View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
View view = inflater.Inflate (Resource.Layout.MyShop_ProductDetails, container, false);
//setup background worker for data loading
worker = new BackgroundWorker ();
worker.DoWork += worker_DoWork;
worker.WorkerSupportsCancellation = true;
worker.RunWorkerCompleted += worker_RunWorkerCompleted;
worker.RunWorkerAsync ();
progress = new ProgressDialog(Activity);
progress.Indeterminate = true;
progress.SetProgressStyle(ProgressDialogStyle.Spinner);
progress.SetMessage("Memuatkan data..");
progress.SetCancelable(false);
progress.Show();
productImage = view.FindViewById<MultiImageView>(Resource.Id.productImage);
tv_price = view.FindViewById <TextView> (Resource.Id.tv_price);
tv_prodTitle = view.FindViewById <TextView> (Resource.Id.tv_prodTitle);
wv_prodDesc = view.FindViewById <WebView> (Resource.Id.wv_prodDesc);
// btn_addToCart = FindViewById <Button> (Resource.Id.btn_addToCart);
btn_sellerInfo = view.FindViewById <Button> (Resource.Id.btn_sellerInfo);
// var toolbar = FindViewById<V7Toolbar>(Resource.Id.toolbar);
// SetSupportActionBar (toolbar);
// SupportActionBar.SetDisplayHomeAsUpEnabled (true);
//call addToCart method
// btn_addToCart.Click += (sender, e) => {
// addToCart();
// };
btn_sellerInfo.Click += btnSellerInfo_click;
return view;
}
示例15: Show
public void Show (Android.Content.Context context, string messageToShow)
{
try {
string message;
if (String.IsNullOrEmpty (messageToShow)) {
message = "Laden...";
} else {
message = messageToShow;
}
if (progressDialog != null) {
progressDialog = null;
}
progressDialog = new ProgressDialog (context);
progressDialog.Indeterminate = true;
progressDialog.SetProgressStyle (ProgressDialogStyle.Spinner);
progressDialog.SetMessage (message);
progressDialog.SetCancelable (false);
progressDialog.Show ();
} catch (Exception ex){
Insights.Report(ex);
}
}