2 using System.Collections.Generic;
\r
4 using System.Collections;
\r
6 namespace Handbrake.Functions
\r
10 ArrayList queue = new ArrayList();
\r
13 public ArrayList getQueue()
\r
19 /// Get's the next CLI query for encoding
\r
21 /// <returns>String</returns>
\r
22 public string getNextItemForEncoding()
\r
24 string query = queue[0].ToString();
\r
31 /// Add's a new item to the queue
\r
33 /// <param name="query">String</param>
\r
34 public void add(string query)
\r
40 /// Removes an item from the queue.
\r
42 /// <param name="index">Index</param>
\r
43 /// <returns>Bolean true if successful</returns>
\r
44 public Boolean remove(int index)
\r
48 queue.RemoveAt(index);
\r
58 /// Returns how many items are in the queue
\r
60 /// <returns>Int</returns>
\r
67 /// Get's the last query to be selected for encoding by getNextItemForEncoding()
\r
69 /// <returns>String</returns>
\r
70 public string getLastQuery()
\r
76 /// Move an item with an index x, up in the queue
\r
78 /// <param name="index">Int</param>
\r
79 public void moveUp(int index)
\r
83 string item = queue[index].ToString();
\r
85 queue.Insert((index - 1), item);
\r
86 queue.RemoveAt((index + 1));
\r
91 /// Move an item with an index x, down in the queue
\r
93 /// <param name="index">Int</param>
\r
94 public void moveDown(int index)
\r
96 if (index != queue.Count - 1)
\r
98 string item = queue[index].ToString();
\r
100 queue.Insert((index + 2), item);
\r
101 queue.RemoveAt((index));
\r