From 0436bbc3df9edcf30aa09101f382169d7f2b88bf Mon Sep 17 00:00:00 2001 From: Adriano <-> Date: Wed, 5 May 2021 08:35:38 +0200 Subject: [PATCH] v1.2.6 --- Tools/PetEditor/EditWindows.cs | 6 + Tools/PetEditor/MainWindow.cs | 3 + Tools/PetEditor/Properties/AssemblyInfo.cs | 6 +- Tools/PetEditor/Tools.cs | 4 + Tools/PetEditor/WebForm.cs | 5 +- src/AppWins/AppOptionsPage.xaml.cs | 19 +- src/AppWins/PetOptionsPage.xaml | 5 + src/AppWins/PetOptionsPage.xaml.cs | 7 + src/AppWins/PetSelectionPage.xaml | 17 +- src/DesktopPet.csproj | 5 +- src/DesktopPet_Portable.csproj | 1 + src/LocalData/Class1.cs | 36 +- src/Portable/FormOptions.cs | 11 +- src/Portable/FormOptions.designer.cs | 60 ++- src/Portable/LocalData.cs | 16 + src/Properties/AssemblyInfo.cs | 6 +- src/Properties/AssemblyInfoPortable.cs | 4 +- src/Properties/Settings.settings | 3 + src/Properties/Settings1.Designer.cs | 14 +- src/Properties/app.manifest | 13 +- src/Tools/XmlToDot.cs | 2 +- src/UWPSheep/Package.appxmanifest | 2 +- src/UWPSheep/UWPSheep.wapproj | 3 +- src/app.config | 58 ++- src/dotNet/FormDebug.Designer.cs | 463 +++++++++++---------- src/dotNet/FormPet.Designer.cs | 4 +- src/dotNet/FormPet.cs | 19 +- src/dotNet/Program.cs | 13 +- 28 files changed, 503 insertions(+), 302 deletions(-) diff --git a/Tools/PetEditor/EditWindows.cs b/Tools/PetEditor/EditWindows.cs index ab54369..be80645 100644 --- a/Tools/PetEditor/EditWindows.cs +++ b/Tools/PetEditor/EditWindows.cs @@ -1206,6 +1206,12 @@ private void timer1_Tick(object sender, EventArgs e) } pictureBox2.Image = listView1.LargeImageList.Images[imageIndex]; pictureBox2.Tag = val; + if (stats.SubSteps.Count <= 0) + { + timer1.Enabled = false; + return; + } + int nextIndex = (int.Parse(timer1.Tag.ToString()) + 1) % stats.SubSteps.Count; timer1.Tag = nextIndex; timer1.Interval = stats.SubSteps[nextIndex].Interval; diff --git a/Tools/PetEditor/MainWindow.cs b/Tools/PetEditor/MainWindow.cs index e79b422..3730cac 100644 --- a/Tools/PetEditor/MainWindow.cs +++ b/Tools/PetEditor/MainWindow.cs @@ -276,6 +276,7 @@ public void SelectSection(string section) editWindows.SelectSection(section); if (!editWindows.Visible) { + formChat.Hide(); xmlViewer.Hide(); editWindows.Show(); } @@ -286,6 +287,7 @@ public void SelectSection(string section) if (editWindows.Visible) { xmlViewer.Show(); + formChat.Hide(); editWindows.Hide(); } } @@ -359,6 +361,7 @@ private void toolStripButton1_Click(object sender, EventArgs e) private void toolStripButton2_Click(object sender, EventArgs e) { if (editWindows == null || xmlViewer == null) return; + if (formChat != null) formChat.Hide(); editWindows.Hide(); xmlViewer.Show(); formProject.XmlView(); diff --git a/Tools/PetEditor/Properties/AssemblyInfo.cs b/Tools/PetEditor/Properties/AssemblyInfo.cs index 925e5fc..4013056 100644 --- a/Tools/PetEditor/Properties/AssemblyInfo.cs +++ b/Tools/PetEditor/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("PetEditor")] -[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyCopyright("Copyright © 2019-2021")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -32,5 +32,5 @@ // Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, // übernehmen, indem Sie "*" eingeben: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.4.0.0")] -[assembly: AssemblyFileVersion("0.4.0.0")] +[assembly: AssemblyVersion("0.5.0.0")] +[assembly: AssemblyFileVersion("0.5.0.0")] diff --git a/Tools/PetEditor/Tools.cs b/Tools/PetEditor/Tools.cs index 7a0bf45..8ebb1c9 100644 --- a/Tools/PetEditor/Tools.cs +++ b/Tools/PetEditor/Tools.cs @@ -733,6 +733,10 @@ private void button3_Click(object sender, EventArgs e) { listView2.Items.Add("ANIMATION " + animation.Id).SubItems.Add("There is no frame inside this animation, this list can't be empty"); } + if(animation.Sequence.RepeatFromFrame >= animation.Sequence.Frame.Length) + { + listView2.Items.Add("ANIMATION " + animation.Id).SubItems.Add("Repeat-from index is higher than the number of frames"); + } animationIds.Add(animation.Id); animationNames.Add(animation.Name); } diff --git a/Tools/PetEditor/WebForm.cs b/Tools/PetEditor/WebForm.cs index b721dc5..1cd6b53 100644 --- a/Tools/PetEditor/WebForm.cs +++ b/Tools/PetEditor/WebForm.cs @@ -20,7 +20,10 @@ public WebForm() private void WebForm_Load(object sender, EventArgs e) { //chat link: http://www.e-chat.co/room/19829319 - webViewCompatible1.Source = new Uri("http://www.e-chat.co/room/19829319"); + //webViewCompatible1.Source = new Uri("http://www.e-chat.co/room/19829319"); + + // chat link2: https://tlk.io/esheep_editor + webViewCompatible1.Source = new Uri("https://tlk.io/esheep_editor"); } } } diff --git a/src/AppWins/AppOptionsPage.xaml.cs b/src/AppWins/AppOptionsPage.xaml.cs index a3bfab3..e9baf87 100644 --- a/src/AppWins/AppOptionsPage.xaml.cs +++ b/src/AppWins/AppOptionsPage.xaml.cs @@ -37,7 +37,24 @@ public AppOptionsPage() private async void AppOptionsPage_Loaded(object sender, RoutedEventArgs e) { - StartupTask startupTask = await StartupTask.GetAsync("eSheepId"); + StartupTask startupTask = null; + try + { + startupTask = await StartupTask.GetAsync("eSheepId"); + } + catch(Exception) + { + startupTask = null; + } + + if (startupTask == null) + { + MessageDialog dialog = new MessageDialog( + "Unable to get application Id", + "eSheep Id"); + await dialog.ShowAsync(); + return; + } switch (startupTask.State) { diff --git a/src/AppWins/PetOptionsPage.xaml b/src/AppWins/PetOptionsPage.xaml index c4dc15d..8a2372d 100644 --- a/src/AppWins/PetOptionsPage.xaml +++ b/src/AppWins/PetOptionsPage.xaml @@ -21,6 +21,11 @@ The original eSheep was able to bring to front the touched window. If you activate this option, your productivity will decrease ;) + Steal Taskbar Focus + + + Windows Taskbar is on topmost. Mate can "steal" the focus, but the tray icon will disappear if this occours. + Multi Screen diff --git a/src/AppWins/PetOptionsPage.xaml.cs b/src/AppWins/PetOptionsPage.xaml.cs index 2e04f01..8fb1bf4 100644 --- a/src/AppWins/PetOptionsPage.xaml.cs +++ b/src/AppWins/PetOptionsPage.xaml.cs @@ -51,15 +51,22 @@ private void PetOptionsPage_Loaded(object sender, RoutedEventArgs e) volumeSlider.Value = App.MyData.GetVolume(); foregroundWindowToggle.IsOn = App.MyData.GetWindowForeground(); + stealTaskbarToggle.IsOn = App.MyData.GetStealTaskbarFocus(); multiScreenToggle.IsOn = App.MyData.GetMultiscreen(); volumeSlider.Header = ((int)(volumeSlider.Value * 100)).ToString() + " %"; volumeSlider.ValueChanged += VolumeSlider_ValueChanged; foregroundWindowToggle.Toggled += ForegroundWindowToggle_Toggled; + stealTaskbarToggle.Toggled += StealTaskbarToggle_Toggled; multiScreenToggle.Toggled += MultiScreenToggle_Toggled; } + private void StealTaskbarToggle_Toggled(object sender, RoutedEventArgs e) + { + App.MyData.SetStealTaskbarFocus(stealTaskbarToggle.IsOn); + } + private void MultiScreenToggle_Toggled(object sender, RoutedEventArgs e) { App.MyData.SetMultiscreen(multiScreenToggle.IsOn); diff --git a/src/AppWins/PetSelectionPage.xaml b/src/AppWins/PetSelectionPage.xaml index 072f865..6b4f69f 100644 --- a/src/AppWins/PetSelectionPage.xaml +++ b/src/AppWins/PetSelectionPage.xaml @@ -22,16 +22,25 @@ - + - + - + - + diff --git a/src/DesktopPet.csproj b/src/DesktopPet.csproj index d2f0fc1..199c306 100644 --- a/src/DesktopPet.csproj +++ b/src/DesktopPet.csproj @@ -184,8 +184,9 @@ - - C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.17763.0\Windows.winmd + + False + C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.18362.0\Windows.winmd diff --git a/src/DesktopPet_Portable.csproj b/src/DesktopPet_Portable.csproj index db4e21c..50ab2e5 100644 --- a/src/DesktopPet_Portable.csproj +++ b/src/DesktopPet_Portable.csproj @@ -132,6 +132,7 @@ False C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETCore\v4.5\System.Runtime.WindowsRuntime.dll + diff --git a/src/LocalData/Class1.cs b/src/LocalData/Class1.cs index 29af10a..57015d6 100644 --- a/src/LocalData/Class1.cs +++ b/src/LocalData/Class1.cs @@ -19,6 +19,7 @@ public class Settings { public double Volume { get; set; } = 0.3; public bool WinForeGround { get; set; } = false; + public bool StealTaskbarFocus { get; set; } = false; public int AutostartPets { get; set; } = 1; public bool MultiScreenEnabled { get; set; } = true; public string CurrentPet { get; set; } = "esheep64"; @@ -126,6 +127,20 @@ public bool GetWindowForeground() return LocalSettings.WinForeGround; } + public void SetStealTaskbarFocus(bool steal) + { + if (LocalSettings.StealTaskbarFocus != steal) + { + LocalSettings.StealTaskbarFocus = steal; + SaveSettings(); + } + } + + public bool GetStealTaskbarFocus() + { + return LocalSettings.StealTaskbarFocus; + } + public void SetAutoStartPets(int startingPets) { if (LocalSettings.AutostartPets != startingPets) @@ -247,14 +262,21 @@ private void LoadImages() fs.Close(); } Images = ""; - var f = File.OpenRead(LocalFolder + "\\images.xml"); - int bytesRead; - do + try { - bytesRead = f.Read(buffer, 0, 1024 * 64); - Images += Encoding.UTF8.GetString(buffer, 0, bytesRead); - } while (bytesRead > 0); - f.Close(); + var f = File.OpenRead(LocalFolder + "\\images.xml"); + int bytesRead; + do + { + bytesRead = f.Read(buffer, 0, 1024 * 64); + Images += Encoding.UTF8.GetString(buffer, 0, bytesRead); + } while (bytesRead > 0); + f.Close(); + } + catch(Exception) + { + Images = ""; + } } public bool NeedToLoadNew(string petFolder, DateTimeOffset lastUpdate) diff --git a/src/Portable/FormOptions.cs b/src/Portable/FormOptions.cs index 0c623e9..3f9a140 100644 --- a/src/Portable/FormOptions.cs +++ b/src/Portable/FormOptions.cs @@ -92,7 +92,8 @@ private void FormOptions_Load(object sender, EventArgs e) checkBox1.Enabled = false; } checkBox2.Checked = Program.MyData.GetWindowForeground(); - trackBar2.Value = Program.MyData.GetAutoStartPets(); + checkBox4.Checked = Program.MyData.GetStealTaskbarFocus(); + trackBar2.Value = Program.MyData.GetAutoStartPets(); label5.Text = trackBar2.Value.ToString(); label2.Text = trackBar1.Value.ToString(); checkBox3.Checked = Program.MyData.GetMultiscreen(); @@ -124,7 +125,12 @@ private void checkBox2_Click(object sender, EventArgs e) Program.MyData.SetWindowForeground(checkBox2.Checked); } - private void trackBar2_Scroll(object sender, EventArgs e) + private void checkBox4_CheckedChanged(object sender, EventArgs e) + { + Program.MyData.SetStealTaskbarFocus(checkBox4.Checked); + } + + private void trackBar2_Scroll(object sender, EventArgs e) { Program.MyData.SetAutoStartPets(trackBar2.Value); label5.Text = trackBar2.Value.ToString(); @@ -134,5 +140,6 @@ private void checkBox3_CheckedChanged(object sender, EventArgs e) { Program.MyData.SetMultiscreen(checkBox3.Checked); } + } } diff --git a/src/Portable/FormOptions.designer.cs b/src/Portable/FormOptions.designer.cs index 94e3445..d5ad637 100644 --- a/src/Portable/FormOptions.designer.cs +++ b/src/Portable/FormOptions.designer.cs @@ -49,6 +49,8 @@ private void InitializeComponent() this.label4 = new System.Windows.Forms.Label(); this.trackBar2 = new System.Windows.Forms.TrackBar(); this.label5 = new System.Windows.Forms.Label(); + this.checkBox4 = new System.Windows.Forms.CheckBox(); + this.label6 = new System.Windows.Forms.Label(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); this.tabPage2.SuspendLayout(); @@ -128,16 +130,18 @@ private void InitializeComponent() this.tableLayoutPanel1.ColumnCount = 2; this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 40F)); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 60F)); - this.tableLayoutPanel1.Controls.Add(this.label7, 1, 4); - this.tableLayoutPanel1.Controls.Add(this.checkBox3, 0, 4); + this.tableLayoutPanel1.Controls.Add(this.label6, 1, 4); + this.tableLayoutPanel1.Controls.Add(this.checkBox4, 0, 4); + this.tableLayoutPanel1.Controls.Add(this.label7, 1, 5); + this.tableLayoutPanel1.Controls.Add(this.checkBox3, 0, 5); this.tableLayoutPanel1.Controls.Add(this.button1, 0, 0); this.tableLayoutPanel1.Controls.Add(this.label1, 1, 0); this.tableLayoutPanel1.Controls.Add(this.pictureBox1, 1, 1); this.tableLayoutPanel1.Controls.Add(this.checkBox2, 0, 2); this.tableLayoutPanel1.Controls.Add(this.label3, 1, 2); - this.tableLayoutPanel1.Controls.Add(this.checkBox1, 0, 5); - this.tableLayoutPanel1.Controls.Add(this.label2, 1, 5); - this.tableLayoutPanel1.Controls.Add(this.trackBar1, 1, 6); + this.tableLayoutPanel1.Controls.Add(this.checkBox1, 0, 6); + this.tableLayoutPanel1.Controls.Add(this.label2, 1, 6); + this.tableLayoutPanel1.Controls.Add(this.trackBar1, 1, 7); this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 3); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; @@ -146,11 +150,11 @@ private void InitializeComponent() this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 50F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 45F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 50F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 50F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 40F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel1.Size = new System.Drawing.Size(351, 327); this.tableLayoutPanel1.TabIndex = 1; @@ -159,7 +163,7 @@ private void InitializeComponent() // this.label7.AutoSize = true; this.label7.Dock = System.Windows.Forms.DockStyle.Fill; - this.label7.Location = new System.Drawing.Point(143, 140); + this.label7.Location = new System.Drawing.Point(143, 185); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(205, 50); this.label7.TabIndex = 9; @@ -170,7 +174,7 @@ private void InitializeComponent() // this.checkBox3.AutoSize = true; this.checkBox3.Dock = System.Windows.Forms.DockStyle.Fill; - this.checkBox3.Location = new System.Drawing.Point(3, 143); + this.checkBox3.Location = new System.Drawing.Point(3, 188); this.checkBox3.Name = "checkBox3"; this.checkBox3.Size = new System.Drawing.Size(134, 44); this.checkBox3.TabIndex = 8; @@ -230,10 +234,10 @@ private void InitializeComponent() // this.checkBox1.AutoSize = true; this.checkBox1.Dock = System.Windows.Forms.DockStyle.Fill; - this.checkBox1.Location = new System.Drawing.Point(3, 193); + this.checkBox1.Location = new System.Drawing.Point(3, 238); this.checkBox1.Name = "checkBox1"; this.tableLayoutPanel1.SetRowSpan(this.checkBox1, 2); - this.checkBox1.Size = new System.Drawing.Size(134, 64); + this.checkBox1.Size = new System.Drawing.Size(134, 54); this.checkBox1.TabIndex = 5; this.checkBox1.Text = "Allow sounds"; this.checkBox1.UseVisualStyleBackColor = true; @@ -243,7 +247,7 @@ private void InitializeComponent() // this.label2.AutoSize = true; this.label2.Dock = System.Windows.Forms.DockStyle.Bottom; - this.label2.Location = new System.Drawing.Point(143, 197); + this.label2.Location = new System.Drawing.Point(143, 242); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(205, 13); this.label2.TabIndex = 6; @@ -254,9 +258,9 @@ private void InitializeComponent() // this.trackBar1.Dock = System.Windows.Forms.DockStyle.Fill; this.trackBar1.Enabled = false; - this.trackBar1.Location = new System.Drawing.Point(143, 213); + this.trackBar1.Location = new System.Drawing.Point(143, 258); this.trackBar1.Name = "trackBar1"; - this.trackBar1.Size = new System.Drawing.Size(205, 44); + this.trackBar1.Size = new System.Drawing.Size(205, 34); this.trackBar1.TabIndex = 7; this.trackBar1.TickFrequency = 2; this.trackBar1.TickStyle = System.Windows.Forms.TickStyle.TopLeft; @@ -329,6 +333,30 @@ private void InitializeComponent() this.label5.TabIndex = 1; this.label5.Text = "ERR"; // + // checkBox4 + // + this.checkBox4.AutoSize = true; + this.checkBox4.Dock = System.Windows.Forms.DockStyle.Fill; + this.checkBox4.Location = new System.Drawing.Point(3, 143); + this.checkBox4.Name = "checkBox4"; + this.checkBox4.Size = new System.Drawing.Size(134, 39); + this.checkBox4.TabIndex = 10; + this.checkBox4.Text = "Steal Focus"; + this.checkBox4.UseVisualStyleBackColor = true; + this.checkBox4.CheckedChanged += new System.EventHandler(this.checkBox4_CheckedChanged); + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Dock = System.Windows.Forms.DockStyle.Fill; + this.label6.Location = new System.Drawing.Point(143, 140); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(205, 45); + this.label6.TabIndex = 11; + this.label6.Text = "Prevent that the Taskbar can overlap the pet (click on the tray icon will be more" + + " difficult)"; + this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // // FormOptions // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -380,5 +408,7 @@ private void InitializeComponent() private System.Windows.Forms.TrackBar trackBar1; private System.Windows.Forms.Label label7; private System.Windows.Forms.CheckBox checkBox3; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.CheckBox checkBox4; } } diff --git a/src/Portable/LocalData.cs b/src/Portable/LocalData.cs index c2cc3e9..8e6ebf9 100644 --- a/src/Portable/LocalData.cs +++ b/src/Portable/LocalData.cs @@ -102,6 +102,22 @@ public void SetWindowForeground(bool foreground) } } + public void SetStealTaskbarFocus(bool steal) + { + if (steal.ToString() != AppSettings["StealTaskbarFocus"].Value) + { + Properties.Settings.Default.WinForeground = steal; + AppSettings["StealTaskbarFocus"].Value = steal.ToString(); + Save(); + } + } + + public bool GetStealTaskbarFocus() + { + bool.TryParse(AppSettings["StealTaskbarFocus"].Value, out bool ret); + return ret; + } + public int GetAutoStartPets() { int.TryParse(AppSettings["AutostartPets"].Value, out int ret); diff --git a/src/Properties/AssemblyInfo.cs b/src/Properties/AssemblyInfo.cs index d32a625..dbaf8cc 100644 --- a/src/Properties/AssemblyInfo.cs +++ b/src/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Adriano")] [assembly: AssemblyProduct("eSheep")] -[assembly: AssemblyCopyright("Copyright © 2015-2019")] +[assembly: AssemblyCopyright("Copyright © 2015-2021")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -32,7 +32,7 @@ // 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("2.2.5.0")] -[assembly: AssemblyFileVersion("2.2.5.0")] +[assembly: AssemblyVersion("2.2.6.0")] +[assembly: AssemblyFileVersion("2.2.6.0")] [assembly: NeutralResourcesLanguage("en-GB")] diff --git a/src/Properties/AssemblyInfoPortable.cs b/src/Properties/AssemblyInfoPortable.cs index 45f3200..82426d2 100644 --- a/src/Properties/AssemblyInfoPortable.cs +++ b/src/Properties/AssemblyInfoPortable.cs @@ -31,5 +31,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("1.2.5.0")] -[assembly: AssemblyFileVersion("1.2.5.0")] +[assembly: AssemblyVersion("1.2.6.0")] +[assembly: AssemblyFileVersion("1.2.6.0")] diff --git a/src/Properties/Settings.settings b/src/Properties/Settings.settings index c21a31a..bd3b17d 100644 --- a/src/Properties/Settings.settings +++ b/src/Properties/Settings.settings @@ -23,5 +23,8 @@ False + + False + \ No newline at end of file diff --git a/src/Properties/Settings1.Designer.cs b/src/Properties/Settings1.Designer.cs index 7a75a0d..d68f8ca 100644 --- a/src/Properties/Settings1.Designer.cs +++ b/src/Properties/Settings1.Designer.cs @@ -12,7 +12,7 @@ namespace DesktopPet.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); @@ -106,5 +106,17 @@ public bool Multiscreen { this["Multiscreen"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("False")] + public bool StealTaskbarFocus { + get { + return ((bool)(this["StealTaskbarFocus"])); + } + set { + this["StealTaskbarFocus"] = value; + } + } } } diff --git a/src/Properties/app.manifest b/src/Properties/app.manifest index f09ce9c..6023a2d 100644 --- a/src/Properties/app.manifest +++ b/src/Properties/app.manifest @@ -4,18 +4,6 @@ - @@ -41,6 +29,7 @@ true + PerMonitorV2 --> diff --git a/src/Tools/XmlToDot.cs b/src/Tools/XmlToDot.cs index 6f04eab..ee58732 100644 --- a/src/Tools/XmlToDot.cs +++ b/src/Tools/XmlToDot.cs @@ -38,7 +38,7 @@ static private string ProcessAnimations(XmlData.AnimationNode[] animations) string returnString = ""; returnString += $"# Convert {animationTitle} to Graphviz dot format by DesktopPet Xml2Gv {DateTime.Now}\r\n"; - returnString += $"# Copy the text and insert it into http://dreampuf.github.io/GraphvizOnline/ or http://webgraphviz.com/ to generate an image\r\n"; + returnString += $"# Copy the text and insert it into https://dreampuf.github.io/GraphvizOnline/ or http://webgraphviz.com/ to generate an image\r\n"; returnString += $"# This functionality was added after this isse: https://github.com/Adrianotiger/desktopPet/issues/6 \r\n"; returnString += $"digraph PetGraph {{\r\n"; returnString += $" rankdir = LR;\r\n"; diff --git a/src/UWPSheep/Package.appxmanifest b/src/UWPSheep/Package.appxmanifest index 2bff43e..598eb6d 100644 --- a/src/UWPSheep/Package.appxmanifest +++ b/src/UWPSheep/Package.appxmanifest @@ -7,7 +7,7 @@ xmlns:uap5="http://schemas.microsoft.com/appx/manifest/uap/windows10/5" xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" IgnorableNamespaces="uap mp rescap"> - + esheep Adriano diff --git a/src/UWPSheep/UWPSheep.wapproj b/src/UWPSheep/UWPSheep.wapproj index bcde0af..d13ff74 100644 --- a/src/UWPSheep/UWPSheep.wapproj +++ b/src/UWPSheep/UWPSheep.wapproj @@ -36,10 +36,9 @@ en-GB UWPSheep_StoreKey.pfx ..\DesktopPet.csproj - 5F42B0C0AA58D9BF5C19EF0C2C270BE782F2AD18 False False - x86 + x64 0 OnApplicationRun D:\GitHub\desktopPet\src\UWPSheep\..\..\build\AppPackages\ diff --git a/src/app.config b/src/app.config index f70ba95..4252808 100644 --- a/src/app.config +++ b/src/app.config @@ -1,6 +1,13 @@  - + + +
+ + + + + @@ -29,4 +36,51 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.3 + + + False + + + 1 + + + False + + + False + + + + \ No newline at end of file diff --git a/src/dotNet/FormDebug.Designer.cs b/src/dotNet/FormDebug.Designer.cs index cc295e1..944a643 100644 --- a/src/dotNet/FormDebug.Designer.cs +++ b/src/dotNet/FormDebug.Designer.cs @@ -28,246 +28,247 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormDebug)); - this.listView1 = new System.Windows.Forms.ListView(); - this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.splitContainer1 = new System.Windows.Forms.SplitContainer(); - this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); - this.checkBox1 = new System.Windows.Forms.CheckBox(); - this.checkBox2 = new System.Windows.Forms.CheckBox(); - this.checkBox3 = new System.Windows.Forms.CheckBox(); - this.menuStrip1 = new System.Windows.Forms.MenuStrip(); - this.viewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.clearWindowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.removeInfosToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.convertXMLToDOTToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.openXMLToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.convertoToDOTToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.checkBox4 = new System.Windows.Forms.CheckBox(); - this.label1 = new System.Windows.Forms.Label(); - ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); - this.splitContainer1.Panel1.SuspendLayout(); - this.splitContainer1.Panel2.SuspendLayout(); - this.splitContainer1.SuspendLayout(); - this.flowLayoutPanel1.SuspendLayout(); - this.menuStrip1.SuspendLayout(); - this.SuspendLayout(); - // - // listView1 - // - this.listView1.BackColor = System.Drawing.Color.Black; - this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormDebug)); + this.listView1 = new System.Windows.Forms.ListView(); + this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + this.checkBox1 = new System.Windows.Forms.CheckBox(); + this.checkBox2 = new System.Windows.Forms.CheckBox(); + this.checkBox3 = new System.Windows.Forms.CheckBox(); + this.label1 = new System.Windows.Forms.Label(); + this.checkBox4 = new System.Windows.Forms.CheckBox(); + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.viewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.clearWindowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.removeInfosToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.convertXMLToDOTToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.openXMLToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.convertoToDOTToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + this.flowLayoutPanel1.SuspendLayout(); + this.menuStrip1.SuspendLayout(); + this.SuspendLayout(); + // + // listView1 + // + this.listView1.BackColor = System.Drawing.Color.Black; + this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.columnHeader1, this.columnHeader3}); - this.listView1.Dock = System.Windows.Forms.DockStyle.Fill; - this.listView1.ForeColor = System.Drawing.Color.Yellow; - this.listView1.FullRowSelect = true; - this.listView1.Location = new System.Drawing.Point(0, 0); - this.listView1.Name = "listView1"; - this.listView1.Size = new System.Drawing.Size(400, 211); - this.listView1.TabIndex = 0; - this.listView1.UseCompatibleStateImageBehavior = false; - this.listView1.View = System.Windows.Forms.View.Details; - // - // columnHeader1 - // - this.columnHeader1.Text = "time"; - // - // columnHeader3 - // - this.columnHeader3.Text = "Description"; - this.columnHeader3.Width = 315; - // - // splitContainer1 - // - this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; - this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; - this.splitContainer1.IsSplitterFixed = true; - this.splitContainer1.Location = new System.Drawing.Point(0, 24); - this.splitContainer1.Name = "splitContainer1"; - this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; - // - // splitContainer1.Panel1 - // - this.splitContainer1.Panel1.BackColor = System.Drawing.Color.Black; - this.splitContainer1.Panel1.Controls.Add(this.flowLayoutPanel1); - this.splitContainer1.Panel1MinSize = 20; - // - // splitContainer1.Panel2 - // - this.splitContainer1.Panel2.Controls.Add(this.listView1); - this.splitContainer1.Size = new System.Drawing.Size(400, 237); - this.splitContainer1.SplitterDistance = 25; - this.splitContainer1.SplitterWidth = 1; - this.splitContainer1.TabIndex = 1; - // - // flowLayoutPanel1 - // - this.flowLayoutPanel1.Controls.Add(this.checkBox1); - this.flowLayoutPanel1.Controls.Add(this.checkBox2); - this.flowLayoutPanel1.Controls.Add(this.checkBox3); - this.flowLayoutPanel1.Controls.Add(this.label1); - this.flowLayoutPanel1.Controls.Add(this.checkBox4); - this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0); - this.flowLayoutPanel1.Name = "flowLayoutPanel1"; - this.flowLayoutPanel1.Size = new System.Drawing.Size(400, 25); - this.flowLayoutPanel1.TabIndex = 3; - // - // checkBox1 - // - this.checkBox1.AutoSize = true; - this.checkBox1.Checked = true; - this.checkBox1.CheckState = System.Windows.Forms.CheckState.Checked; - this.checkBox1.ForeColor = System.Drawing.Color.White; - this.checkBox1.Location = new System.Drawing.Point(3, 3); - this.checkBox1.Name = "checkBox1"; - this.checkBox1.Size = new System.Drawing.Size(44, 17); - this.checkBox1.TabIndex = 0; - this.checkBox1.Text = "Info"; - this.checkBox1.UseVisualStyleBackColor = true; - // - // checkBox2 - // - this.checkBox2.AutoSize = true; - this.checkBox2.Checked = true; - this.checkBox2.CheckState = System.Windows.Forms.CheckState.Checked; - this.checkBox2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128))))); - this.checkBox2.Location = new System.Drawing.Point(53, 3); - this.checkBox2.Name = "checkBox2"; - this.checkBox2.Size = new System.Drawing.Size(71, 17); - this.checkBox2.TabIndex = 1; - this.checkBox2.Text = "Warnings"; - this.checkBox2.UseVisualStyleBackColor = true; - // - // checkBox3 - // - this.checkBox3.AutoSize = true; - this.checkBox3.Checked = true; - this.checkBox3.CheckState = System.Windows.Forms.CheckState.Checked; - this.checkBox3.ForeColor = System.Drawing.Color.Salmon; - this.checkBox3.Location = new System.Drawing.Point(130, 3); - this.checkBox3.Name = "checkBox3"; - this.checkBox3.Size = new System.Drawing.Size(53, 17); - this.checkBox3.TabIndex = 2; - this.checkBox3.Text = "Errors"; - this.checkBox3.UseVisualStyleBackColor = true; - // - // menuStrip1 - // - this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.listView1.Dock = System.Windows.Forms.DockStyle.Fill; + this.listView1.ForeColor = System.Drawing.Color.Yellow; + this.listView1.FullRowSelect = true; + this.listView1.HideSelection = false; + this.listView1.Location = new System.Drawing.Point(0, 0); + this.listView1.Name = "listView1"; + this.listView1.Size = new System.Drawing.Size(400, 211); + this.listView1.TabIndex = 0; + this.listView1.UseCompatibleStateImageBehavior = false; + this.listView1.View = System.Windows.Forms.View.Details; + // + // columnHeader1 + // + this.columnHeader1.Text = "time"; + // + // columnHeader3 + // + this.columnHeader3.Text = "Description"; + this.columnHeader3.Width = 315; + // + // splitContainer1 + // + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer1.IsSplitterFixed = true; + this.splitContainer1.Location = new System.Drawing.Point(0, 24); + this.splitContainer1.Name = "splitContainer1"; + this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.BackColor = System.Drawing.Color.Black; + this.splitContainer1.Panel1.Controls.Add(this.flowLayoutPanel1); + this.splitContainer1.Panel1MinSize = 20; + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.listView1); + this.splitContainer1.Size = new System.Drawing.Size(400, 237); + this.splitContainer1.SplitterDistance = 25; + this.splitContainer1.SplitterWidth = 1; + this.splitContainer1.TabIndex = 1; + // + // flowLayoutPanel1 + // + this.flowLayoutPanel1.Controls.Add(this.checkBox1); + this.flowLayoutPanel1.Controls.Add(this.checkBox2); + this.flowLayoutPanel1.Controls.Add(this.checkBox3); + this.flowLayoutPanel1.Controls.Add(this.label1); + this.flowLayoutPanel1.Controls.Add(this.checkBox4); + this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0); + this.flowLayoutPanel1.Name = "flowLayoutPanel1"; + this.flowLayoutPanel1.Size = new System.Drawing.Size(400, 25); + this.flowLayoutPanel1.TabIndex = 3; + // + // checkBox1 + // + this.checkBox1.AutoSize = true; + this.checkBox1.Checked = true; + this.checkBox1.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkBox1.ForeColor = System.Drawing.Color.White; + this.checkBox1.Location = new System.Drawing.Point(3, 3); + this.checkBox1.Name = "checkBox1"; + this.checkBox1.Size = new System.Drawing.Size(44, 17); + this.checkBox1.TabIndex = 0; + this.checkBox1.Text = "Info"; + this.checkBox1.UseVisualStyleBackColor = true; + // + // checkBox2 + // + this.checkBox2.AutoSize = true; + this.checkBox2.Checked = true; + this.checkBox2.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkBox2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128))))); + this.checkBox2.Location = new System.Drawing.Point(53, 3); + this.checkBox2.Name = "checkBox2"; + this.checkBox2.Size = new System.Drawing.Size(71, 17); + this.checkBox2.TabIndex = 1; + this.checkBox2.Text = "Warnings"; + this.checkBox2.UseVisualStyleBackColor = true; + // + // checkBox3 + // + this.checkBox3.AutoSize = true; + this.checkBox3.Checked = true; + this.checkBox3.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkBox3.ForeColor = System.Drawing.Color.Salmon; + this.checkBox3.Location = new System.Drawing.Point(130, 3); + this.checkBox3.Name = "checkBox3"; + this.checkBox3.Size = new System.Drawing.Size(53, 17); + this.checkBox3.TabIndex = 2; + this.checkBox3.Text = "Errors"; + this.checkBox3.UseVisualStyleBackColor = true; + // + // label1 + // + this.label1.Dock = System.Windows.Forms.DockStyle.Fill; + this.label1.Location = new System.Drawing.Point(189, 0); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(100, 23); + this.label1.TabIndex = 4; + this.label1.Text = "label1"; + // + // checkBox4 + // + this.checkBox4.AutoSize = true; + this.checkBox4.Checked = true; + this.checkBox4.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkBox4.ForeColor = System.Drawing.Color.White; + this.checkBox4.Location = new System.Drawing.Point(295, 3); + this.checkBox4.Name = "checkBox4"; + this.checkBox4.Size = new System.Drawing.Size(72, 17); + this.checkBox4.TabIndex = 3; + this.checkBox4.Text = "Autoscroll"; + this.checkBox4.UseVisualStyleBackColor = true; + // + // menuStrip1 + // + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.viewToolStripMenuItem, this.toolsToolStripMenuItem}); - this.menuStrip1.Location = new System.Drawing.Point(0, 0); - this.menuStrip1.Name = "menuStrip1"; - this.menuStrip1.Size = new System.Drawing.Size(400, 24); - this.menuStrip1.TabIndex = 2; - this.menuStrip1.Text = "menuStrip1"; - // - // viewToolStripMenuItem - // - this.viewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Size = new System.Drawing.Size(400, 24); + this.menuStrip1.TabIndex = 2; + this.menuStrip1.Text = "menuStrip1"; + // + // viewToolStripMenuItem + // + this.viewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.clearWindowToolStripMenuItem, this.removeInfosToolStripMenuItem}); - this.viewToolStripMenuItem.Name = "viewToolStripMenuItem"; - this.viewToolStripMenuItem.Size = new System.Drawing.Size(44, 20); - this.viewToolStripMenuItem.Text = "&View"; - // - // clearWindowToolStripMenuItem - // - this.clearWindowToolStripMenuItem.Name = "clearWindowToolStripMenuItem"; - this.clearWindowToolStripMenuItem.Size = new System.Drawing.Size(146, 22); - this.clearWindowToolStripMenuItem.Text = "&Clear window"; - this.clearWindowToolStripMenuItem.Click += new System.EventHandler(this.clearWindowToolStripMenuItem_Click); - // - // removeInfosToolStripMenuItem - // - this.removeInfosToolStripMenuItem.Name = "removeInfosToolStripMenuItem"; - this.removeInfosToolStripMenuItem.Size = new System.Drawing.Size(146, 22); - this.removeInfosToolStripMenuItem.Text = "&Remove infos"; - this.removeInfosToolStripMenuItem.Click += new System.EventHandler(this.removeInfosToolStripMenuItem_Click); - // - // toolsToolStripMenuItem - // - this.toolsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.viewToolStripMenuItem.Name = "viewToolStripMenuItem"; + this.viewToolStripMenuItem.Size = new System.Drawing.Size(44, 20); + this.viewToolStripMenuItem.Text = "&View"; + // + // clearWindowToolStripMenuItem + // + this.clearWindowToolStripMenuItem.Name = "clearWindowToolStripMenuItem"; + this.clearWindowToolStripMenuItem.Size = new System.Drawing.Size(146, 22); + this.clearWindowToolStripMenuItem.Text = "&Clear window"; + this.clearWindowToolStripMenuItem.Click += new System.EventHandler(this.clearWindowToolStripMenuItem_Click); + // + // removeInfosToolStripMenuItem + // + this.removeInfosToolStripMenuItem.Name = "removeInfosToolStripMenuItem"; + this.removeInfosToolStripMenuItem.Size = new System.Drawing.Size(146, 22); + this.removeInfosToolStripMenuItem.Text = "&Remove infos"; + this.removeInfosToolStripMenuItem.Click += new System.EventHandler(this.removeInfosToolStripMenuItem_Click); + // + // toolsToolStripMenuItem + // + this.toolsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.convertXMLToDOTToolStripMenuItem}); - this.toolsToolStripMenuItem.Name = "toolsToolStripMenuItem"; - this.toolsToolStripMenuItem.Size = new System.Drawing.Size(47, 20); - this.toolsToolStripMenuItem.Text = "&Tools"; - // - // convertXMLToDOTToolStripMenuItem - // - this.convertXMLToDOTToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolsToolStripMenuItem.Name = "toolsToolStripMenuItem"; + this.toolsToolStripMenuItem.Size = new System.Drawing.Size(46, 20); + this.toolsToolStripMenuItem.Text = "&Tools"; + // + // convertXMLToDOTToolStripMenuItem + // + this.convertXMLToDOTToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.openXMLToolStripMenuItem, this.convertoToDOTToolStripMenuItem}); - this.convertXMLToDOTToolStripMenuItem.Name = "convertXMLToDOTToolStripMenuItem"; - this.convertXMLToDOTToolStripMenuItem.Size = new System.Drawing.Size(157, 22); - this.convertXMLToDOTToolStripMenuItem.Text = "XML &Animation"; - // - // openXMLToolStripMenuItem - // - this.openXMLToolStripMenuItem.Name = "openXMLToolStripMenuItem"; - this.openXMLToolStripMenuItem.Size = new System.Drawing.Size(163, 22); - this.openXMLToolStripMenuItem.Text = "&Open XML"; - this.openXMLToolStripMenuItem.Click += new System.EventHandler(this.openXMLToolStripMenuItem_Click); - // - // convertoToDOTToolStripMenuItem - // - this.convertoToDOTToolStripMenuItem.Name = "convertoToDOTToolStripMenuItem"; - this.convertoToDOTToolStripMenuItem.Size = new System.Drawing.Size(163, 22); - this.convertoToDOTToolStripMenuItem.Text = "&Converto to DOT"; - this.convertoToDOTToolStripMenuItem.Click += new System.EventHandler(this.convertoToDOTToolStripMenuItem_Click); - // - // checkBox4 - // - this.checkBox4.AutoSize = true; - this.checkBox4.Checked = true; - this.checkBox4.CheckState = System.Windows.Forms.CheckState.Checked; - this.checkBox4.ForeColor = System.Drawing.Color.White; - this.checkBox4.Location = new System.Drawing.Point(295, 3); - this.checkBox4.Name = "checkBox4"; - this.checkBox4.Size = new System.Drawing.Size(72, 17); - this.checkBox4.TabIndex = 3; - this.checkBox4.Text = "Autoscroll"; - this.checkBox4.UseVisualStyleBackColor = true; - // - // label1 - // - this.label1.Dock = System.Windows.Forms.DockStyle.Fill; - this.label1.Location = new System.Drawing.Point(189, 0); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(100, 23); - this.label1.TabIndex = 4; - this.label1.Text = "label1"; - // - // FormDebug - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.AutoScroll = true; - this.ClientSize = new System.Drawing.Size(400, 261); - this.Controls.Add(this.splitContainer1); - this.Controls.Add(this.menuStrip1); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow; - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "FormDebug"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "Debug Window"; - this.TopMost = true; - this.splitContainer1.Panel1.ResumeLayout(false); - this.splitContainer1.Panel2.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); - this.splitContainer1.ResumeLayout(false); - this.flowLayoutPanel1.ResumeLayout(false); - this.flowLayoutPanel1.PerformLayout(); - this.menuStrip1.ResumeLayout(false); - this.menuStrip1.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); + this.convertXMLToDOTToolStripMenuItem.Name = "convertXMLToDOTToolStripMenuItem"; + this.convertXMLToDOTToolStripMenuItem.Size = new System.Drawing.Size(157, 22); + this.convertXMLToDOTToolStripMenuItem.Text = "XML &Animation"; + // + // openXMLToolStripMenuItem + // + this.openXMLToolStripMenuItem.Name = "openXMLToolStripMenuItem"; + this.openXMLToolStripMenuItem.Size = new System.Drawing.Size(162, 22); + this.openXMLToolStripMenuItem.Text = "&Open XML"; + this.openXMLToolStripMenuItem.Click += new System.EventHandler(this.openXMLToolStripMenuItem_Click); + // + // convertoToDOTToolStripMenuItem + // + this.convertoToDOTToolStripMenuItem.Name = "convertoToDOTToolStripMenuItem"; + this.convertoToDOTToolStripMenuItem.Size = new System.Drawing.Size(162, 22); + this.convertoToDOTToolStripMenuItem.Text = "&Converto to DOT"; + this.convertoToDOTToolStripMenuItem.Click += new System.EventHandler(this.convertoToDOTToolStripMenuItem_Click); + // + // FormDebug + // + this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; + this.AutoScroll = true; + this.ClientSize = new System.Drawing.Size(400, 261); + this.Controls.Add(this.splitContainer1); + this.Controls.Add(this.menuStrip1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow; + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "FormDebug"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Debug Window"; + this.TopMost = true; + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); + this.flowLayoutPanel1.ResumeLayout(false); + this.flowLayoutPanel1.PerformLayout(); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); } diff --git a/src/dotNet/FormPet.Designer.cs b/src/dotNet/FormPet.Designer.cs index 3666592..06ccb49 100644 --- a/src/dotNet/FormPet.Designer.cs +++ b/src/dotNet/FormPet.Designer.cs @@ -64,8 +64,8 @@ private void InitializeComponent() // FormPet // this.AllowDrop = true; - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.BackColor = System.Drawing.Color.Magenta; this.ClientSize = new System.Drawing.Size(40, 40); this.ControlBox = false; diff --git a/src/dotNet/FormPet.cs b/src/dotNet/FormPet.cs index 52adc38..f05cb2e 100644 --- a/src/dotNet/FormPet.cs +++ b/src/dotNet/FormPet.cs @@ -263,6 +263,7 @@ public void Play(bool first) Visible = true; // Now we can show the form Opacity = 0.0; // do not show first frame (as it is undefined) timer1.Enabled = true; // Enable the timer (interval is well known now) + TopMost = true; // new in 1.2.6 } /// @@ -393,10 +394,16 @@ private void SetNewAnimation(int id) } else { - TopMost = true; // bring to top again on each new animation AnimationStep = -1; CurrentAnimation = Animations.GetAnimation(id); CurrentAnimation.UpdateValues(DisplayIndex); + + // v.1.2.6: this will steal taskbar focus and the tray menu will disappear. So this should not be used too often. + if (Program.MyData.GetStealTaskbarFocus() && CurrentAnimation.Start.OffsetY != 0 && CurrentAnimation.Start.X.Value != 0) + { + TopMost = true; // bring to top again on each new animation + } + // Check if animation ID has a child. If so, the child will be created. if (Animations.HasAnimationChild(id)) { @@ -717,9 +724,9 @@ private void NextStep() { if (AnimationStep > 0 && CheckTopWindow(true)) { - if (FollowWindow()) + if (CurrentAnimation.Start.X.Value != 0 && FollowWindow()) { - int iTimeout = 50; + int iTimeout = 20; do { if (!FollowWindow()) iTimeout--; @@ -952,6 +959,12 @@ private bool FollowWindow() // Get window size and position of the current pet NativeMethods.GetWindowRect(new HandleRef(this, hwndWindow), out rctO); + // window disappeared! Maybe it was closed. + if(rctO.Top == 0 && rctO.Bottom == 0) + { + return false; + } + if (currentWindowSize.Top != rctO.Top || currentWindowSize.Left != rctO.Left || currentWindowSize.Right != rctO.Right) { // same width as before diff --git a/src/dotNet/Program.cs b/src/dotNet/Program.cs index a2518a6..1b70d5b 100644 --- a/src/dotNet/Program.cs +++ b/src/dotNet/Program.cs @@ -78,13 +78,15 @@ public static void OpenOptionDialog() static void Main(string[] args) { int iMutexIndex = 0; - string resource1 = "DesktopPet.Portable.NAudio.dll"; + + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + EmbeddedAssembly.Load(resource1, "NAudio.dll"); AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve); - Application.EnableVisualStyles(); // if you like to wait a few seconds in case that the instance is just // shutting down try @@ -144,8 +146,6 @@ static void Main(string[] args) } } - Application.SetCompatibleTextRenderingDefault(false); - // Show the system tray icon. using (ProcessIcon pi = new ProcessIcon()) { @@ -176,12 +176,11 @@ static void Main(string[] args) //string resource1 = "DesktopPet.dll.NAudio.dll"; //EmbeddedAssembly.Load(resource1, "NAudio.dll"); - AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve); - Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); + AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve); + MyData = new LocalData.LocalData(Windows.Storage.ApplicationData.Current.LocalFolder.Path, Application.ExecutablePath); // Show the system tray icon.