Exemple #1
0
		public FormColonization(PlayerController controller) : this()
		{
			this.controller = controller;

			this.projectList.RowStyles.Clear();
			foreach(var project in controller.ColonizationProjects)
			{
				var itemView = new ColonizationTargetView(project, controller);
				this.projectList.RowStyles.Add(new RowStyle(SizeType.AutoSize));
				this.projectList.Controls.Add(itemView);
			}

			this.shipyardList.RowStyles.Clear();
			this.updateSourceList();
			this.updateSelectedColonizer();
			this.capacityInput.Text = new ThousandsFormatter().Format(controller.TargetTransportCapacity);
			this.updateSourceButton();

			var context = LocalizationManifest.Get.CurrentLanguage["FormColonization"];
			this.Text = context["title"].Text();
			this.Font = SettingsWinforms.Get.FormFont;

			this.colonizerDesignText.Text = context["colonizerLabel"].Text() + ":";
			this.capacityText.Text = context["capacityLabel"].Text() + ":";
			this.projectListTitle.Text = context["projectsTitle"].Text() + ":";
			this.shipyardListTitle.Text = context["shipyardsTitle"].Text() + ":";
		}
Exemple #2
0
        public FormColonization(PlayerController controller) : this()
        {
            this.controller = controller;

            var projects = controller.ColonizationProjects().ToList();

            projectList.RowStyles.Clear();
            for (int i = 0; i < projects.Count; i++)
            {
                projectList.RowStyles.Add(new RowStyle(SizeType.AutoSize));
            }

            for (int i = 0; i < projects.Count; i++)
            {
                var itemView = new ColonizationTargetView(projects[i], controller);
                projectList.Controls.Add(itemView);
            }

            var context = LocalizationManifest.Get.CurrentLanguage["FormColonization"];

            this.Text = context["title"].Text();
            this.Font = SettingsWinforms.Get.FormFont;
        }