示例#1
0
        private void updateTreaties()
        {
            var context = LocalizationManifest.Get.CurrentLanguage["FormAudience"];

            this.warAction.Text = context[this.controller.IsAtWar ? "declarePeace" : "declareWar"].Text();

            this.treatyList.SuspendLayout();
            this.treatyList.Controls.Clear();
            foreach (var treaty in this.controller.Treaties)
            {
                var control = new TreatyBriefView();
                control.SetData(Resources.cancel, treaty.Name);
                this.treatyList.Controls.Add(control);
            }
            this.treatyList.ResumeLayout();
        }
示例#2
0
        public void SetData(ContactInfo contact)
        {
            this.Data = contact;

            this.playerName.Text       = contact.Player.Name;
            this.playerColor.BackColor = contact.Player.Color;

            this.audienceRequest.SetData(Resources.message, LocalizationManifest.Get.CurrentLanguage["FormRelations"]["audienceRequested"].Text());
            this.treatyList.SuspendLayout();
            foreach (var treaty in contact.Treaties)
            {
                var control = new TreatyBriefView();
                control.SetData(Resources.cancel, treaty.Name);
                this.treatyList.Controls.Add(control);
            }
            this.treatyList.ResumeLayout();
        }