public OrderGroupWindow(GroupLogic logicG, OrderLogic logicO)
 {
     InitializeComponent();
     this.logic  = logicO;
     this.logicG = logicG;
     logger      = LogManager.GetCurrentClassLogger();
 }
Exemple #2
0
 public FormGroup(GroupLogic logic, CounsellorLogic counsellorLogic, ChildLogic childLogic)
 {
     InitializeComponent();
     this.logic                 = logic;
     this.counsellorLogic       = counsellorLogic;
     this.childLogic            = childLogic;
     comboBoxProfile.DataSource = Enum.GetValues(typeof(Profile));
 }
Exemple #3
0
 public FormUser(UserLogic userLogic, RoleLogic roleLogic,
                 GroupLogic groupLogic)
 {
     InitializeComponent();
     this.userLogic  = userLogic;
     this.roleLogic  = roleLogic;
     this.groupLogic = groupLogic;
 }
Exemple #4
0
 public GroupController(IGroupDescription group, IRequestList requestList, IUserDescription users, IParticipation participation,
                        IFile files, IWebHostEnvironment appEnviron, IRole role)
 {
     _groupRepo         = group;
     _requestListRepo   = requestList;
     _userRepo          = users;
     _participationRepo = participation;
     _filesRepo         = files;
     _appEnviron        = appEnviron;
     _roleRepo          = role;
     _groupLogic        = new GroupLogic(group, requestList, users, participation, files, appEnviron, role);
 }
        public FormGroupChild(GroupLogic logic)
        {
            InitializeComponent();
            List <GroupViewModel> list = logic.Read(null);

            if (list != null)
            {
                comboBoxAddChild.DisplayMember = "ChildName";
                comboBoxAddChild.ValueMember   = "Id";
                comboBoxAddChild.DataSource    = list;
                comboBoxAddChild.SelectedItem  = null;
            }
        }
        static double CreateGroup()
        {
            var group = new Group
            {
                Name            = "УЖКХбд-11",
                Year            = 1,
                PrefectLastName = "Кузнецов"
            };
            var startTime = DateTime.Now;

            GroupLogic.Create(group);
            var finishTime = DateTime.Now;

            Console.WriteLine("---Скрипт CreateGroup выполнен");
            return((finishTime - startTime).TotalMilliseconds);
        }
        public ActionResult AssignToNetwork()
        {
            var member = new MemberLogic().Find(s => s.Id.Equals(User.Identity.GetUserId()));

            var addAgentModel = new RegisterAndAssignUserToNetWork();

            addAgentModel.AvailableSex.Add(new SelectListItem()
            {
                Text  = "Select Sex",
                Value = ""
            });
            var sex = new GenderProcess().GetSex().OrderBy(s => s.Name);

            foreach (var item in sex)
            {
                addAgentModel.AvailableSex.Add(new SelectListItem()
                {
                    Text  = item.Name,
                    Value = item.Id
                });
            }

            addAgentModel.AvailableFunction.Add(new SelectListItem()
            {
                Text  = "Select Function",
                Value = ""
            });

            var function = new GroupLogic().Get(s => s.Owner.Equals(member.Agency));

            foreach (var item in function)
            {
                addAgentModel.AvailableFunction.Add(new SelectListItem()
                {
                    Text  = item.Name,
                    Value = item.Id
                });
            }

            return(View(addAgentModel));
        }
Exemple #8
0
        public ActionResult Index()
        {
            if (Session["Username"] != null)
            {
                PlayerLogic playerLogic = new PlayerLogic();
                Session["UserID"] = playerLogic.GetUserID((string)Session["UserName"]);

                GroupLogic   groupLogic = new GroupLogic();
                List <Group> groups     = new List <Group>();

                List <int> GroupsOfUser = groupLogic.GetGroupIdsFromPlayer((int)Session["UserID"]);
                foreach (int i in GroupsOfUser)
                {
                    groups.Add(groupLogic.GetGroupDetails(i));
                }

                ViewBag.groups = groups;
                return(View());
            }
            return(RedirectToAction("Login", "Player"));
        }
        static double UpdateGroup()
        {
            var groupToUpd = GroupLogic
                             .Read(new Group {
                Name = "РТбд-32"
            })
                             .FirstOrDefault();
            var newGroup = new Group
            {
                Id              = groupToUpd.Id,
                Name            = groupToUpd.Name,
                PrefectLastName = "Чернов",
                Year            = groupToUpd.Year
            };
            var startTime = DateTime.Now;

            GroupLogic.Update(newGroup);
            var finishTime = DateTime.Now;

            Console.WriteLine("---Скрипт UpdateGroup выполнен");
            return((finishTime - startTime).TotalMilliseconds);
        }
Exemple #10
0
 public LocationContextEventArg(GroupLogic currentLocationContext, GroupLogic prevLocationContext)
 {
     CurrentLocationContext  = currentLocationContext;
     PreviousLocationContext = prevLocationContext;
 }
Exemple #11
0
 public FormGroups(GroupLogic logic)
 {
     InitializeComponent();
     this.logic = logic;
 }
Exemple #12
0
 public MainForm(MatchingLogic logicM, GroupLogic logic)
 {
     InitializeComponent();
     this.logic  = logic;
     this.logicM = logicM;
 }
Exemple #13
0
 public ElvantoManager(IOptions <ElvantoOptions> optionsAccessor) : base(optionsAccessor)
 {
     Groups      = new GroupLogic(ElvantoOptions);
     People      = new PersonLogic(ElvantoOptions);
     PeopleFlows = new PeopleFlowLogic(ElvantoOptions);
 }
Exemple #14
0
 public ElvantoManager(string apiKey) : base(apiKey)
 {
     Groups      = new GroupLogic(ElvantoOptions);
     People      = new PersonLogic(ElvantoOptions);
     PeopleFlows = new PeopleFlowLogic(ElvantoOptions);
 }
Exemple #15
0
 public LocationContextEventArg(GroupLogic currentLocationContext, GroupLogic prevLocationContext)
 {
     CurrentLocationContext = currentLocationContext;
     PreviousLocationContext = prevLocationContext;
 }
    void ProcessCombat()
    {
        if (!bCombatStarted)
        {
        }
        else
        {
            if (bActionInProgress && bFighterInInitialPosition)
            {
                if (!waitedOneFrame)
                {
                    waitedOneFrame = true;
                }
                else
                {
                    ActionEnded();
                    waitedOneFrame = false;
                }
            }

            if (!bTurnInProgress && !fighterMouvementManager.bMoveFighterJoiningToPosition)
            {
                if (protoScript != null)
                {
                    if (protoScript.combat != null)
                    {
                        protoScript.combat.NextTurn();
                    }
                }

                currentFighter = GetNextFighter();


                actionLaunched = false;
                actionWheel.SetFighter(currentFighter);

                if (currentFighter.eCreatureType == CreatureType.Monster)
                {
                    // actionWheel.SetAction(ActionType.FEAR, ((GroupHumanFighter)humanGroupFighter).bCanBeFeared);
                    // actionWheel.SetAction(ActionType.TALK, ((GroupHumanFighter)humanGroupFighter).bCanListen);
                }

                currentGroupLogic = GetGroupLogicOfFighter(currentFighter);
                bTurnInProgress   = true;
                targetChoosed     = null;
                PutFighterInFightPosition();
            }
            else if (!bActionInProgress && bFighterInFightPosition)
            {
                if (currentGroupLogic.GetLogicType() == LogicType.IA)
                {
                    if (!bActionChoosed)
                    {
                        if (protoScript != null && protoScript.combat != null && protoScript.combat.currentTurn != null)
                        {
                            actionChoosed = ActionType.GetActionTypeWithID(protoScript.combat.currentTurn.ActionCode);
                        }
                        else
                        {
                            actionChoosed = ((GroupIA)currentGroupLogic).SelectAction(monsterGroupFighter.lFighters, humanGroupFighter.lFighters);
                        }

                        bActionChoosed = true;

                        if (actionChoosed.GetTargetType() == ActionType.ActionTargetType.OneTarget)
                        {
                            bActionRequireTarget = true;
                        }
                        else
                        {
                            bActionRequireTarget = false;
                        }
                    }
                    else if (bActionRequireTarget && !bTargetChoosed)
                    {
                        targetChoosed  = ((GroupIA)currentGroupLogic).SelectTarget(monsterGroupFighter.lFighters, humanGroupFighter.lFighters);
                        bTargetChoosed = true;
                    }
                    else
                    {
                        // Current Fighter perform action on target
                        PerformAction();
                    }
                }
                else  // If LogicType = Player
                {
                    if (!bActionChoosed)
                    {
                        if (currentFighter.eCreatureType == CreatureType.Monster)
                        {
                            if (((Monster)currentFighter).isBoss)
                            {
                                actionChoosed  = ActionType.FEAR;
                                bActionChoosed = true;


                                AkSoundEngine.PostEvent("Play_" + currentFighter.sName + "Fear", gameObject);
                            }
                        }
                        // Choose action
                    }
                    else if (bActionRequireTarget && !bTargetChoosed)
                    {
                        // Chose Target
                    }
                    else
                    {
                        // Current Fighter perform action on target
                        // Debug.Log("Action in progress player");
                        PerformAction();
                    }
                }
            }
        }
    }
Exemple #17
0
 /// <summary>
 /// contructor to initialize logic
 /// </summary>
 /// <param name="logic"></param>
 public GroupController(GroupLogic logic)
     : base()
 {
     logger.Info("Created: GroupController");
     _logic = logic;
 }