private void Start() { // appLoader.OperationFailed += new EventHandler <Core.LoaderEventArgs <Exception> >(appLoader_OperationFailed); appLoader.ProgressChanged += new EventHandler <Core.LoaderEventArgs <Int32> >(appLoader_ProgressChanged); appLoader.StatusChanged += new EventHandler <Core.LoaderEventArgs <String> >(appLoader_StatusChanged); appLoader.OperationCompleted += new EventHandler <EventArgs>(appLoader_OperationCompleted); // appLoader.LoadAppDistributive(); }
/// <summary> /// Initializes and starts the app distributive download process. /// </summary> /// <param name="remoteFile">URL of the file to be downloaded</param> private void Start(string remoteFile, Action <Exception> callback) { appLoader = Core.LoaderFactory.CreateFileLoader(remoteFile); appLoader.OperationFailed += new EventHandler <Core.LoaderEventArgs <Exception> >(appLoader_OperationFailed); appLoader.OperationFailed += (object sender, Core.LoaderEventArgs <Exception> e) => { if (callback != null) { try { callback(e.EventData); } catch { // Just swallow the exception as we have no interest in it. } } }; appLoader.ProgressChanged += new EventHandler <Core.LoaderEventArgs <Int32> >(appLoader_ProgressChanged); appLoader.StatusChanged += new EventHandler <Core.LoaderEventArgs <String> >(appLoader_StatusChanged); appLoader.OperationCompleted += new EventHandler <EventArgs>(appLoader_OperationCompleted); appLoader.LoadAppDistributive(); }
/// <summary> /// Initializes and starts the app distributive download process. /// </summary> /// <param name="remoteFile">URL of the file to be downloaded</param> private void Start(string remoteFile, Action<Exception> callback) { appLoader = Core.LoaderFactory.CreateFileLoader(remoteFile); appLoader.OperationFailed += new EventHandler<Core.LoaderEventArgs<Exception>>(appLoader_OperationFailed); appLoader.OperationFailed += (object sender, Core.LoaderEventArgs<Exception> e) => { if (callback != null) { try { callback(e.EventData); } catch { // Just swallow the exception as we have no interest in it. } } }; appLoader.ProgressChanged += new EventHandler<Core.LoaderEventArgs<Int32>>(appLoader_ProgressChanged); appLoader.StatusChanged += new EventHandler<Core.LoaderEventArgs<String>>(appLoader_StatusChanged); appLoader.OperationCompleted += new EventHandler<EventArgs>(appLoader_OperationCompleted); appLoader.LoadAppDistributive(); }