public override string CalculateValue() { if (KScriptVariableHandler.IsVariable(Value)) { string val = KScriptVariableHandler.ReturnFormattedVariables(Container, Value); if (val.Trim().StartsWith("'") && val.Trim().EndsWith("'")) { return(val.Trim(char.Parse("'"))); } else { return(val); } } else { if (Value.Trim().StartsWith("'") && Value.Trim().EndsWith("'")) { return(Value.Trim(char.Parse("'"))); } else { return(Value); } } }
public override bool Run() { string URL = url, DEST = destination; URL = KScriptVariableHandler.ReturnFormattedVariables(KScript(), url); DEST = KScriptVariableHandler.ReturnFormattedVariables(KScript(), destination); System.Net.WebClient client = new System.Net.WebClient(); client.DownloadProgressChanged += Client_DownloadProgressChanged; client.DownloadFileAsync(new Uri(HandleCommands(URL)), HandleCommands(DEST)); return(true); }
public string ReturnFormattedVariables(string val) { return(KScriptVariableHandler.ReturnFormattedVariables(ParentContainer, val)); }