コード例 #1
0
ファイル: Operator.cs プロジェクト: sskhaustov/Bank_Model_cs
 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;
 }
コード例 #2
0
ファイル: Operator.cs プロジェクト: sskhaustov/Bank_Model_cs
 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;
 }
コード例 #3
0
 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;
 }
コード例 #4
0
ファイル: Operator.cs プロジェクト: sskhaustov/Bank_Model_cs
 public Operator(int _work_time, operator_state _state)
 {
     total_work_time = 0;
     work_time       = _work_time;
     state           = _state;
     cl = new Client();
     cl = null;
 }
コード例 #5
0
ファイル: Operator.cs プロジェクト: sskhaustov/Bank_Model_cs
 public Operator(int _work_time, operator_state _state)
 {
     total_work_time = 0;
     work_time = _work_time;
     state = _state;
     cl = new Client();
     cl = null;
 }
コード例 #6
0
ファイル: Operator.cs プロジェクト: sskhaustov/Bank_Model_cs
 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;
 }
コード例 #7
0
ファイル: Operator.cs プロジェクト: sskhaustov/Bank_Model_cs
        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);
        }
コード例 #8
0
ファイル: Operator.cs プロジェクト: sskhaustov/Bank_Model_cs
 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;
 }
コード例 #9
0
ファイル: Operator.cs プロジェクト: sskhaustov/Bank_Model_cs
 public void working()   //работа с клиентом
 {
     if (work_time == 0) //работа завершена
     {
         state = operator_state.NotReady;
         return;
     }
     if (work_time > 0)
     {
         work_time--;
     }
 }
コード例 #10
0
ファイル: Operator.cs プロジェクト: sskhaustov/Bank_Model_cs
 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);
 }
コード例 #11
0
ファイル: Operator.cs プロジェクト: sskhaustov/Bank_Model_cs
 public void working() //работа с клиентом
 {
     if (work_time == 0) //работа завершена
     {
         state = operator_state.NotReady;
         return;
     }
     if (work_time > 0) work_time--;
 }