diff --git a/installer.iss b/installer.iss index c109951..2acdb9b 100644 --- a/installer.iss +++ b/installer.iss @@ -55,6 +55,7 @@ end; procedure DeleteUserData; begin + DelTree(ExpandConstant('{app}\scripts'), true, true, true); DelTree(ExpandConstant('{app}\themes'), true, true, true); DeleteFile(ExpandConstant('{app}\settings.conf')); DeleteFile(ExpandConstant('{app}\{#MyAppExeName}.log')); diff --git a/src/AboutDialog.Designer.cs b/src/AboutDialog.Designer.cs index 74993c7..3ba75a0 100644 --- a/src/AboutDialog.Designer.cs +++ b/src/AboutDialog.Designer.cs @@ -28,158 +28,67 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { - this.iconBox = new System.Windows.Forms.PictureBox(); - this.nameLabel = new System.Windows.Forms.Label(); - this.copyrightLabel = new System.Windows.Forms.Label(); - this.descriptionLabel = new System.Windows.Forms.Label(); - this.websiteLabel = new System.Windows.Forms.LinkLabel(); this.closeButton = new System.Windows.Forms.Button(); - this.creditsButton = new System.Windows.Forms.CheckBox(); - this.donateButton = new System.Windows.Forms.Button(); - this.creditsBox = new System.Windows.Forms.TextBox(); + this.richTextBox1 = new System.Windows.Forms.RichTextBox(); + this.iconBox = new System.Windows.Forms.PictureBox(); ((System.ComponentModel.ISupportInitialize)(this.iconBox)).BeginInit(); this.SuspendLayout(); // - // iconBox - // - this.iconBox.Location = new System.Drawing.Point(5, 5); - this.iconBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.iconBox.Name = "iconBox"; - this.iconBox.Size = new System.Drawing.Size(55, 52); - this.iconBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.iconBox.TabIndex = 0; - this.iconBox.TabStop = false; - // - // nameLabel - // - this.nameLabel.Location = new System.Drawing.Point(13, 6); - this.nameLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.nameLabel.Name = "nameLabel"; - this.nameLabel.Size = new System.Drawing.Size(489, 31); - this.nameLabel.TabIndex = 1; - this.nameLabel.Text = "WinDynamicDesktop"; - this.nameLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // copyrightLabel - // - this.copyrightLabel.Location = new System.Drawing.Point(13, 41); - this.copyrightLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.copyrightLabel.Name = "copyrightLabel"; - this.copyrightLabel.Size = new System.Drawing.Size(489, 21); - this.copyrightLabel.TabIndex = 7; - this.copyrightLabel.Text = "Copyright © 2019 Timothy Johnson"; - this.copyrightLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // descriptionLabel - // - this.descriptionLabel.Location = new System.Drawing.Point(12, 63); - this.descriptionLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.descriptionLabel.Name = "descriptionLabel"; - this.descriptionLabel.Size = new System.Drawing.Size(493, 21); - this.descriptionLabel.TabIndex = 2; - this.descriptionLabel.Text = "Port of macOS Mojave Dynamic Desktop feature to Windows 10"; - this.descriptionLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // websiteLabel - // - this.websiteLabel.Location = new System.Drawing.Point(15, 85); - this.websiteLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.websiteLabel.Name = "websiteLabel"; - this.websiteLabel.Size = new System.Drawing.Size(489, 21); - this.websiteLabel.TabIndex = 1; - this.websiteLabel.TabStop = true; - this.websiteLabel.Text = "https://github.com/t1m0thyj/WinDynamicDesktop"; - this.websiteLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.websiteLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.websiteLabel_LinkClicked); - // // closeButton // this.closeButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.closeButton.Location = new System.Drawing.Point(384, 119); - this.closeButton.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.closeButton.Location = new System.Drawing.Point(207, 226); this.closeButton.Name = "closeButton"; - this.closeButton.Size = new System.Drawing.Size(100, 28); + this.closeButton.Size = new System.Drawing.Size(75, 23); this.closeButton.TabIndex = 0; this.closeButton.Text = "Close"; this.closeButton.UseVisualStyleBackColor = true; this.closeButton.Click += new System.EventHandler(this.closeButton_Click); // - // creditsButton - // - this.creditsButton.Appearance = System.Windows.Forms.Appearance.Button; - this.creditsButton.Location = new System.Drawing.Point(11, 119); - this.creditsButton.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.creditsButton.Name = "creditsButton"; - this.creditsButton.Size = new System.Drawing.Size(85, 28); - this.creditsButton.TabIndex = 2; - this.creditsButton.Text = "Credits"; - this.creditsButton.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.creditsButton.UseVisualStyleBackColor = true; - this.creditsButton.CheckedChanged += new System.EventHandler(this.creditsButton_CheckedChanged); + // richTextBox1 // - // donateButton + this.richTextBox1.Location = new System.Drawing.Point(13, 84); + this.richTextBox1.Name = "richTextBox1"; + this.richTextBox1.ReadOnly = true; + this.richTextBox1.Size = new System.Drawing.Size(463, 127); + this.richTextBox1.TabIndex = 1; + this.richTextBox1.Text = ""; + this.richTextBox1.LinkClicked += new System.Windows.Forms.LinkClickedEventHandler(this.richTextBox1_LinkClicked); // - this.donateButton.AutoSize = true; - this.donateButton.Location = new System.Drawing.Point(107, 119); - this.donateButton.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.donateButton.Name = "donateButton"; - this.donateButton.Size = new System.Drawing.Size(85, 28); - this.donateButton.TabIndex = 3; - this.donateButton.Text = "Donate"; - this.donateButton.UseVisualStyleBackColor = true; - this.donateButton.Click += new System.EventHandler(this.donateButton_Click); - // - // creditsBox + // iconBox // - this.creditsBox.Location = new System.Drawing.Point(0, 0); - this.creditsBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.creditsBox.Multiline = true; - this.creditsBox.Name = "creditsBox"; - this.creditsBox.ReadOnly = true; - this.creditsBox.Size = new System.Drawing.Size(502, 104); - this.creditsBox.TabIndex = 8; - this.creditsBox.Visible = false; + this.iconBox.Location = new System.Drawing.Point(208, 12); + this.iconBox.Name = "iconBox"; + this.iconBox.Size = new System.Drawing.Size(72, 64); + this.iconBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; + this.iconBox.TabIndex = 2; + this.iconBox.TabStop = false; // // AboutDialog // this.AcceptButton = this.closeButton; - this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(495, 154); - this.Controls.Add(this.creditsBox); - this.Controls.Add(this.donateButton); - this.Controls.Add(this.creditsButton); - this.Controls.Add(this.closeButton); + this.ClientSize = new System.Drawing.Size(488, 261); this.Controls.Add(this.iconBox); - this.Controls.Add(this.websiteLabel); - this.Controls.Add(this.descriptionLabel); - this.Controls.Add(this.copyrightLabel); - this.Controls.Add(this.nameLabel); + this.Controls.Add(this.richTextBox1); + this.Controls.Add(this.closeButton); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; - this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.Icon = global::WinDynamicDesktop.Properties.Resources.AppIcon; this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "AboutDialog"; - this.ShowIcon = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "About WinDynamicDesktop"; this.Load += new System.EventHandler(this.AboutDialog_Load); ((System.ComponentModel.ISupportInitialize)(this.iconBox)).EndInit(); this.ResumeLayout(false); - this.PerformLayout(); } #endregion - - private System.Windows.Forms.PictureBox iconBox; - private System.Windows.Forms.Label nameLabel; - private System.Windows.Forms.Label copyrightLabel; - private System.Windows.Forms.Label descriptionLabel; - private System.Windows.Forms.LinkLabel websiteLabel; private System.Windows.Forms.Button closeButton; - private System.Windows.Forms.CheckBox creditsButton; - private System.Windows.Forms.Button donateButton; - private System.Windows.Forms.TextBox creditsBox; + private System.Windows.Forms.RichTextBox richTextBox1; + private System.Windows.Forms.PictureBox iconBox; } } \ No newline at end of file diff --git a/src/AboutDialog.cs b/src/AboutDialog.cs index dafd992..2f21ee8 100644 --- a/src/AboutDialog.cs +++ b/src/AboutDialog.cs @@ -18,8 +18,9 @@ namespace WinDynamicDesktop public partial class AboutDialog : Form { private static readonly Func _ = Localization.GetTranslation; - private static readonly string websiteLink = "https://github.com/t1m0thyj/WinDynamicDesktop"; - private static readonly string donateLink = "https://paypal.me/t1m0thyj"; + private readonly string websiteLink = "https://github.com/t1m0thyj/WinDynamicDesktop"; + private readonly string donateLink = "https://paypal.me/t1m0thyj"; + private readonly string rateLink = "ms-windows-store://review/?ProductId=9NM8N7DQ3Z5F"; public AboutDialog() { @@ -27,85 +28,54 @@ public AboutDialog() Localization.TranslateForm(this); this.Font = SystemFonts.MessageBoxFont; - this.nameLabel.Font = new Font(this.Font.Name, this.Font.Size * 1.2F, FontStyle.Bold); - - int minWidth = TextRenderer.MeasureText(descriptionLabel.Text, this.Font).Width; - - if (this.descriptionLabel.Width < minWidth) - { - minWidth += descriptionLabel.Location.X * 2; - nameLabel.Width = minWidth; - copyrightLabel.Width = minWidth; - descriptionLabel.Width = minWidth; - websiteLabel.Width = minWidth; - } - - minWidth = minWidth + (descriptionLabel.Width - minWidth) / 2 + descriptionLabel.Location.X * 2; - - if (this.Size.Width < minWidth) - { - this.Size = new Size(minWidth, this.Size.Height); - this.CenterToScreen(); - } - - minWidth = TextRenderer.MeasureText(creditsButton.Text, this.Font).Width + 10; - - if (this.creditsButton.Width < minWidth) - { - int oldWidth = creditsButton.Width; - creditsButton.Width = minWidth; - donateButton.Location = new Point(donateButton.Location.X + minWidth - oldWidth, - donateButton.Location.Y); - } } private void AboutDialog_Load(object sender, EventArgs e) { iconBox.Image = (new Icon(Properties.Resources.AppIcon, 64, 64)).ToBitmap(); - - string version = Assembly.GetExecutingAssembly().GetName().Version.ToString(); - nameLabel.Text += " " + version.Remove(version.Length - 2); - - if (UwpDesktop.IsRunningAsUwp()) - { - nameLabel.Text += " (UWP)"; - } - - creditsBox.Text = GetCreditsText(); + richTextBox1.Rtf = GetRtfText(); } - private string GetCreditsText() + private string GetRtfLink(string href, string linkText = null) { - List lines = new List() { - _("Thanks to:"), - "", - _("Apple for the Mojave wallpapers"), - _("Contributors and translators on GitHub"), - _("LocationIQ for their free geocoding API"), - _("Roundicons from flaticon.com for the icon (licensed by CC 3.0 BY)") - }; - - return string.Join(Environment.NewLine + " ", lines); - } - - private void websiteLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) - { - System.Diagnostics.Process.Start(websiteLink); + return @"{\field{\*\fldinst HYPERLINK " + '"' + href + '"' + @"}{\fldrslt " + (linkText ?? href) + "}}"; } - private void closeButton_Click(object sender, EventArgs e) + private string GetRtfText() { - this.Close(); + string versionStr = Assembly.GetExecutingAssembly().GetName().Version.ToString(); + versionStr = versionStr.Remove(versionStr.Length - 2); + versionStr += UwpDesktop.IsRunningAsUwp() ? " (UWP)" : string.Empty; + + string copyrightLine = ((AssemblyCopyrightAttribute)Attribute.GetCustomAttribute( + Assembly.GetExecutingAssembly(), typeof(AssemblyCopyrightAttribute), false)).Copyright; + + string donateRateLine = string.Format(_("If you like the app, please consider {0} or {1} :)"), + GetRtfLink(donateLink, _("donating")), GetRtfLink(rateLink, _("rating it"))); + + return @"{\rtf1\pc\fs5\par" + + @"\sb72\qc\fs30\b WinDynamicDesktop " + versionStr + @"\b0\par" + + @"\fs20 " + _("Port of macOS Dynamic Desktop feature to Windows 10") + @"\par " + + copyrightLine + @"\par " + + GetRtfLink(websiteLink) + @"\par " + + donateRateLine + @"\par" + + @"\par" + + @"\b " + _("Thanks to:") + @"\b0\par " + + _("Apple for the Mojave wallpapers") + @"\par " + + _("Contributors and translators on GitHub") + @"\par " + + _("LocationIQ for their free geocoding API") + @"\par " + + _("Roundicons from flaticon.com for the icon (licensed by CC 3.0 BY)") + @"\par" + + @"\par }"; } - private void creditsButton_CheckedChanged(object sender, EventArgs e) + private void richTextBox1_LinkClicked(object sender, LinkClickedEventArgs e) { - creditsBox.Visible ^= true; + System.Diagnostics.Process.Start(e.LinkText); } - private void donateButton_Click(object sender, EventArgs e) + private void closeButton_Click(object sender, EventArgs e) { - System.Diagnostics.Process.Start(donateLink); + this.Close(); } } } diff --git a/src/LanguageDialog.Designer.cs b/src/LanguageDialog.Designer.cs index c7af9b5..83647fb 100644 --- a/src/LanguageDialog.Designer.cs +++ b/src/LanguageDialog.Designer.cs @@ -37,9 +37,10 @@ private void InitializeComponent() // // label1 // + this.label1.AutoSize = true; this.label1.Location = new System.Drawing.Point(6, 9); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(253, 13); + this.label1.Size = new System.Drawing.Size(251, 13); this.label1.TabIndex = 1; this.label1.Text = "Select the language to use in WinDynamicDesktop:"; // @@ -103,6 +104,7 @@ private void InitializeComponent() this.Text = "Select Language"; this.Load += new System.EventHandler(this.LanguageDialog_Load); this.ResumeLayout(false); + this.PerformLayout(); } diff --git a/src/Properties/AssemblyInfo.cs b/src/Properties/AssemblyInfo.cs index 13ffd3c..df542f3 100644 --- a/src/Properties/AssemblyInfo.cs +++ b/src/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("4.0.0")] +[assembly: AssemblyVersion("4.1.0")] //[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/ThemeListViewRenderer.cs b/src/ThemeListViewRenderer.cs index c88db5c..b1ac7d2 100644 --- a/src/ThemeListViewRenderer.cs +++ b/src/ThemeListViewRenderer.cs @@ -109,10 +109,5 @@ public override void DrawItem(Graphics g, ImageListViewItem item, ItemState stat g.Clip = oldClip; } - - public override void OnLayout(LayoutEventArgs e) - { - e.ItemAreaBounds = Rectangle.Inflate(e.ItemAreaBounds, -5, -5); - } } } diff --git a/src/WinDynamicDesktop.csproj b/src/WinDynamicDesktop.csproj index 000ded7..244bbe0 100644 --- a/src/WinDynamicDesktop.csproj +++ b/src/WinDynamicDesktop.csproj @@ -66,11 +66,11 @@ packages\PropertyChanged.Fody.3.2.8\lib\net40\PropertyChanged.dll - - packages\RestSharp.106.10.1\lib\net452\RestSharp.dll + + packages\RestSharp.106.11.4\lib\net452\RestSharp.dll - - packages\SunCalcNet.1.1.1\lib\netstandard2.0\SunCalcNet.dll + + packages\SunCalcNet.1.1.3\lib\netstandard2.0\SunCalcNet.dll diff --git a/src/locale/bn.mo b/src/locale/bn.mo index 415a5fc..f588276 100644 Binary files a/src/locale/bn.mo and b/src/locale/bn.mo differ diff --git a/src/locale/cs.mo b/src/locale/cs.mo index a27b624..6d588dc 100644 Binary files a/src/locale/cs.mo and b/src/locale/cs.mo differ diff --git a/src/locale/de.mo b/src/locale/de.mo index 760044f..7f1f3fc 100644 Binary files a/src/locale/de.mo and b/src/locale/de.mo differ diff --git a/src/locale/el.mo b/src/locale/el.mo index 9fc0dd3..1179f02 100644 Binary files a/src/locale/el.mo and b/src/locale/el.mo differ diff --git a/src/locale/es.mo b/src/locale/es.mo index 31d67eb..0eaa265 100644 Binary files a/src/locale/es.mo and b/src/locale/es.mo differ diff --git a/src/locale/fr.mo b/src/locale/fr.mo index 98dbc1b..f6b9045 100644 Binary files a/src/locale/fr.mo and b/src/locale/fr.mo differ diff --git a/src/locale/hi.mo b/src/locale/hi.mo index 2a9b633..234102d 100644 Binary files a/src/locale/hi.mo and b/src/locale/hi.mo differ diff --git a/src/locale/id.mo b/src/locale/id.mo index c8e723b..95e23f8 100644 Binary files a/src/locale/id.mo and b/src/locale/id.mo differ diff --git a/src/locale/it.mo b/src/locale/it.mo index 5a8f503..db08b0c 100644 Binary files a/src/locale/it.mo and b/src/locale/it.mo differ diff --git a/src/locale/mk.mo b/src/locale/mk.mo index 9242775..99e2ee5 100644 Binary files a/src/locale/mk.mo and b/src/locale/mk.mo differ diff --git a/src/locale/pl.mo b/src/locale/pl.mo index 9ec4e0d..dcd07cb 100644 Binary files a/src/locale/pl.mo and b/src/locale/pl.mo differ diff --git a/src/locale/pt-br.mo b/src/locale/pt-br.mo index c1577b4..f539a79 100644 Binary files a/src/locale/pt-br.mo and b/src/locale/pt-br.mo differ diff --git a/src/locale/ro.mo b/src/locale/ro.mo index 6f1af6b..e2ce238 100644 Binary files a/src/locale/ro.mo and b/src/locale/ro.mo differ diff --git a/src/locale/ru.mo b/src/locale/ru.mo index c8695b5..40dcdb0 100644 Binary files a/src/locale/ru.mo and b/src/locale/ru.mo differ diff --git a/src/locale/tr.mo b/src/locale/tr.mo index 8b54c69..fbeed5e 100644 Binary files a/src/locale/tr.mo and b/src/locale/tr.mo differ diff --git a/src/locale/zh-Hans.mo b/src/locale/zh-Hans.mo index 75012cc..44e03a1 100644 Binary files a/src/locale/zh-Hans.mo and b/src/locale/zh-Hans.mo differ diff --git a/src/packages.config b/src/packages.config index 4a2873a..30f3b02 100644 --- a/src/packages.config +++ b/src/packages.config @@ -8,6 +8,6 @@ - - + + \ No newline at end of file