internal void Clear() { ExistHint = false; lblHeader.Text = ""; lblAction.Visible = false; lblDescription.Visible = false; lblIncome.Visible = false; foreach (VCTextM2 l in listRequirements) { l.Dispose(); } lblSeparateRequirement.Visible = false; listRequirements.Clear(); lblGold.Visible = false; /*lblDamageMelee.Hide(); * lblDamageArcher.Hide(); * lblDamageMagic.Hide(); * lblDefenseMelee.Hide(); * lblDefenseArcher.Hide(); * lblDefenseMagic.Hide();*/ nextTop = lblHeader.NextTop(); }
public WindowAboutProgram() : base() { windowCaption.Caption = FormMain.NAME_PROJECT; ClientControl.Width = 560; txtAboutProject = new VCTextM2(ClientControl, 0, 0, Program.formMain.fontParagraph, Color.White, ClientControl.Width); txtAboutProject.ShowBorder = true; txtAboutProject.Text = "Автобаттлер на основе \"Majesty 2: The Fantasy Kingdom Sim.\"\n\rПроект разрабатывается для проверки концепции автобаттлера во вселенной Majesty и бесплатен для использования." + "\n\rВ игре использованы графические и звуковые ресурсы из Majesty 2 (разработчик Ino-Co при участии Paradox Interactive)." + $"\n\rСборка {FormMain.VERSION} от {FormMain.DATE_VERSION}.\n\r \n\r"; txtAboutProject.Padding = new Padding(4); txtAboutProject.Height = txtAboutProject.MinHeigth() + FormMain.Config.GridSize; linkRoadmap = new VCLink(txtAboutProject, FormMain.Config.GridSize, 0, "Дорожная карта", "https://docs.google.com/document/d/1LCYOQM2Rxf-KXgc8VmsWx1K0W97vhTwsHMQiwZr4z8Q/edit?usp=sharing"); linkRoadmap.ShiftY = txtAboutProject.Height - linkRoadmap.Height - 8; linkDesignDoc = new VCLink(txtAboutProject, linkRoadmap.NextLeft() + FormMain.Config.GridSize, linkRoadmap.ShiftY, "Дизайн-документ", "https://docs.google.com/document/d/12Jw_20kLgtPcKbpVl9Ry4NawdG9dybXgvNPReBHWH2Q/edit?usp=sharing"); linkGithub = new VCLink(txtAboutProject, linkDesignDoc.NextLeft() + FormMain.Config.GridSize, linkRoadmap.ShiftY, "GitHub", "https://github.com/CyberMaxRu/The-Fantasy-Kingdoms-Battle"); txtAboutDeveloper = new VCTextM2(ClientControl, 0, txtAboutProject.NextTop(), Program.formMain.fontParagraph, Color.White, ClientControl.Width); txtAboutDeveloper.ShowBorder = true; txtAboutDeveloper.Text = "Разработчик: Кузьмин М.А.\n\rИсходный код написан на C# под .NET Framework 4.8 с рендерингом через GDI+. Использованы только стандартные компоненты, кроме работы c zip." + "\n\rРазработка ведется как проекта с открытым исходным кодом."; txtAboutDeveloper.StringFormat.Alignment = StringAlignment.Near; txtAboutDeveloper.Padding = new Padding(4); txtAboutDeveloper.Height = txtAboutDeveloper.MinHeigth() + FormMain.Config.GridSize; txtAddInfo = new VCTextM2(ClientControl, 0, txtAboutDeveloper.NextTop(), Program.formMain.fontParagraph, Color.White, ClientControl.Width); txtAddInfo.Text = "Игра создается при поддержке проекта \"Возрождение\":" + "\n\r \n\r \n\rОтдельная благодарность: Владиславу Франёву, участникам Discord-сервера: Феркасс, Герцог Тьмы, Ice_Cube." + "\n\rПомочь проекту автобаттлера можно своими предложениями (в Discord), участием в тестировании и распространении информации об игре."; txtAddInfo.StringFormat.Alignment = StringAlignment.Near; txtAddInfo.Height = txtAddInfo.MinHeigth(); linkRebirdh = new VCLink(txtAddInfo, 0, 28, "Проект \"Возрождение\" в ВК", "https://vk.com/majesty_2_vozrozhdeniye"); linkDiscord = new VCLink(txtAddInfo, linkRebirdh.NextLeft() + FormMain.Config.GridSize, linkRebirdh.ShiftY, "Приглашение в Discord", "https://discord.com/invite/3R4PDsR"); btnCheckUpdates = new VCButton(ClientControl, 0, txtAddInfo.NextTop(), "Проверить обновление"); btnCheckUpdates.Width = 256; btnCheckUpdates.Click += BtnCheckUpdates_Click; btnClose = new VCButton(ClientControl, 0, txtAddInfo.NextTop(), "Закрыть"); btnClose.ShiftX = ClientControl.Width - btnClose.Width; btnClose.Click += BtnClose_Click; AcceptButton = btnClose; CancelButton = btnClose; ClientControl.Height = btnClose.NextTop(); }
internal void AddStep1Header(string header, string action, string description) { Debug.Assert(lblHeader.Text == ""); Debug.Assert(header.Length > 0); Width = 256; ExistHint = true; lblHeader.Width = widthControl; lblHeader.Text = header; lblHeader.Height = lblHeader.MinHeigth(); nextTop = lblHeader.NextTop(); if (action.Length > 0) { lblAction.ShiftY = nextTop; lblAction.Text = action; lblAction.Height = lblAction.MinHeigth(); lblAction.Visible = true; nextTop = lblAction.NextTop(); } if (description.Length > 0) { lblDescription.ShiftY = nextTop; lblDescription.Text = description; lblDescription.Height = lblDescription.MinHeigth(); lblDescription.Visible = true; nextTop = lblDescription.NextTop(); } }
internal void AddStep3Requirement(List <TextRequirement> requirement) { Debug.Assert(requirement != null); if (requirement.Count > 0) { lblSeparateRequirement.Visible = true; lblSeparateRequirement.ShiftY = nextTop; nextTop = lblSeparateRequirement.NextTop(); VCTextM2 lr; foreach (TextRequirement tr in requirement) { lr = new VCTextM2(this, FormMain.Config.GridSize, nextTop, Program.formMain.fontSmallC, ColorRequirements(tr.Performed), widthControl); lr.StringFormat.Alignment = StringAlignment.Near; lr.Text = tr.Text; lr.Height = lr.MinHeigth(); //lr.MaximumSize = new Size(Width - FormMain.Config.GridSize * 2, 0); listRequirements.Add(lr); nextTop = lr.NextTop(); } } }
public PanelHint() : base() { ShowBorder = true; Width = 256; Visible = false; colorBackground = Color.FromArgb(192, 0, 0, 0); widthControl = Width - FormMain.Config.GridSize - FormMain.Config.GridSize; lblHeader = new VCTextM2(this, FormMain.Config.GridSize, 4, Program.formMain.fontMedCaptionC, Color.Yellow, widthControl); lblHeader.StringFormat.Alignment = StringAlignment.Near; lblHeader.StringFormat.LineAlignment = StringAlignment.Near; lblAction = new VCTextM2(this, FormMain.Config.GridSize, lblHeader.NextTop(), Program.formMain.fontMedCaptionC, FormMain.Config.HintAction, widthControl); lblAction.StringFormat.Alignment = StringAlignment.Near; lblAction.StringFormat.LineAlignment = StringAlignment.Near; lblDescription = new VCTextM2(this, FormMain.Config.GridSize, lblAction.NextTop(), Program.formMain.fontSmallC, FormMain.Config.HintDescription, widthControl); lblDescription.StringFormat.Alignment = StringAlignment.Near; lblDescription.StringFormat.LineAlignment = StringAlignment.Near; lblIncome = new VCLabelValue(this, FormMain.Config.GridSize, lblDescription.NextTop(), FormMain.Config.HintIncome); lblIncome.ImageIndex = FormMain.GUI_16_INCOME; lblIncome.Width = widthControl; lblSeparateRequirement = new VCSeparator(this, FormMain.Config.GridSize, lblIncome.NextTop()); lblSeparateRequirement.Width = widthControl; lblGold = new VCLabelValue(this, FormMain.Config.GridSize, lblSeparateRequirement.NextTop(), FormMain.Config.HintIncome); lblGold.ImageIndex = FormMain.GUI_16_GOLD; lblGold.Width = widthControl; /* lblDamageMelee = new Label() * { * Parent = this, * Left = FormMain.Config.GridSize, * Top = FormMain.Config.GridSize, * Width = (ClientSize.Width - (FormMain.Config.GridSize * 2)) / 3, * ImageList = ilParameters, * ImageIndex = FormMain.GUI_PARAMETER_ATTACK_MELEE, * ImageAlign = ContentAlignment.MiddleLeft, * ForeColor = FormMain.Config.HintParameter, * BackColor = Color.Transparent, * Font = FormMain.Config.FontHintAdditionalText * }; * * lblDamageArcher = new Label() * { * Parent = this, * Left = lblDamageMelee.Left + lblDamageMelee.Width, * Top = FormMain.Config.GridSize, * Width = (ClientSize.Width - (FormMain.Config.GridSize * 2)) / 3, * ImageList = ilParameters, * ImageIndex = FormMain.GUI_PARAMETER_ATTACK_RANGE, * ImageAlign = ContentAlignment.MiddleLeft, * ForeColor = FormMain.Config.HintParameter, * BackColor = Color.Transparent, * Font = FormMain.Config.FontHintAdditionalText * }; * * lblDamageMagic = new Label() * { * Parent = this, * Left = lblDamageArcher.Left + lblDamageArcher.Width, * Top = FormMain.Config.GridSize, * Width = (ClientSize.Width - (FormMain.Config.GridSize * 2)) / 3, * ImageList = ilParameters, * ImageIndex = FormMain.GUI_PARAMETER_ATTACK_MAGIC, * ImageAlign = ContentAlignment.MiddleLeft, * ForeColor = FormMain.Config.HintParameter, * BackColor = Color.Transparent, * Font = FormMain.Config.FontHintAdditionalText * }; * * lblDefenseMelee = new Label() * { * Parent = this, * Left = FormMain.Config.GridSize, * Top = FormMain.Config.GridSize, * Width = (ClientSize.Width - (FormMain.Config.GridSize * 2)) / 3, * ImageList = ilParameters, * ImageIndex = FormMain.GUI_PARAMETER_DEFENSE_MELEE, * ImageAlign = ContentAlignment.MiddleLeft, * ForeColor = FormMain.Config.HintParameter, * BackColor = Color.Transparent, * Font = FormMain.Config.FontHintAdditionalText * }; * * lblDefenseArcher = new Label() * { * Parent = this, * Left = lblDefenseMelee.Left + lblDefenseMelee.Width, * Top = FormMain.Config.GridSize, * Width = (ClientSize.Width - (FormMain.Config.GridSize * 2)) / 3, * ImageList = ilParameters, * ImageIndex = FormMain.GUI_PARAMETER_DEFENSE_RANGE, * ImageAlign = ContentAlignment.MiddleLeft, * ForeColor = FormMain.Config.HintParameter, * BackColor = Color.Transparent, * Font = FormMain.Config.FontHintAdditionalText * }; * * lblDefenseMagic = new Label() * { * Parent = this, * Left = lblDefenseArcher.Left + lblDefenseArcher.Width, * Top = FormMain.Config.GridSize, * Width = (ClientSize.Width - (FormMain.Config.GridSize * 2)) / 3, * ImageList = ilParameters, * ImageIndex = FormMain.GUI_PARAMETER_DEFENSE_MAGIC, * ImageAlign = ContentAlignment.MiddleLeft, * ForeColor = FormMain.Config.HintParameter, * BackColor = Color.Transparent, * Font = FormMain.Config.FontHintAdditionalText * };*/ Clear(); }