private void RemoveWorkerListViewElement(SharedWorker companyWorker)
        {
            LocalWorker           worker          = (LocalWorker)companyWorker;
            ControlListViewDrop   workerListView  = (null == worker.AssignedProject) ? ListViewAvailableWorkers : ListViewAssignedWorkers;
            ListViewElementWorker listViewElement = UIWorkers.GetWorkerListViewElement(companyWorker, workerListView);

            RemoveWorkerListViewElement(listViewElement, workerListView);
        }
        private void RemoveWorkerListViewElement(LocalWorker worker, ControlListView listView)
        {
            ListViewElementWorker element = UIWorkers.GetWorkerListViewElement(worker, listView);
            Button buttonComponent        = element.GetComponent <Button>();

            WorkersButtonsSelector.RemoveButton(buttonComponent);
            ListViewWorkers.RemoveControl(element.gameObject);
            worker.SatisfactionChanged -= OnWorkerSatisfactionChanged;
        }
        private void OnProjectWorkerRemoved(SharedWorker companyWorker)
        {
            ListViewElementWorker element = UIWorkers.GetWorkerListViewElement(companyWorker, ListViewAssignedWorkers);

            //Check if list view element was dragged to other list view
            if (null != element)
            {
                RemoveWorkerListViewElement(element, ListViewAssignedWorkers);
                ListViewElementWorker newElement = CreateWorkerListViewElement((LocalWorker)companyWorker);
                ListViewAvailableWorkers.AddControl(newElement.gameObject);
            }

            SetListViewAssignedWorkersText();
            SetListViewAvailableWorkersText();
            SetProjectInfo();
        }
        private void OnWorkerSalaryChanged(SharedWorker companyWorker)
        {
            if (null != SelectedWorker && companyWorker.ID == SelectedWorker.ID)
            {
                TextSalary.text = UIWorkers.GetWorkerSalaryString(companyWorker);
            }

            ListViewElementWorker elem = null;

            if (companyWorker is LocalWorker)
            {
                elem = UIWorkers.GetWorkerListViewElement(companyWorker, ListViewCompanyWorkers);
            }
            else
            {
                elem = UIWorkers.GetWorkerListViewElement(companyWorker, ListViewOtherPlayersWorkers);
            }

            elem.Text.text = UIWorkers.GetWorkerListViewElementText(companyWorker);
        }
        private void OnProjectListViewSelectedElementChanged(Button btn)
        {
            if (null != SelectedScrum)
            {
                UnsubscribeProjectEvents();

                foreach (LocalWorker worker in SelectedScrum.BindedProject.Workers)
                {
                    ListViewElementWorker element = UIWorkers.GetWorkerListViewElement(worker, ListViewAssignedWorkers);
                    element.gameObject.SetActive(false);
                }
            }

            if (null != btn)
            {
                ListViewElementProject element = btn.GetComponent <ListViewElementProject>();
                SelectedScrum = SimulationManagerComponent.ControlledCompany.ScrumProcesses.Find(x =>
                {
                    return(element.Project == x.BindedProject);
                });

                SetProjectInfo();
                SubscribeProjectEvents();
                SetListViewAssignedWorkersText();
                ListViewAssignedWorkers.transform.parent.gameObject.SetActive(true);

                foreach (LocalWorker worker in SelectedScrum.BindedProject.Workers)
                {
                    ListViewElementWorker elem = UIWorkers.GetWorkerListViewElement(worker, ListViewAssignedWorkers);
                    elem.gameObject.SetActive(true);
                }
            }
            else
            {
                SelectedScrum = null;
                SetProjectInfo();
                ListViewAssignedWorkers.transform.parent.gameObject.SetActive(false);
            }
        }
        private void OnWorkerSatisfactionChanged(SharedWorker companyWorker)
        {
            ListViewElementWorker element = UIWorkers.GetWorkerListViewElement(companyWorker, ListViewWorkers);

            element.Text.text = GetWorkerListViewElementText((LocalWorker)companyWorker);
        }