public int total_work_time; //общее время работы оператора //private bool state; //состояние устройства (true - свободно, false - занято) public Operator(kassa_type _k_type) { k_type = _k_type; work_time = 0; total_work_time = 0; state = operator_state.Vacant; }
public new Request cl; //клиент public Kassa(int _ID, kassa_type _k_type) { ID = _ID; k_type = _k_type; state = operator_state.Vacant; //cl = new Request(); cl = null; }
public Operator(int _work_time, operator_state _state) { total_work_time = 0; work_time = _work_time; state = _state; cl = new Client(); cl = null; }
public Client remove_client() //обслуженный клиент { Client served_cl = new Client(); served_cl = cl; served_cl.state = client_state.Finalized; //обслуживание завершено cl = null; state = operator_state.Vacant; return served_cl; }
public Client remove_client() //обслуженный клиент { Client served_cl = new Client(); served_cl = cl; served_cl.state = client_state.Finalized; //обслуживание завершено cl = null; state = operator_state.Vacant; return(served_cl); }
public bool add_client(Client new_cl) { if (state == operator_state.Occuped || new_cl == null) return false; cl = new_cl; cl.state = client_state.Started; //обслуживание начато client_id = cl.ID; set_work_time(cl); state = operator_state.Occuped; return true; }
public void working() //работа с клиентом { if (work_time == 0) //работа завершена { state = operator_state.NotReady; return; } if (work_time > 0) { work_time--; } }
public bool add_client(Client new_cl) { if (state == operator_state.Occuped || new_cl == null) { return(false); } cl = new_cl; cl.state = client_state.Started; //обслуживание начато client_id = cl.ID; set_work_time(cl); state = operator_state.Occuped; return(true); }
public void working() //работа с клиентом { if (work_time == 0) //работа завершена { state = operator_state.NotReady; return; } if (work_time > 0) work_time--; }