Exemplo n.º 1
0
        public FormResearchComplete(ResearchCompleteController controller) : this()
        {
            this.controller = controller;
            var context = LocalizationManifest.Get.CurrentLanguage["FormResearchComplete"];
            var topic   = this.controller.TopicInfo;

            this.Text = context["FormTitle"].Text();
            this.Font = SettingsWinforms.Get.FormFont;
            this.acceptButton.Text  = context["doneButton"].Text();
            this.priorityTitle.Text = context["priorityTitle"].Text();

            this.topicThumbnail.Image  = ImageCache.Get[topic.ImagePath];
            this.topicName.Text        = topic.Name;
            this.levelLabel.Text       = context["Level"].Text(new TextVar("lvl", topic.NextLevel.ToString()).Get);
            this.topicDescription.Text = topic.Description;

            this.updateList();

            if (topic.Unlocks.Length > 0)
            {
                unlockedList.SelectedIndex = 0;
            }

            updateDescription(unlockedList.SelectedItem);
        }
Exemplo n.º 2
0
        public void OnResearchComplete(ResearchCompleteController controller)
        {
            if (this.InvokeRequired)
            {
                this.BeginInvoke(new Action <ResearchCompleteController>(OnResearchComplete), controller);
                return;
            }

            using (var form = new FormResearchComplete(controller))
                form.ShowDialog();
        }
Exemplo n.º 3
0
        private void presentBreakthrough()
        {
            var playerProc = this.gameObj.Derivates.Players.First(x => x.HasBreakthrough);
            var controller = new ResearchCompleteController(
                playerProc.Player,
                playerProc.NextBreakthrough().Item.Topic,
                this,
                gameObj
                );

            if (playerProc.Player.ControlType == PlayerControlType.LocalAI)
            {
                playerProc.Player.OffscreenControl.OnResearchComplete(controller);                 //TODO(v0.8) do in separate thread/task
            }
            else
            {
                this.stateListener.OnResearchComplete(controller);
            }
        }
Exemplo n.º 4
0
 public void OnResearchComplete(ResearchCompleteController controller)
 {
     //no operation
 }
Exemplo n.º 5
0
 internal void BreakthroughReviewed(ResearchCompleteController controller)
 {
     this.gameObj.Derivates[controller.Owner].BreakthroughReviewed(controller.SelectedPriorities, this.gameObj.States);
     processingSync.Set();
 }
Exemplo n.º 6
0
 public void OnResearchComplete(ResearchCompleteController controller)
 {
     controller.Done();
 }