From a3941ee4fadc71245159c76f1f0d0f9c117a75f2 Mon Sep 17 00:00:00 2001 From: Anton Kasyanov Date: Sun, 28 May 2017 23:21:52 +0300 Subject: [PATCH] GUI components name update --- Eve-O-Preview/Presentation/MainPresenter.cs | 6 +-- .../UI/Implementation/MainForm.Designer.cs | 40 +++++++++---------- Eve-O-Preview/UI/Implementation/MainForm.cs | 10 ++--- Eve-O-Preview/UI/Implementation/MainForm.resx | 3 ++ Eve-O-Preview/UI/Interface/IMainView.cs | 4 +- 5 files changed, 33 insertions(+), 30 deletions(-) diff --git a/Eve-O-Preview/Presentation/MainPresenter.cs b/Eve-O-Preview/Presentation/MainPresenter.cs index 0dc4621..e0d603e 100644 --- a/Eve-O-Preview/Presentation/MainPresenter.cs +++ b/Eve-O-Preview/Presentation/MainPresenter.cs @@ -41,7 +41,7 @@ namespace EveOPreview.UI this.View.ApplicationSettingsChanged = this.SaveApplicationSettings; this.View.ThumbnailsSizeChanged = this.UpdateThumbnailsSize; this.View.ThumbnailStateChanged = this.UpdateThumbnailState; - this.View.ForumUrlLinkActivated = this.OpenForumUrlLink; + this.View.DocumentationLinkActivated = this.OpenDocumentationLink; this.View.ApplicationExitRequested = this.ExitApplication; this._thumbnailManager.ThumbnailsAdded = this.ThumbnailsAdded; @@ -53,7 +53,7 @@ namespace EveOPreview.UI private void Activate() { this.LoadApplicationSettings(); - this.View.SetForumUrl(MainPresenter.ForumUrl); + this.View.SetDocumentationUrl(MainPresenter.ForumUrl); this.View.SetVersionInfo(this.GetApplicationVersion()); if (this._configuration.MinimizeToTray) { @@ -217,7 +217,7 @@ namespace EveOPreview.UI this._thumbnailManager.SetThumbnailState(thumbnailId, this._thumbnailDescriptionViews[thumbnailId].IsDisabled); } - private void OpenForumUrlLink() + private void OpenDocumentationLink() { ProcessStartInfo processStartInfo = new ProcessStartInfo(new Uri(MainPresenter.ForumUrl).AbsoluteUri); Process.Start(processStartInfo); diff --git a/Eve-O-Preview/UI/Implementation/MainForm.Designer.cs b/Eve-O-Preview/UI/Implementation/MainForm.Designer.cs index 2aec563..9276f1e 100644 --- a/Eve-O-Preview/UI/Implementation/MainForm.Designer.cs +++ b/Eve-O-Preview/UI/Implementation/MainForm.Designer.cs @@ -53,6 +53,7 @@ namespace EveOPreview.UI System.Windows.Forms.Label ThumbnailsListLabel; System.Windows.Forms.TabPage AboutTabPage; System.Windows.Forms.Panel AboutPanel; + System.Windows.Forms.Label DocumentationLinkLabel; System.Windows.Forms.Label DescriptionLabel; System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); System.Windows.Forms.Label NameLabel; @@ -84,9 +85,8 @@ namespace EveOPreview.UI this.ShowThumbnailOverlaysCheckBox = new System.Windows.Forms.CheckBox(); this.ShowThumbnailFramesCheckBox = new System.Windows.Forms.CheckBox(); this.ThumbnailsList = new System.Windows.Forms.CheckedListBox(); - this.label1 = new System.Windows.Forms.Label(); this.VersionLabel = new System.Windows.Forms.Label(); - this.ForumLinkLabel = new System.Windows.Forms.LinkLabel(); + this.DocumentationLink = new System.Windows.Forms.LinkLabel(); this.NotifyIcon = new System.Windows.Forms.NotifyIcon(this.components); this.TrayMenu = new System.Windows.Forms.ContextMenuStrip(this.components); RestoreWindowMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -111,6 +111,7 @@ namespace EveOPreview.UI ThumbnailsListLabel = new System.Windows.Forms.Label(); AboutTabPage = new System.Windows.Forms.TabPage(); AboutPanel = new System.Windows.Forms.Panel(); + DocumentationLinkLabel = new System.Windows.Forms.Label(); DescriptionLabel = new System.Windows.Forms.Label(); NameLabel = new System.Windows.Forms.Label(); ContentTabControl.SuspendLayout(); @@ -738,25 +739,25 @@ namespace EveOPreview.UI // AboutPanel // AboutPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - AboutPanel.Controls.Add(this.label1); + AboutPanel.Controls.Add(DocumentationLinkLabel); AboutPanel.Controls.Add(DescriptionLabel); AboutPanel.Controls.Add(this.VersionLabel); AboutPanel.Controls.Add(NameLabel); - AboutPanel.Controls.Add(this.ForumLinkLabel); + AboutPanel.Controls.Add(this.DocumentationLink); AboutPanel.Dock = System.Windows.Forms.DockStyle.Fill; AboutPanel.Location = new System.Drawing.Point(0, 0); AboutPanel.Name = "AboutPanel"; AboutPanel.Size = new System.Drawing.Size(262, 210); AboutPanel.TabIndex = 2; // - // label1 + // DocumentationLinkLabel // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(0, 157); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(206, 13); - this.label1.TabIndex = 6; - this.label1.Text = "For more information visit our forum thread:"; + DocumentationLinkLabel.AutoSize = true; + DocumentationLinkLabel.Location = new System.Drawing.Point(0, 157); + DocumentationLinkLabel.Name = "DocumentationLinkLabel"; + DocumentationLinkLabel.Size = new System.Drawing.Size(206, 13); + DocumentationLinkLabel.TabIndex = 6; + DocumentationLinkLabel.Text = "For more information visit our forum thread:"; // // DescriptionLabel // @@ -786,16 +787,16 @@ namespace EveOPreview.UI NameLabel.TabIndex = 3; NameLabel.Text = "EVE-O Preview"; // - // ForumLinkLabel + // DocumentationLink // - this.ForumLinkLabel.Location = new System.Drawing.Point(0, 173); - this.ForumLinkLabel.Name = "ForumLinkLabel"; - this.ForumLinkLabel.Size = new System.Drawing.Size(262, 33); - this.ForumLinkLabel.TabIndex = 2; - this.ForumLinkLabel.TabStop = true; - this.ForumLinkLabel.Text = "to be set from prresenter to be set from prresenter to be set from prresenter to " + + this.DocumentationLink.Location = new System.Drawing.Point(0, 173); + this.DocumentationLink.Name = "DocumentationLink"; + this.DocumentationLink.Size = new System.Drawing.Size(262, 33); + this.DocumentationLink.TabIndex = 2; + this.DocumentationLink.TabStop = true; + this.DocumentationLink.Text = "to be set from prresenter to be set from prresenter to be set from prresenter to " + "be set from prresenter"; - this.ForumLinkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.ForumLinkLabelClicked_Handler); + this.DocumentationLink.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.DocumentationLinkClicked_Handler); // // NotifyIcon // @@ -894,7 +895,6 @@ namespace EveOPreview.UI private CheckBox ShowThumbnailFramesCheckBox; private CheckedListBox ThumbnailsList; private LinkLabel DocumentationLink; - private Label label1; private Label VersionLabel; } } \ No newline at end of file diff --git a/Eve-O-Preview/UI/Implementation/MainForm.cs b/Eve-O-Preview/UI/Implementation/MainForm.cs index 71b92fc..8494ced 100644 --- a/Eve-O-Preview/UI/Implementation/MainForm.cs +++ b/Eve-O-Preview/UI/Implementation/MainForm.cs @@ -195,9 +195,9 @@ namespace EveOPreview.UI this.WindowState = FormWindowState.Minimized; } - public void SetForumUrl(string url) + public void SetVersionInfo(string version) { - this.ForumLinkLabel.Text = url; + this.VersionLabel.Text = version; } public void SetDocumentationUrl(string url) @@ -269,7 +269,7 @@ namespace EveOPreview.UI public Action ThumbnailStateChanged { get; set; } - public Action ForumUrlLinkActivated { get; set; } + public Action DocumentationLinkActivated { get; set; } #region UI events private void ContentTabControl_DrawItem(object sender, DrawItemEventArgs e) @@ -354,9 +354,9 @@ namespace EveOPreview.UI this.ThumbnailStateChanged?.Invoke(selectedItem.Id); } - private void ForumLinkLabelClicked_Handler(object sender, LinkLabelLinkClickedEventArgs e) + private void DocumentationLinkClicked_Handler(object sender, LinkLabelLinkClickedEventArgs e) { - this.ForumUrlLinkActivated?.Invoke(); + this.DocumentationLinkActivated?.Invoke(); } private void MainFormResize_Handler(object sender, EventArgs e) diff --git a/Eve-O-Preview/UI/Implementation/MainForm.resx b/Eve-O-Preview/UI/Implementation/MainForm.resx index 562c799..d7b0207 100644 --- a/Eve-O-Preview/UI/Implementation/MainForm.resx +++ b/Eve-O-Preview/UI/Implementation/MainForm.resx @@ -183,6 +183,9 @@ False + + False + False diff --git a/Eve-O-Preview/UI/Interface/IMainView.cs b/Eve-O-Preview/UI/Interface/IMainView.cs index bc43e39..68f6a7e 100644 --- a/Eve-O-Preview/UI/Interface/IMainView.cs +++ b/Eve-O-Preview/UI/Interface/IMainView.cs @@ -32,7 +32,7 @@ namespace EveOPreview.UI bool EnableActiveClientHighlight { get; set; } Color ActiveClientHighlightColor { get; set; } - void SetForumUrl(string url); + void SetDocumentationUrl(string url); void SetVersionInfo(string version); void SetThumbnailSizeLimitations(Size minimumSize, Size maximumSize); @@ -50,6 +50,6 @@ namespace EveOPreview.UI Action ApplicationSettingsChanged { get; set; } Action ThumbnailsSizeChanged { get; set; } Action ThumbnailStateChanged { get; set; } - Action ForumUrlLinkActivated { get; set; } + Action DocumentationLinkActivated { get; set; } } } \ No newline at end of file