Esempio n. 1
0
        public void Init()
        {
            // инициализация IoC
            IoCInitializer.Init();

            dealRepository = Mock.Get(IoCContainer.Resolve <IDealRepository>());
            clientContractIndicatorService = Mock.Get(IoCContainer.Resolve <IClientContractIndicatorService>());
            dealIndicatorService           = Mock.Get(IoCContainer.Resolve <IDealIndicatorService>());

            blockingService = new BlockingService(dealRepository.Object, dealIndicatorService.Object, clientContractIndicatorService.Object);

            var employee = new Employee("Иван", "Рюрикович", "Васильевич", new EmployeePost("Царь"), null);

            user = new User(employee, "И.В. Грозный", "ivanvas", "ivanvas", new Team("Тестовая команда", null), null);

            var clientType           = new ClientType("Тестовый тип клиента");
            var region               = new ClientRegion("Дубовка");
            var clientServiceProgram = new ClientServiceProgram("Программа удовлетворения клиента");

            clientOk = new Client("Клиент без блокировки", clientType, ClientLoyalty.Follower, clientServiceProgram, region, 5);
            clientWithManualBlocking = new Client("Клиент с ручной блокировкой", clientType, ClientLoyalty.Follower, clientServiceProgram, region, 5);
            clientWithManualBlocking.Block(user);
            clientWithPaymentDelayBlocking = new Client("Клиент с блокировкой по просрочке платежа", clientType, ClientLoyalty.Follower, clientServiceProgram, region, 5);
            clientWithCreditLimitBlocking  = new Client("Клиент с блокировкой по кредитному лимиту", clientType, ClientLoyalty.Follower, clientServiceProgram, region, 5);

            dealWithPrePayment = new Deal("Сделка с предоплатой", user);
            dealWithPrePayment.AddQuota(new DealQuota("Quota 1 с предоплатой", 7));
            dealWithPostPayment14d20k = new Deal("Сделка с отсрочкой платежа 14 дн 20k", user);
            dealWithPostPayment14d20k.AddQuota(new DealQuota("Quota 2 с отсрочкой платежа 14 дн 20k", 8, 14, 20000.0M));
            dealWithPostPayment7d40k = new Deal("Сделка с отсрочкой платежа 7 дн 40k", user);
            dealWithPostPayment7d40k.AddQuota(new DealQuota("Quota 3 с отсрочкой платежа 7 дн 40k", 8, 7, 40000.0M));
            dealWithPostPayment10d30k = new Deal("Сделка с отсрочкой платежа 10 дн 30k", user);
            dealWithPostPayment10d30k.AddQuota(new DealQuota("Quota 4 с отсрочкой платежа 10 дн 30k", 8, 10, 30000.0M));
        }
Esempio n. 2
0
        public void Init()
        {
            clientType = new ClientType("Тестовый тип клиента")
            {
                Id = 1
            };
            serviceProgram = new ClientServiceProgram("Тестовая программа")
            {
                Id = 2
            };
            region = new ClientRegion("Тестовый регион")
            {
                Id = 3
            };
            legal = new LegalForm("ООО", EconomicAgentType.JuridicalPerson)
            {
                Id = 5
            };
            juridicalPerson = new JuridicalPerson(legal)
            {
                Id = 6
            };
            client = new Client("Тестовый клиент", clientType, ClientLoyalty.Customer, serviceProgram, region, 5)
            {
                Id = 4
            };
            clientOrganization = new ClientOrganization("Тестовая организация клиента", "Тестовая организация клиента", juridicalPerson)
            {
                Id = 7
            };
            var employee = new Employee("Иван", "Рюрикович", "Васильевич", new EmployeePost("Царь"), null);

            user = new User(employee, "И.В. Грозный", "ivanvas", "ivanvas", new Team("Тестовая команда", null), null);
        }
        /// <summary>
        /// This function is used to update the contents of the text box.
        /// </summary>
        /// <param name="CurrTime">Currend time information</param>
        /// <param name="CurrKeyboard">Current state of the keyboard.</param>
        /// <param name="CurrMouse">Current state of the mouse.</param>
        /// <param name="ProcessMouseEvent">Set true to allow this object to process mouse events, false to ignore them</param>
        protected override void UpdateContents(GameTime CurrTime, Microsoft.Xna.Framework.Input.KeyboardState CurrKeyboard, Microsoft.Xna.Framework.Input.MouseState CurrMouse, bool ProcessMouseEvent)
        {
            if ((ProcessMouseEvent == true) && ((CurrMouse.LeftButton == ButtonState.Pressed) || (CurrMouse.LeftButton == ButtonState.Pressed))) //Mouse button is pressed
            {
                if (ClientRegion.Contains(CurrMouse.Position) == false)                                                                          //Mouse is outside of the control, it has lost focus
                {
                    if (HasFocus != false)
                    {
                        HasChanged = true;
                    }

                    HasFocus = false;
                }
            }

            if (HasFocus != false)               //Only update if the control has focus
            {
                string Input = MGInput.GetTypedChars(CurrKeyboard, cPriorKeys);

                if (CurrTime.TotalGameTime.Milliseconds <= 500)
                {
                    if (cCursorOn == false)
                    {
                        HasChanged = true;
                    }

                    cCursorOn = true;
                }
                else
                {
                    if (cCursorOn == true)
                    {
                        HasChanged = true;
                    }

                    cCursorOn = false;
                }

                if (Input.CompareTo("\b") == 0)
                {
                    if (Text.Length > 0)
                    {
                        Text       = Text.Substring(0, Text.Length - 1);
                        HasChanged = true;
                    }
                }
                else
                {
                    Text      += Input;
                    HasChanged = true;
                }
            }
        }
Esempio n. 4
0
        public void Init()
        {
            clientType = new ClientType("Тестовый тип клиента")
            {
                Id = 1
            };
            serviceProgram = new ClientServiceProgram("Тестовая программа")
            {
                Id = 2
            };
            region = new ClientRegion("Тестовый регион")
            {
                Id = 3
            };
            client = new Client("Тестовый клиент", clientType, ClientLoyalty.Customer, serviceProgram, region, 5)
            {
                Id = 4
            };
            user = new User(new Employee("Иван", "Иванов", "Иванович", new EmployeePost("Менеджер"), null), "Иванов Иван", "ivanov", "pa$$w0rd", new Team("Тестовая команда", null), null);

            var juridicalLegalForm = new LegalForm("ООО", EconomicAgentType.JuridicalPerson);

            juridicalPerson = new JuridicalPerson(juridicalLegalForm)
            {
                Id = 1
            };
            accountOrganization = new AccountOrganization("Тестовое юридическое лицо", "Тестовое юридическое лицо", juridicalPerson)
            {
                Id = 1
            };
            clientOrganization = new ClientOrganization("Тестовая организация клиента", "Тестовая организация клиента", new JuridicalPerson(juridicalLegalForm)
            {
                Id = 2
            })
            {
                Id = 3
            };
            contract = new ClientContract(accountOrganization, clientOrganization, "12", "1", DateTime.Now, DateTime.Now);
        }
Esempio n. 5
0
 public DynamicClient(string path, ClientRegion? region = null, string publicKey = null)
     : base(path, region, publicKey)
 {
 }
Esempio n. 6
0
 public WoWClient(ClientRegion? region = null, string publicKey = null, string privateKey = null)
     : base("wow", region, publicKey, privateKey)
 {
 }