public override string TriggerDecision(DecisionArgs args)
        {
            args.ProgressBar.Value = 0;
            args.Label.Text        = Constants.DownloadStopStatus;

            File.Delete(args.DirectoryPath);
            args.DownloadablePrograms.Clear();

            return(Constants.DownloadStopStatusForDownloadableProgram);
        }
        public override string TriggerDecision(DecisionArgs args)
        {
            args.ProgressBar.Value = 0;
            args.Label.Text = Constants.DownloadStopStatus;

            File.Delete(args.DirectoryPath);
            args.DownloadablePrograms.Clear();

            return Constants.DownloadStopStatusForDownloadableProgram;
        }
 public override bool IsDecisionBasedByArgs(DecisionArgs args)
 {
     return args.EventArgsOfWebClient != null && args.EventArgsOfWebClient.Cancelled;
 }
Ejemplo n.º 4
0
 public abstract bool IsDecisionBasedByArgs(DecisionArgs args);
Ejemplo n.º 5
0
 public abstract string TriggerDecision(DecisionArgs args);
Ejemplo n.º 6
0
        public override bool IsDecisionBasedByArgs(DecisionArgs args)
        {
            var eventArgsOfWebClient = args.EventArgsOfWebClient;

            return(eventArgsOfWebClient != null && !eventArgsOfWebClient.Cancelled && eventArgsOfWebClient.Error == null);
        }
 public override bool IsDecisionBasedByArgs(DecisionArgs args)
 {
     return(args.EventArgsOfWebClient?.Error != null);
 }
Ejemplo n.º 8
0
 public abstract string TriggerDecision(DecisionArgs args);
 public override string TriggerDecision(DecisionArgs args)
 {
     MessageBox.Show(Constants.ErrorMsgInvalidLink);
     return Constants.StatusError;
 }
Ejemplo n.º 10
0
 public AbstractDecision GetDecisionBasedOnArgs(DecisionArgs args)
 {
     return _decisions.FirstOrDefault(decision => decision.IsDecisionBasedByArgs(args));
 }
 public override bool IsDecisionBasedByArgs(DecisionArgs args)
 {
     return(args.Exception != null);
 }
 public override string TriggerDecision(DecisionArgs args)
 {
     MessageBox.Show(args.Exception.Message);
     args.Button.Enabled = false;
     return(Constants.StatusError);
 }
 public override bool IsDecisionBasedByArgs(DecisionArgs args)
 {
     return(args.EventArgsOfWebClient != null && args.EventArgsOfWebClient.Cancelled);
 }
 public override string TriggerDecision(DecisionArgs args)
 {
     MessageBox.Show(args.Exception.Message);
     args.Button.Enabled = false;
     return Constants.StatusError;
 }
 public override bool IsDecisionBasedByArgs(DecisionArgs args)
 {
     return args.Exception != null;
 }
        public override bool IsDecisionBasedByArgs(DecisionArgs args)
        {
            var eventArgsOfWebClient = args.EventArgsOfWebClient;

            return eventArgsOfWebClient != null && !eventArgsOfWebClient.Cancelled && eventArgsOfWebClient.Error == null;
        }
 public override bool IsDecisionBasedByArgs(DecisionArgs args)
 {
     return args.EventArgsOfWebClient?.Error != null;
 }
 public override string TriggerDecision(DecisionArgs args)
 {
     return Constants.StatusFinished;
 }
Ejemplo n.º 19
0
 public abstract bool IsDecisionBasedByArgs(DecisionArgs args);
Ejemplo n.º 20
0
 public override string TriggerDecision(DecisionArgs args)
 {
     return(Constants.StatusFinished);
 }
Ejemplo n.º 21
0
 public AbstractDecision GetDecisionBasedOnArgs(DecisionArgs args)
 {
     return(_decisions.FirstOrDefault(decision => decision.IsDecisionBasedByArgs(args)));
 }
 public override string TriggerDecision(DecisionArgs args)
 {
     MessageBox.Show(Constants.ErrorMsgInvalidLink);
     return(Constants.StatusError);
 }