In Xamarin Forms how to call MainActivity's method or get MainActivity's 'Window' from another class? - xamarin

I want to hide software buttons when enter text to entry is done. When user put finger outside keyboard, this method is invoked:
public override void OnUserInteraction()
{
base.OnUserInteraction();
HideSoftwareMenuBars();
}
That works perfectly:
private void HideSoftwareMenuBars()
{
try
{
int uiOptions = (int)Window.DecorView.SystemUiVisibility;
uiOptions |= (int)SystemUiFlags.LayoutStable;
uiOptions |= (int)SystemUiFlags.LayoutHideNavigation;
uiOptions |= (int)SystemUiFlags.LayoutFullscreen;
uiOptions |= (int)SystemUiFlags.LowProfile;
uiOptions |= (int)SystemUiFlags.HideNavigation;
uiOptions |= (int)SystemUiFlags.Fullscreen;
uiOptions |= (int)SystemUiFlags.ImmersiveSticky;
this.Window.DecorView.SystemUiVisibility = (StatusBarVisibility)uiOptions;
}
catch (System.Exception Ex)
{
}
}
But there is no method in MainActivity.cs to override that is being called when user press "enter" key on keyboard. I have overridden more than 200 methods to check it. Then in Xamarin.Forms in code behind I have event:
private void Entry_Unfocused(object sender, FocusEventArgs e)
{
DependencyService.Get<ISoftwareButtons>().HideSoftwareMenuBars();
}
Then by calling dependency interface, here I have 2 errors:
[assembly: Dependency(typeof(SoftwareButtonsHandler))]
namespace Channel.Droid.DependencyHandlers
{
public class SoftwareButtonsHandler
{
private void HideSoftwareMenuBars()
{
try
{
int uiOptions = (int) Window.DecorView.SystemUiVisibility;
uiOptions |= (int)SystemUiFlags.LayoutStable;
uiOptions |= (int)SystemUiFlags.LayoutHideNavigation;
uiOptions |= (int)SystemUiFlags.LayoutFullscreen;
uiOptions |= (int)SystemUiFlags.LowProfile;
uiOptions |= (int)SystemUiFlags.HideNavigation;
uiOptions |= (int)SystemUiFlags.Fullscreen;
uiOptions |= (int)SystemUiFlags.ImmersiveSticky;
this.Window.DecorView.SystemUiVisibility = (StatusBarVisibility)uiOptions;
}
catch (System.Exception Ex)
{
}
}
}
}
The problem is that "Window.Devorview" has errors:
"Abstract base class for a top-level window look and behaviour policy.
An object reference is required for the non-static field, method, or
property 'Window.DecorView;"
and "this.Window"
"SoftwareButtonsHandler' does not contain definition for 'Window' and
no accessible extension method 'Window' accepting a first argument of
type 'SoftwareButtonsHandler' could be found (are you missing a using
directive or an assembly reference?"
Is there a way to call MainActivity.cs's method from another class or get necessary "Window" in dependency handler (that is accessible only in MainActivity.cs) ?

You can create a MainActivityInstance in MainActivity and set it like MainActivityInstance = this in OnCreate:
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
public static MainActivity MainActivityInstance { get; private set; }
protected override void OnCreate(Bundle savedInstanceState)
{
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;
base.OnCreate(savedInstanceState);
Xamarin.Essentials.Platform.Init(this, savedInstanceState);
global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
MainActivityInstance = this;
LoadApplication(new App());
}
}
Then you can get the MainActivity in dependency interface:
public class SoftwareButtonsHandler : ISoftwareButtons
{
void ISoftwareButtons.HideSoftwareMenuBars()
{
try
{
int uiOptions = (int)MainActivity.MainActivityInstance.Window.DecorView.SystemUiVisibility;
uiOptions |= (int)SystemUiFlags.LayoutStable;
uiOptions |= (int)SystemUiFlags.LayoutHideNavigation;
uiOptions |= (int)SystemUiFlags.LayoutFullscreen;
uiOptions |= (int)SystemUiFlags.LowProfile;
uiOptions |= (int)SystemUiFlags.HideNavigation;
uiOptions |= (int)SystemUiFlags.Fullscreen;
uiOptions |= (int)SystemUiFlags.ImmersiveSticky;
MainActivity.MainActivityInstance.Window.DecorView.SystemUiVisibility = (StatusBarVisibility)uiOptions;
}
catch (System.Exception Ex)
{
}
}
}

You can make a static reference to MainActivity that will be accessible everywhere, or you may use CurrentActivity plugin.

Related

create xamarin process never end

I have a plan and want to periodically check a URL every 5 minutes(NOTIFY CENTER SERVER(Listener)).
My problem: Once the program closes, the process closes
Is it possible that the project will not be shut down if the original program is closed ?
My Code After Changed Worked with : Matcha.BackgroundService
using System;
using Android.App;
using Android.Content.PM;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
using Matcha.BackgroundService.Droid;
using Matcha.BackgroundService;
using System.Threading.Tasks;
using Android.Util;
using System.Threading;
using AndroidApp = Android.App.Application;
using Android.Content;
using Android.Support.V4.App;
using Android.Graphics;
namespace Solution.Droid
{
[Activity(Label = "Solution", Icon = "#mipmap/icon", Theme = "#style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
private NotificationManager _manager;
private bool _channelInitialized = false;
public const int _pendingIntentId = 0;
public int _channelID = 10001;
private long _mssageID=0;
protected override void OnCreate(Bundle savedInstanceState)
{
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;
BackgroundAggregator.Init(this);
base.OnCreate(savedInstanceState);
Xamarin.Essentials.Platform.Init(this, savedInstanceState);
global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
LoadApplication(new App());
}
protected override void OnStart()
{
base.OnStart();
//Register Periodic Tasks
var _notifyTASK = new DevinuxTaskPeriodic(10);
_notifyTASK.DoTask += () =>
{
SendNotify("salam", DateTime.Now.ToString());
};
BackgroundAggregatorService.Add(() => _notifyTASK);
BackgroundAggregatorService.StartBackgroundService();
}
public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Android.Content.PM.Permission[] grantResults)
{
Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults);
base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
}
public int SendNotify(string title, string message)
{
_mssageID++;
if (!_channelInitialized)
{
CreateNotificationChannel();
}
Intent intent = new Intent(AndroidApp.Context, typeof(MainActivity));
PendingIntent pendingIntent = PendingIntent.GetActivity(AndroidApp.Context, _pendingIntentId, intent, PendingIntentFlags.OneShot);
NotificationCompat.Builder builder = new NotificationCompat.Builder(AndroidApp.Context, _channelID.ToString())
.SetContentIntent(pendingIntent)
.SetContentTitle(title)
.SetContentText(message)
.SetLargeIcon(BitmapFactory.DecodeResource(AndroidApp.Context.Resources, Resource.Drawable.notification_template_icon_bg))
.SetSmallIcon(Resource.Drawable.notification_template_icon_bg)
.SetDefaults((int)NotificationDefaults.Sound | (int)NotificationDefaults.Vibrate);
Notification notification = builder.Build();
_manager.Notify((int)_mssageID, notification);
return (int)_mssageID;
}
void CreateNotificationChannel()
{
_manager = (NotificationManager)AndroidApp.Context.GetSystemService(AndroidApp.NotificationService);
if (Build.VERSION.SdkInt >= BuildVersionCodes.O)
{
var channelNameJava = new Java.Lang.String("Solution");
var channel = new NotificationChannel(_channelID.ToString(), channelNameJava, NotificationImportance.Default)
{
Description = "My Company Notify Camp."
};
_manager.CreateNotificationChannel(channel);
}
_channelInitialized = true;
}
public class DevinuxTaskPeriodic : IPeriodicTask
{
public bool use { set; get; } = false;
public delegate void DoArgs();
public event DoArgs DoTask;
public DevinuxTaskPeriodic(int seconds)
{
Interval = TimeSpan.FromSeconds(seconds);
}
public TimeSpan Interval { get; set; }
public Task<bool> StartJob()
{
if (!use)
{
Timer tmr = new Timer((o) => {
if (DoTask != null)
{
DoTask();
}
}, null, 0, (int)Interval.TotalSeconds*1000);
}
use = true;
return new Task<bool>(() => true);
}
}
}
}
Yes, it is possible to run processes even when the original program/app is not in the foreground.
You are entering the territory of "backgrounding" which is less simple to do. There isn't an inbuilt/official way of performing backgrounding using Xamarin.Forms, so you will have to either create a dependency service (shown here), or try using Shiny.
If you follow the dependency services route, you just need to follow the official iOS & Android tutorials and implement them in your Native project. Note that if you only need a periodic alarm, Android provides a simpler Alarm/PowerManager that you can use.

Hide navigation bar in Xamarin Forms

I need to hide navigation bar in Xamarin Forms application permanently. Application is destinated to be installed on Android device. I mean, device with will be open to public (like restaurant's kiosk). I want to start my application only and prevent user from going to the system.
I read this: https://developer.android.com/training/system-ui/navigation
I tried this immersive sticky mode. At start status bar and navigation bar are hidden. When I swipe at top or at bottom, the navigation bar appears. How to prevent or disable it?
I read about rooting device and uninstall UISystem.apk and boot indicated app but I think the warranty for device will be lost. Is there another way?
protected override void OnCreate(Bundle savedInstanceState)
{
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;
base.OnCreate(savedInstanceState);
HideSoftwareMenuBars();
LoadApplication(new App());
}
public override void OnWindowFocusChanged(bool hasFocus)
{
base.OnWindowFocusChanged(hasFocus);
if (hasFocus)
HideSoftwareMenuBars();
}
protected override void OnResume()
{
base.OnResume();
HideSoftwareMenuBars();
}
private void HideSoftwareMenuBars()
{
int uiOptions = (int)Window.DecorView.SystemUiVisibility;
uiOptions |= (int)SystemUiFlags.LayoutStable;
uiOptions |= (int)SystemUiFlags.LayoutHideNavigation;
uiOptions |= (int)SystemUiFlags.LayoutFullscreen;
uiOptions |= (int)SystemUiFlags.LowProfile;
uiOptions |= (int)SystemUiFlags.HideNavigation;
uiOptions |= (int)SystemUiFlags.Fullscreen;
uiOptions |= (int)SystemUiFlags.ImmersiveSticky;
this.Window.DecorView.SystemUiVisibility = (StatusBarVisibility)uiOptions;
}
You can implement it by using MessagingCenter
in ContentPage
For example , It will hide or show the status bar when click a button in the page . You can invoke it when the page scroll to top or bottom .
bool isHaveBar = false;
public MainPage()
{
InitializeComponent();
NavigationPage.SetHasNavigationBar(this, false);
}
private void Button_Clicked(object sender, EventArgs e)
{
isHaveBar = !isHaveBar;
NavigationPage.SetHasNavigationBar(this, isHaveBar);
MessagingCenter.Send<Object,bool>(this,"Hide",isHaveBar);
}
Don't forget to set the MainPage of App as NavigationPage
MainPage = new NavigationPage(new YourContentPage());
in Android MainActivity
protected override void OnCreate(Bundle savedInstanceState)
{
//...
base.OnCreate(savedInstanceState);
MessagingCenter.Subscribe<Object, bool>(this, "Hide", (arg,isHaveBar) => {
if(isHaveBar)
{
Window.ClearFlags(WindowManagerFlags.Fullscreen);
Window.AddFlags(WindowManagerFlags.ForceNotFullscreen);
}
else
{
Window.AddFlags(WindowManagerFlags.Fullscreen);
Window.ClearFlags(WindowManagerFlags.ForceNotFullscreen);
}
});
//...
}

Xamarin android - Attempt to invoke virtual method sendBroadcast() on a null object reference

I'm building a crossplatform application using Xamarin,my application will download videos from internet, I've done the download and save functions, but after saved videos to DCIM(in android) the videos do not appear in gallery.After hafl of a day searching for solutions on internet I comeup with two solutions:
1.after download finished: send broadcast with action "Intent.ActionMediaMounted".
2.after download finished Call "MediaScannerConnection.ScanFile".
With solution 1 I got:
"{Java.Lang.NullPointerException: Attempt to invoke virtual method 'void android.content.Context.sendBroadcast(android.content.Intent)' on a null object reference}
With solution 2, I got:
"{Java.Lang.NullPointerException: Attempt to invoke virtual method 'boolean android.content.Context.bindService(android.content.Intent, android.content.ServiceConnection, int)' on a null object reference}
This is my Interface which I used to handle downloadfinished placed in PLC project:
namespace VideoDownloader
{
public interface IDownloadState
{
void OnDownloadStarted();
void OnDownloadError();
void OnDownloadFinished(string path);
}
}
This is my MainPage.xaml.cs in PLC project:
namespace VideoDownloader
{
public partial class MainPage : TabbedPage
{
public MainPage()
{
InitializeComponent();
}
public void downloadVideo(VideoInfor video, bool isRetried)
{
//download code here...
DependencyService.Get<IDownloadState()
.OnDownloadFinished(video.path);
}
}
}
And This is my MainActivity in Android project which implement IDownloadState and send broadcast when OnDownloadFinished fired:
[assembly: Xamarin.Forms.Dependency(typeof(MainActivity))]
namespace VideoDownloader.Droid
{
[Activity(Label = "VideoDownloader", Icon = "#mipmap/icon", Theme =
"#style/MainTheme", MainLauncher = true, ConfigurationChanges =
ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
public class MainActivity :
global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity,
IDownloadState
{
readonly string[] StoragePermissions =
{
Manifest.Permission.WriteExternalStorage,
Manifest.Permission.ReadExternalStorage
};
const int RequestStorageId = 0;
protected override void OnCreate(Bundle bundle)
{
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;
base.OnCreate(bundle);
global::Xamarin.Forms.Forms.Init(this, bundle);
LoadApplication(new App());
int sdkBuildVersion = (int)Build.VERSION.SdkInt;
Console.WriteLine("SDK build version = " + sdkBuildVersion);
if (sdkBuildVersion >= 23)
{
RequestStoragePermission();
}
}
public override void OnRequestPermissionsResult(int requestCode,
string[] permissions, Permission[] grantResults)
{
switch (requestCode)
{
case RequestStorageId:
{
if (grantResults[0] == Permission.Granted)
{
}
else
{
}
}
break;
default:
break;
}
}
public void OnDownloadStarted()
{
throw new NotImplementedException();
}
public void OnDownloadError()
{
throw new NotImplementedException();
}
public void OnDownloadFinished(string path)
{
//Intent intent = new Intent(Intent.ActionMediaMounted);
//SendBroadcast(intent);
//throw new NotImplementedException();
MediaScannerConnection.ScanFile(this, new String[] {
Android.OS.Environment
.GetExternalStoragePublicDirectory(Android.OS.Environment.DirectoryDcim)
.AbsolutePath }, null, null);
}
}
}
I know there are many many similar questions for android on stackoverflow that have ansered but they seem to not like my situation at all. So is there anyone know what am I doing wrong? Why this is happening?
With solution 2, I got:
"{Java.Lang.NullPointerException: Attempt to invoke virtual method 'boolean android.content.Context.bindService(android.content.Intent, android.content.ServiceConnection, int)' on a null object reference}
Please try to use Forms.Context instead of this in OnDownloadFinished().
For example:
public void OnDownloadFinished(string path)
{
//Intent intent = new Intent(Intent.ActionMediaMounted);
//SendBroadcast(intent);
//throw new NotImplementedException();
MediaScannerConnection.ScanFile(Forms.Context, new String[] {
Android.OS.Environment
.GetExternalStoragePublicDirectory(Android.OS.Environment.DirectoryDcim)
.AbsolutePath }, null, null);
}

Why Can't I register my android device? xam.pushnotification

I am using xam.plugin.pushnotification in my xamarin.forms project
my main activity
protected override void OnCreate(Bundle bundle)
{
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;
base.OnCreate(bundle);
global::Xamarin.Forms.Forms.Init(this, bundle);
//inicializa imageCircle
ImageCircleRenderer.Init();
//inicializa o mapa
global::Xamarin.FormsMaps.Init(this, bundle);
//shared Preferences
App.Init(new AndroidUserPreferences());
//Gerenciador de memória
CachedImageRenderer.Init();
try
{
AppContext = this.ApplicationContext;
CrossPushNotification.Initialize<CrossPushNotificationListener>("my sender");
StartPushService();
}
catch (Exception e)
{
var s = e.Message;
}
AndroidUserPreferences sharedPref = new AndroidUserPreferences();
if ( sharedPref.GetString("token") == " ")
{
GetTokenTask myTask = new GetTokenTask();
myTask.Execute(this);
}
LoadApplication(new App());
}
public static void StartPushService()
{
AppContext.StartService(new Intent(AppContext, typeof(PushNotificationService)));
if (Android.OS.Build.VERSION.SdkInt >= Android.OS.BuildVersionCodes.Kitkat)
{
PendingIntent pintent = PendingIntent.GetService(AppContext, 0, new Intent(AppContext, typeof(PushNotificationService)), 0);
AlarmManager alarm = (AlarmManager)AppContext.GetSystemService(Context.AlarmService);
alarm.Cancel(pintent);
}
}
public static void StopPushService()
{
AppContext.StopService(new Intent(AppContext, typeof(PushNotificationService)));
if (Android.OS.Build.VERSION.SdkInt >= Android.OS.BuildVersionCodes.Kitkat)
{
PendingIntent pintent = PendingIntent.GetService(AppContext, 0, new Intent(AppContext, typeof(PushNotificationService)), 0);
AlarmManager alarm = (AlarmManager)AppContext.GetSystemService(Context.AlarmService);
alarm.Cancel(pintent);
}
}
My listener in my pcl
public class CrossPushNotificationListener : IPushNotificationListener
{
public void OnMessage(JObject values, DeviceType deviceType)
{
Debug.WriteLine("Message Arrived");
}
public void OnRegistered(string token, DeviceType deviceType)
{
Debug.WriteLine(string.Format("Push Notification - Device Registered - Token : {0}", token));
}
public void OnUnregistered(DeviceType deviceType)
{
Debug.WriteLine("Push Notification - Device Unnregistered");
}
public void OnError(string message, DeviceType deviceType)
{
Debug.WriteLine(string.Format("Push notification error - {0}",message));
}
public bool ShouldShowNotification()
{
return true;
}
}
}
Registering (trying LOL) in app.cs (PCL)
public App()
{
InitializeComponent();
CrossPushNotification.Current.Register();
MainPage = new NavigationPage(new Views.Splash2());
}
I registered my project in firebase using the package name, then I created a project there and getted the sender ID...BUT...
after call "cross...current.register()", somewhere (it doesn't show me where), I have a exception
FATAL UNHANDLED EXCEPTION: System.TypeLoadException: Could not resolve type with token 0100005a (from typeref, class/assembly Android.Gms.Gcm.Iid.InstanceID, Xamarin.GooglePlayServices.Gcm, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null)
do i need to install xamarin.gcm in my pcl project? now it is only in my android project
Try calling CrossPushNotification.Current.Register (); into OnCreate method. Like this:
protected override void OnCreate(Bundle bundle)
{
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;
base.OnCreate(bundle);
global::Xamarin.Forms.Forms.Init(this, bundle);
//inicializa imageCircle
ImageCircleRenderer.Init();
//inicializa o mapa
global::Xamarin.FormsMaps.Init(this, bundle);
//shared Preferences
App.Init(new AndroidUserPreferences());
//Gerenciador de memória
CachedImageRenderer.Init();
try
{
AppContext = this.ApplicationContext;
CrossPushNotification.Initialize<CrossPushNotificationListener>("my sender");
//call register method here
CrossPushNotification.Current.Register();
StartPushService();
}
catch (Exception e)
{
var s = e.Message;
}
AndroidUserPreferences sharedPref = new AndroidUserPreferences();
if ( sharedPref.GetString("token") == " ")
{
GetTokenTask myTask = new GetTokenTask();
myTask.Execute(this);
}
LoadApplication(new App());
}
I had to migrate to 1.2.5-beta too, it does work, BUT the plugin was recently announced as DEPRECATED.
Thats bad news.
In order to support monoandroid80 I had to fork xam.plugin.pushnotification and update its packages.config manually.
There soon would be no other choice but to migrate.

SeekBar won't run when media player are playing on xamarin android

The SeekBar widget is an interactive slider that allows the user to select one value from a range of values. As the user moves the slider left or right, the value of the SeekBar will change
public int getProgressPercentage(int currentDuration, int totalDuration)
{
int percentage;
int currentSeconds = (int)(currentDuration / 1000);
int totalSeconds = (int)(totalDuration / 1000);
//calculating percentage
percentage = (((int)currentSeconds) / totalSeconds) * 100;
return percentage;
}
public void UpdatedTimerTask()
{
//Displaying time
//txtCurrentTimer.Text = utils.miliSecondsTotimer (player.CurrentPosition);
//txtTotalTimer.Text = utils.miliSecondsTotimer (player.Duration);
//Updating progress bar(seekbar)
int progress=(int)(utils.getProgressPercentage(player.CurrentPosition,player.Duration));
seekBar.Progress = progress;
}
void SeekBar_ProgressChanged (object sender, SeekBar.ProgressChangedEventArgs e)
{
UpdatedTimerTask ();
}
public void StartMedia(string url_string)
{
player = new MediaPlayer ();
seekBar.Progress = 0;
seekBar.Max = 100;
player.Reset ();
player.SetAudioStreamType (Stream.Music);
player.SetDataSource(url_string);
player.Prepare();
player.Start ();
imgPlayorPause.SetImageResource (Resource.Drawable.ic_pause_black_36dp);
UpdatedTimerTask ();
}
seekBar.SetOnSeekBarChangeListener (this); has some invalid argument.
SeekBar won't run when media player are playing.
You have two options:
SetOnSeekBarChangeListener()
If you want to use SetOnSeekBarChangeListener you have to implement IOnSeekBarChangeListener in the class of this (usually your activity. The disadvantage of this is, that you can only have one event listener.
[Activity]
public class MyActivity : Activity, SeekBar.IOnSeekBarChangeListener
{
protected override void OnCreate(Bundle bundle)
{
// ...
seekbar.SetOnSeekBarChangeListener(this);
}
public void OnProgressChanged(SeekBar seekBar, int progress, bool fromUser)
{
// do some stuff
}
public void OnStartTrackingTouch(SeekBar seekBar)
{
}
public void OnStopTrackingTouch(SeekBar seekBar)
{
}
}
ProgressChanged Event
Xamarin maps Java methods that are called like SetXyzListener to the event called Xyz.
If you want to use ProgressChanged you have to register your handler with seekbar.ProgressChanged += SeekbarOnProgressChanged. The disadvantage of this is, that you have to ensure to remove the handler with seekbar.ProgressChanged -= SeekbarOnProgressChanged when you do not need the event anymore. You should do this in the counterpart of the lifecycle method where you have added the handler. In the following example I used OnResume and OnPause.
[Activity]
public class MyActivity : Activity
{
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
// ...
}
protected override void OnResume()
{
base.OnResume();
seekbar.ProgressChanged += SeekbarOnProgressChanged;
}
protected override void OnPause()
{
seekbar.ProgressChanged -= SeekbarOnProgressChanged;
base.OnPause();
}
private void SeekbarOnProgressChanged(object sender, SeekBar.ProgressChangedEventArgs progressChangedEventArgs)
{
// do some stuff
}
}

Resources