Skip to content

Commit 1cefa1c

Browse files
committed
1.0.1 update (minor changes)
1 parent 5ea061f commit 1cefa1c

File tree

5 files changed

+21
-10
lines changed

5 files changed

+21
-10
lines changed

Diff for: TopBar/Properties/AssemblyInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@
5151
// Можно задать все значения или принять номера сборки и редакции по умолчанию
5252
// используя "*", как показано ниже:
5353
// [assembly: AssemblyVersion("1.0.*")]
54-
[assembly: AssemblyVersion("1.0.0")]
55-
[assembly: AssemblyFileVersion("1.0.0")]
54+
[assembly: AssemblyVersion("1.0.1")]
55+
[assembly: AssemblyFileVersion("1.0.1")]

Diff for: TopBar/TopBar.csproj

+9
Original file line numberDiff line numberDiff line change
@@ -219,4 +219,13 @@
219219
<Resource Include="TopBar.ico" />
220220
</ItemGroup>
221221
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
222+
<Import Project="..\packages\System.Runtime.WindowsRuntime.4.6.0\build\net451\System.Runtime.WindowsRuntime.targets" Condition="Exists('..\packages\System.Runtime.WindowsRuntime.4.6.0\build\net451\System.Runtime.WindowsRuntime.targets')" />
223+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
224+
<PropertyGroup>
225+
<ErrorText>Данный проект ссылается на пакеты NuGet, отсутствующие на этом компьютере. Используйте восстановление пакетов NuGet, чтобы скачать их. Дополнительную информацию см. по адресу: http://go.microsoft.com/fwlink/?LinkID=322105. Отсутствует следующий файл: {0}.</ErrorText>
226+
</PropertyGroup>
227+
<Error Condition="!Exists('..\packages\System.Runtime.WindowsRuntime.4.6.0\build\net451\System.Runtime.WindowsRuntime.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Runtime.WindowsRuntime.4.6.0\build\net451\System.Runtime.WindowsRuntime.targets'))" />
228+
<Error Condition="!Exists('..\packages\System.Runtime.WindowsRuntime.UI.Xaml.4.6.0\build\net45\System.Runtime.WindowsRuntime.UI.Xaml.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Runtime.WindowsRuntime.UI.Xaml.4.6.0\build\net45\System.Runtime.WindowsRuntime.UI.Xaml.targets'))" />
229+
</Target>
230+
<Import Project="..\packages\System.Runtime.WindowsRuntime.UI.Xaml.4.6.0\build\net45\System.Runtime.WindowsRuntime.UI.Xaml.targets" Condition="Exists('..\packages\System.Runtime.WindowsRuntime.UI.Xaml.4.6.0\build\net45\System.Runtime.WindowsRuntime.UI.Xaml.targets')" />
222231
</Project>

Diff for: TopBar/TopBarWindow.xaml.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -142,15 +142,15 @@ private void Build()
142142
}
143143
catch (Exception err)
144144
{
145-
System.Windows.MessageBox.Show(err.Message, "Failed to setup widgets!");
145+
System.Windows.MessageBox.Show(err.Message, "Failed to load config!");
146146
throw err;
147147
}
148148
// Load extentions
149149
foreach (string dll in Directory.GetFiles(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "TopBar", "extensions"), "*.dll"))
150150
this.Extentions.Add(Assembly.LoadFile(dll));
151151
// Alert if blur disabled
152-
if (this.Config != null && (bool)this.Config.settings["use-blur"] && !(bool)cfg.settings["use-blur"])
153-
System.Windows.MessageBox.Show("You must restart TopBar to disable blur!", "Restart to disable blur");
152+
// if (this.Config != null && (bool)this.Config.settings["use-blur"] && !(bool)cfg.settings["use-blur"])
153+
// System.Windows.MessageBox.Show("You must restart TopBar to disable blur!", "Restart to disable blur");
154154
// Save config
155155
this.Config = cfg;
156156
// Enable blur
@@ -175,7 +175,7 @@ private void Build()
175175
}
176176
catch (Exception err)
177177
{
178-
System.Windows.MessageBox.Show(err.ToString(), "Failed to load config!");
178+
System.Windows.MessageBox.Show(err.ToString(), "Failed to setup widgets!");
179179
throw new Exception("");
180180
}
181181
}

Diff for: TopBar/Widgets/CPULoad.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,16 @@ public CPULoad(dynamic settings)
7878
actual.Add(s, Calculate(cs[s], pc.NextSample()));
7979
cs[s] = pc.NextSample();
8080
}
81-
for (int i = 0; i < cores.Count; i++)
81+
Application.Current.Dispatcher.Invoke(DispatcherPriority.Background, new Action(delegate
8282
{
83-
Application.Current.Dispatcher.Invoke(DispatcherPriority.Background, new Action(delegate
83+
for (int i = 0; i < cores.Count; i++)
8484
{
8585
try {
8686
if (this.MainColor.Equals("from-percentage")) cores[i].Fill = new SolidColorBrush(this.PercentColor(100 - actual["0," + i]));
8787
cores[i].Height = actual["0," + i] / 100 * 12;
8888
} catch { }
89-
}));
90-
}
89+
}
90+
}));
9191
};
9292
this.timer.Start();
9393
}

Diff for: TopBar/packages.config

+2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
<package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net46" />
3636
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net46" />
3737
<package id="System.Runtime.Numerics" version="4.3.0" targetFramework="net46" />
38+
<package id="System.Runtime.WindowsRuntime" version="4.6.0" targetFramework="net46" />
39+
<package id="System.Runtime.WindowsRuntime.UI.Xaml" version="4.6.0" targetFramework="net46" />
3840
<package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="net46" />
3941
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net46" />
4042
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net46" />

0 commit comments

Comments
 (0)