| ZennoLab.CommandCenter Assembly > ZennoLab.CommandCenter Namespace > ZennoPoster Class > SetTries Method : SetTries(String,Int32) Method |
Type: System.String
Name of task. Finds the first occurrence.
Type: System.Int32
Count of tries to set.
Type: System.String
Name of task. Finds the first occurrence.
Type: System.Int32
Count of tries to set.
// Gets list of tasks var tasksList = new List<string>(ZennoPoster.TasksList); // Check the presence of items in the list if(tasksList.Count != 0) { // Select ane item var source = tasksList[0]; // Sets path to task name var xpath = "Task/Name"; // Gets guid string from task data var doc = new System.Xml.XmlDocument(); doc.LoadXml("<Task>" + source + "</Task>"); string name; var node = doc.SelectSingleNode(xpath); if (node != null) name = node.InnerXml; else throw new InvalidDataException(string.Format("{0} is null", xpath)); if(!String.IsNullOrEmpty(name)) // If ok, sets tries to first task with this name ZennoPoster.SetTries(name, 50); else throw new FormatException("Name is empty"); }
// Gets list of tasks $tasksList = new List<string>(ZennoPoster::TasksList); // Check the presence of items in the list if(tasksList->Count != 0) { // Select ane item $source = $tasksList[0]; // Sets path to task name $xpath = "Task/Name"; // Gets guid string from task data $doc = new System\Xml\XmlDocument(); $doc->LoadXml("<Task>" + $source + "</Task>"); $name; $node = $doc->SelectSingleNode($xpath); if ($node != null) $name = $node->InnerXml; else throw new InvalidDataException(String::Format("{0} is null", $xpath)); if (String::IsNullOrEmpty($name)) // If ok, sets tries to first task with this name ZennoPoster::SetTries($name, 50); else throw new FormatException("Name is empty"); }
Target Platforms: Desktop: Windows XP SP3 and older. Server: Windows Server 2003 and older.