private void Form1_Shown(object sender, EventArgs e) { enterprise = new Enterprise(); controller = new FormPBXController(this, enterprise); var Agents = enterprise.GetAgents(); foreach (var a in Agents) { var item = lvAgents.Items.Add(a); item.Name = a; item.SubItems.Add(enterprise.GetAgentStateName(a)); item.SubItems.Add("-"); } enterprise.AgentStateChanged += Enterprise_AgentStateChanged; enterprise.NewTask += Enterprise_NewTask; enterprise.TaskGone += Enterprise_TaskGone; enterprise.TaskChanged += Enterprise_TaskChanged; }
public Task(Enterprise e, string id) { enterprise = e; Id = id; Status = TaskStatus.Queuing; }
public FormPBXController(Form1 form, Enterprise e) { frm1 = form; enterprise = e; e.SetPBXController(this); }