Esempio n. 1
0
        static void Main(string[] args)
        {
            AssemblyMaster am = new AssemblyMaster();

            am.pathToCity = "city.xml";
            City city = am.GetCity();

            if (city == null)
            {
                GenerateCity GenCity = new GenerateCity(4);
                city = GenCity.generateCity();
            }

            am.CreateCity(city);

            //создаем класс управляющий преступлениями
            ConvictionAssembler convAssembl = new ConvictionAssembler(city);

            //генерируем преступление
            Conviction conv = convAssembl.generateConviction();

            //расследуем преступление
            convAssembl.Investigate(conv);

            //создаем архив
            Arhiv arhiv = new Arhiv();

            //печатаем архив преступлений
            arhiv.printArhiv();

            ForegroundColor = ConsoleColor.Red;
        }
Esempio n. 2
0
    void Start()
    {
        AssemblyMaster = GameObject.Find("Logic").GetComponent <AssemblyMaster>();
        TextMesh       = GetComponent <TextMesh>();
        string TagName = this.transform.parent.parent.gameObject.name;

        GoalStep = ResourcesMaster.SceneSetup.TrackedAnimationTags.Find(t => t.Name.Equals(TagName)).PieceEvents[0].Name;
    }
Esempio n. 3
0
        static void Main(string[] args)
        {
            AssemblyMaster am = new AssemblyMaster();

            #region CS
            am.CityServices_URL = @"SmartCity_Services.xml";

            CityService cs = new CityService();
            cs.Service_Code = 102;
            cs.Service_Name = "Police";

            am.Create_City_Service(cs);
            #endregion

            #region City
            am.Cities_URL = @"SmartCity_Cities.xml";

            City city = new City();
            city.City_Area       = 300629;
            city.City_Population = 834813;
            city.City_Name       = "Актобе";
            city.City_Services   = new List <CityService>()
            {
                cs
            };

            am.Create_City(city);
            #endregion

            #region Region
            am.Regions_URL = @"SmartCity_Region.xml";

            Region region = new Region();
            region.Main_City   = city;
            region.Population  = 834813;
            region.Cities      = null;
            region.Region_Name = "Актюбинская область";

            am.Create_Region(region);
            #endregion

            #region Police station
            Master_Police mp = new Master_Police();

            mp.Police_Station_URL = @"Police_Station.xml";
            Police_Station ps = new Police_Station();
            ps.Police_Station_Adress = "Тимирязева 31";
            ps.city = am.GetCity()[0];
            ps.Police_Station_ID   = 001;
            ps.Police_Station_Name = "Тимимрязева";

            mp.Create_Police_Station(ps);
            #endregion

            #region
            #endregion
        }
Esempio n. 4
0
        static void Main(string[] args)
        {
            AssemblyMaster am = new AssemblyMaster();

            #region CityService
            am.PathCityService = @"\\dc\Студенты\ПКО\PMP-162.1\SmartCity\CityService.soap";

            CityService cs = new CityService();
            cs.CodeSrevice = 102;
            cs.NameService = "Полиция";

            //am.CreateCityService(cs);
            #endregion

            #region
            am.PathCity = @"\\dc\Студенты\ПКО\PMP-162.1\SmartCity\City.soap";

            City city = new City();
            city.Area         = 300629;
            city.Population   = 834813;
            city.CityName     = "Ақтөбе";
            city.CityServices = new List <CityService>()
            {
                cs
            };

            //am.CreateCity(city);
            #endregion

            #region Region
            am.PathRegion = @"\\dc\Студенты\ПКО\PMP-162.1\SmartCity\Region.soap";

            Region region = new Region();
            region.MainCity    = city;
            region.Population  = 834813;
            region.RegionCites = null;
            region.RegionName  = "Актюбинская область";

            //am.CreateRegion(region);
            #endregion

            MasterPolice pm = new MasterPolice();
            pm.PathPoliceStation = @"\\dc\Студенты\ПКО\PMP-162.1\SmartCity\PoliceStation.soap";
            PoliceStation ps = new PoliceStation();
            ps.Address           = "Темирязе 31";
            ps.city              = am.GetCity()[0];
            ps.CodePoliceStation = 001;
            ps.NamePoliceStation = "Темирязева";

            pm.CreatePoliceStation(ps);
        }
Esempio n. 5
0
        private void signPoliceStationToDistrict(District d)
        {
            Console.WriteLine("Прописываем в район полицейскую станцию");

            //загружаем имеющийся список полицейских станций
            AssemblyMaster asMasterForPoliceStations = new AssemblyMaster();

            asMasterForPoliceStations.pathToPoliceStations = "policeStations.xml";
            List <PoliceStation> PoliceStations = new List <PoliceStation>();

            PoliceStations = asMasterForPoliceStations.GetPoliceStations();

            //если список полицейских станций пуст генерируем новую полицейскую станцию
            if (PoliceStations == null)
            {
                d.PoliceStat = GeneratePoliceStation();
                d.PoliceStat.NamePoliceStation   = $"Полицейская станция  {d.DistrictID} района";
                d.PoliceStat.ifItPlaceInDistrict = true;
                d.PoliceStat.CodePoliceStation   = d.DistrictID;
                asMasterForPoliceStations.CreatePoliceStation(d.PoliceStat);
                return;
            }
            //если список полицейских станций не пуст, проверяем, прописана
            //ли в район полицейская станция если нет, прописываем ее в район
            for (int i = 0; i < PoliceStations.Count; i++)
            {
                if (!PoliceStations[i].ifItPlaceInDistrict)
                {
                    d.PoliceStat = PoliceStations[i];
                    PoliceStations[i].ifItPlaceInDistrict = true;
                }
            }

            if (d.PoliceStat == null)
            {
                d.PoliceStat = GeneratePoliceStation();
                d.PoliceStat.ifItPlaceInDistrict = true;
                d.PoliceStat.NamePoliceStation   = $"Полицейская станция  {d.DistrictID} района";
                d.PoliceStat.CodePoliceStation   = d.DistrictID;
                asMasterForPoliceStations.CreatePoliceStation(d.PoliceStat);
            }
        }
Esempio n. 6
0
 void Start()
 {
     //this.GetComponent<MeshRenderer>().materials[1] =
     AssemblyMaster = GameObject.Find("Logic").GetComponent <AssemblyMaster>();
 }
Esempio n. 7
0
 void Start()
 {
     AssemblyMaster = GetComponent <AssemblyMaster>();
 }