Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
 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;
 }
Exemplo n.º 4
0
 public Operator(int _work_time, operator_state _state)
 {
     total_work_time = 0;
     work_time       = _work_time;
     state           = _state;
     cl = new Client();
     cl = null;
 }
Exemplo n.º 5
0
 public Operator(int _work_time, operator_state _state)
 {
     total_work_time = 0;
     work_time = _work_time;
     state = _state;
     cl = new Client();
     cl = null;
 }
Exemplo n.º 6
0
 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;
 }
Exemplo n.º 7
0
        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);
        }
Exemplo n.º 8
0
 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;
 }
Exemplo n.º 9
0
 public void working()   //работа с клиентом
 {
     if (work_time == 0) //работа завершена
     {
         state = operator_state.NotReady;
         return;
     }
     if (work_time > 0)
     {
         work_time--;
     }
 }
Exemplo n.º 10
0
 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);
 }
Exemplo n.º 11
0
 public void working() //работа с клиентом
 {
     if (work_time == 0) //работа завершена
     {
         state = operator_state.NotReady;
         return;
     }
     if (work_time > 0) work_time--;
 }