Skip to content

Commit 6189fe6

Browse files
author
chao
committed
更新版本到 5.1
1 parent a1d1b83 commit 6189fe6

File tree

11 files changed

+72
-39
lines changed

11 files changed

+72
-39
lines changed

Jvedio-WPF/Jvedio/App.xaml.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using Jvedio.Core.Logs;
2+
using SuperControls.Style;
23
using SuperControls.Style.Windows;
34
using System;
45
using System.Text;
@@ -23,7 +24,7 @@ protected override void OnStartup(StartupEventArgs e)
2324
ProgramStarted = new EventWaitHandle(false, EventResetMode.AutoReset, "Jvedio", out createNew);
2425
if (!createNew)
2526
{
26-
MessageBox.Show("Jvedio 运行中!");
27+
new MsgBox(null, $"Jvedio {LangManager.GetValueByKey("Running")}").ShowDialog();
2728
App.Current.Shutdown();
2829
Environment.Exit(0);
2930
}

Jvedio-WPF/Jvedio/Core/Config/ConfigManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace Jvedio
1313
{
1414
public static class ConfigManager
1515
{
16-
public const string ReleaseDate = "2022-01-04";
16+
public const string ReleaseDate = "2022-01-08";
1717
public static StartUp StartUp = StartUp.createInstance();
1818
public static Core.WindowConfig.Main Main = Core.WindowConfig.Main.createInstance();
1919
public static Filter Filter = Core.WindowConfig.Filter.createInstance();

Jvedio-WPF/Jvedio/Core/Exceptions/DllLoadFailedException.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ public DllLoadFailedException() : base(LangManager.GetValueByKey("DllLoadFailed"
99
{
1010
}
1111

12-
public DllLoadFailedException(string path) : base($"{LangManager.GetValueByKey("DllLoadFailed")} => {path}")
12+
public DllLoadFailedException(string path, string reason) :
13+
base($"{LangManager.GetValueByKey("DllLoadFailed")} => {path}, reason: {reason}")
1314
{
1415
}
1516
}

Jvedio-WPF/Jvedio/Core/Plugins/Plugin.cs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using Jvedio.Core.Exceptions;
2+
using SuperControls.Style;
23
using SuperUtils.Reflections;
34
using System;
45
using System.Collections.Generic;
@@ -29,7 +30,8 @@ public Plugin(string dllPath, string methodName, object[] @params)
2930

3031
public async Task<object> InvokeAsyncMethod()
3132
{
32-
if (!File.Exists(DllPath)) throw new DllLoadFailedException(DllPath);
33+
if (!File.Exists(DllPath))
34+
throw new DllLoadFailedException(DllPath, LangManager.GetValueByKey("Message_FileNotExist"));
3335
Type classType = null;
3436
object instance = null;
3537
try
@@ -38,14 +40,16 @@ public async Task<object> InvokeAsyncMethod()
3840
classType = getPublicType(dll.GetTypes());
3941
instance = ReflectionHelper.TryCreateInstance(classType, new object[] { Params[1], Params[2] });
4042
}
41-
catch (Exception)
43+
catch (Exception ex)
4244
{
43-
throw new DllLoadFailedException(DllPath);
45+
throw new DllLoadFailedException(DllPath, ex.Message);
4446
}
4547

46-
if (classType == null || instance == null) throw new DllLoadFailedException(DllPath);
48+
if (classType == null || instance == null)
49+
throw new DllLoadFailedException(DllPath, "classType == null || instance == null");
4750
MethodInfo methodInfo = classType.GetMethod(MethodName);
48-
if (methodInfo == null) throw new DllLoadFailedException(DllPath);
51+
if (methodInfo == null)
52+
throw new DllLoadFailedException(DllPath, "MethodInfo Null");
4953
try
5054
{
5155
return await (Task<Dictionary<string, object>>)methodInfo.

Jvedio-WPF/Jvedio/Jvedio.csproj

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -760,9 +760,7 @@
760760
<Content Include="Reference\SuperControls.Style.dll" />
761761
<Content Include="Reference\SuperUtils.dll" />
762762
<Content Include="Reference\UsnOperation.dll" />
763-
<Resource Include="Resources\Jvedio.ico">
764-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
765-
</Resource>
763+
<Resource Include="Resources\Jvedio.ico" />
766764
</ItemGroup>
767765
<ItemGroup>
768766
<Content Include="Reference\MediaInfo.dll" />
@@ -802,8 +800,6 @@ XCOPY "$(ProjectDir)Reference\CommonNet.dll" "$(ProjectDir)bin\Debug\plugins\c
802800

803801
XCOPY "$(ProjectDir)Reference\HtmlAgilityPack.dll" "$(ProjectDir)bin\Debug\plugins\crawlers" /E /Y /i
804802

805-
XCOPY "$(ProjectDir)bin\Release" "$(SolutionDir)Release\public\File" /E /Y /i
806-
807803
XCOPY "$(ProjectDir)Data\config.ini" "$(ProjectDir)bin\Release" /Y /i
808804

809805
mkdir "$(ProjectDir)bin\Release\plugins\crawlers"

Jvedio-WPF/Jvedio/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,5 @@
4848
// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
4949
// 通过使用 "*",如下所示:
5050
// [assembly: AssemblyVersion("1.0.*")]
51-
[assembly: AssemblyVersion("5.0.0.0")]
52-
[assembly: AssemblyFileVersion("5.0.0.0")]
51+
[assembly: AssemblyVersion("5.1.0.0")]
52+
[assembly: AssemblyFileVersion("5.1.0.0")]
512 Bytes
Binary file not shown.

Jvedio-WPF/Jvedio/ViewModels/VieModel_StartUp.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,18 @@ public string LoadingText
105105
RaisePropertyChanged();
106106
}
107107
}
108+
private string _Version;
109+
110+
public string Version
111+
{
112+
get { return _Version; }
113+
114+
set
115+
{
116+
_Version = value;
117+
RaisePropertyChanged();
118+
}
119+
}
108120
private bool _Restoring = false;
109121

110122
public bool Restoring
@@ -123,6 +135,8 @@ public bool Restoring
123135
public VieModel_StartUp()
124136
{
125137
ReadFromDataBase();
138+
string local = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
139+
Version = local.Substring(0, local.Length - ".0.0".Length);
126140
}
127141

128142
public void ReadFromDataBase()

Jvedio-WPF/Jvedio/WindowStartUp.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,10 +369,11 @@
369369
Margin="0,30,0,0"
370370
Source="/Resources/Picture/logo.png" />
371371
<TextBlock
372+
Margin="10"
372373
HorizontalAlignment="Center"
373374
FontSize="15"
374375
Foreground="{DynamicResource Control.Disabled.Background}"
375-
Text="5.0.0.0" />
376+
Text="{Binding Version, FallbackValue=5.0}" />
376377
<RadioButton
377378
Margin="0,20,0,0"
378379
HorizontalAlignment="Stretch"

Jvedio-WPF/Jvedio/Windows/Window_Main.xaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4995,6 +4995,7 @@
49954995
<TextBlock
49964996
Margin="5"
49974997
FontSize="10"
4998+
Foreground="{DynamicResource Window.Sub.Foreground}"
49984999
Style="{StaticResource BaseTextBlock}"
49995000
Text="{Binding CreateTime}"
50005001
TextAlignment="Left" />
@@ -5016,7 +5017,14 @@
50165017
</Grid>
50175018
<StackPanel Margin="5" Orientation="Horizontal">
50185019
<TextBlock Text="{Binding StatusText}" />
5019-
<TextBlock Foreground="Red" Text="{Binding Message, StringFormat=' {0} '}" />
5020+
<TextBlock
5021+
Width="250"
5022+
VerticalAlignment="Center"
5023+
Foreground="Red"
5024+
Text="{Binding Message, StringFormat=' {0} '}"
5025+
TextTrimming="WordEllipsis"
5026+
TextWrapping="NoWrap"
5027+
ToolTip="{Binding Message}" />
50205028

50215029
</StackPanel>
50225030

0 commit comments

Comments
 (0)