public WebDavMachine(string user, JobQueue jobQueue) { //webdav configuration User = user; for (int i = 0; i < m_sFolders.Length; i++) { m_sFolders[i] = "/" + user + m_sFolders[i]; } m_wWebDav = new WebDavManager(m_sWebDavAdminUser, m_sWebDavAdminPassword, m_sServer, m_sRoot); this.jobQueue = jobQueue; //state configuration EMPTY = new Empty(this); BUSY = new Busy(this); ERROR = new Error(this); LOOP = new Loop(this); MachineState = EMPTY; //RunThread RunThread = new Thread(() => { while (true) { MachineState.Next(); Thread.Sleep(50); } }); }