diff --git a/README.md b/README.md
index 7b6f768..91fde07 100644
--- a/README.md
+++ b/README.md
@@ -4,13 +4,17 @@
This project is a Word VSTO add-in program (plug-in) for **double-click to enlarge** browse pictures in Office Word documents.
-![Example](https://github.com/theyangfan/WordPictureViewer/blob/main/example.gif)
+![Example](images/example_01.png)
+
+![Example02](images/example_02.png)
+
+
## 下载 (Downloads)
-| Office AddIn | Download |
-| ------------ | ---------------------------------------------------------------------------------------------------------- |
-| Word | [word_v1.0.3.zip](https://github.com/theyangfan/WordPictureViewer/releases/download/1.0.3/word_v1.0.3.zip) |
+| Office AddIn | Download |
+| ------------ | --------------------------------------------------------------------------------------------------------------------- |
+| Word | [word_v1.1.0.zip (20240524)](https://github.com/theyangfan/WordPictureViewer/releases/download/1.1.0/word_v1.1.0.zip) |
## 安装 (Install)
@@ -26,6 +30,11 @@ Open Windows Settings, go to 【Apps】 - 【Apps and Features】, search for Wo
## 更新日志 (Release History)
+### v1.1.0 (2024-05-24)
+
+- 更新浏览界面;
+- 新增图片保存和使用本机默认照片程序打开功能。
+
### v1.0.3 (2023-09-04)
- 最小缩放率调整为 50%。
diff --git a/images/example.gif b/images/example.gif
deleted file mode 100644
index a65e26e..0000000
Binary files a/images/example.gif and /dev/null differ
diff --git a/images/example_01.png b/images/example_01.png
new file mode 100644
index 0000000..6394e9c
Binary files /dev/null and b/images/example_01.png differ
diff --git a/images/example_02.png b/images/example_02.png
new file mode 100644
index 0000000..010ecbc
Binary files /dev/null and b/images/example_02.png differ
diff --git a/src/PictureViewer.xaml.cs b/src/PictureViewer.xaml.cs
index d8b8e77..e81ada9 100644
--- a/src/PictureViewer.xaml.cs
+++ b/src/PictureViewer.xaml.cs
@@ -29,18 +29,16 @@ namespace WordPictureViewer
public partial class PictureViewer : Window
{
#region Private Members
- private const int MINIMUM_SCALE = 50;
+ private const int MINIMUM_SCALE = 50; // 50%
private Bitmap _bitmap = null;
- private double _screenW;
- private double _screenH;
private double _oriWidth;
private double _oriHeight;
- private int _scale = 100;
+ private int _scale = 100; // 100%
private int _scaleStep = 10;
- private bool _zoomIn = true;
+ private bool _isZoomIn = true;
- private bool _isPressed = false;
private System.Windows.Point _pressedPoint;
+ private bool _isPressed = false;
private double _lastXOffset = 0;
private double _lastYOffset = 0;
#endregion
@@ -58,7 +56,7 @@ public PictureViewer()
InitUI();
- // Mouse wheel event
+ // Mouse events
MouseWheel += PictureViewer_MouseWheel;
uiContent.MouseDown += PictureViewer_MouseDown;
@@ -95,16 +93,16 @@ public void ShowInlineShapeSelection(Word.Selection sel)
_bitmap = Crop(srcBmp, 0, 0, (int)_oriWidth, (int)_oriHeight);
lblPicSize.Content = $"{_bitmap.Width} x {_bitmap.Height}";
double ratio = (double)_oriWidth / _oriHeight;
- _screenW = SystemParameters.PrimaryScreenWidth;
- _screenH = SystemParameters.PrimaryScreenHeight;
- if (_oriWidth > _screenW)
+ double screenW = SystemParameters.PrimaryScreenWidth;
+ double screenH = SystemParameters.PrimaryScreenHeight;
+ if (_oriWidth > screenW)
{
- _oriWidth = _screenW;
+ _oriWidth = screenW;
_oriHeight = _oriWidth / ratio;
}
- if (_oriHeight > _screenH)
+ if (_oriHeight > screenH)
{
- _oriHeight = _screenH;
+ _oriHeight = screenH;
_oriWidth = _oriHeight * ratio;
}
_oriWidth *= 0.8;
@@ -192,20 +190,23 @@ public void ShowFloatingShapeSelection(Word.Selection sel)
#region Private Methods
private void InitUI()
{
- uiLogo.ToolTip = ResourceHelper.Current.GetString("AppName");
- uiBtnSave.ToolTip = ResourceHelper.Current.GetString("SaveAs");
- uiBtnOpenWith.ToolTip = ResourceHelper.Current.GetString("OpenWith");
- uiBtnZoomIn.ToolTip = ResourceHelper.Current.GetString("ZoomIn");
- uiBtnZoomOut.ToolTip = ResourceHelper.Current.GetString("ZoomOut");
- uiBtnCentered.ToolTip = ResourceHelper.Current.GetString("AlignCenter");
+ // set button tooltip
+ uiLogo.ToolTip = ResourceHelper.Strings.GetString("AppName");
+ uiBtnSave.ToolTip = ResourceHelper.Strings.GetString("SaveAs");
+ uiBtnOpenWith.ToolTip = ResourceHelper.Strings.GetString("OpenWith");
+ uiBtnZoomIn.ToolTip = ResourceHelper.Strings.GetString("ZoomIn");
+ uiBtnZoomOut.ToolTip = ResourceHelper.Strings.GetString("ZoomOut");
+ uiBtnCentered.ToolTip = ResourceHelper.Strings.GetString("AlignCenter");
}
private void ZoomIn()
{
double scale = (double)_scale / 100;
- if (_zoomIn && _scale > 100) _scaleStep++;
+ // scale step increase when zoom in
+ if (_isZoomIn && _scale > 100) _scaleStep++;
+
_scale += _scaleStep;
- _zoomIn = true;
+ _isZoomIn = true;
double newScale = (double)_scale / 100;
Scale(scale, newScale, _oriWidth / 2, _oriHeight / 2);
@@ -219,10 +220,12 @@ private void ZoomIn()
private void ZoomOut()
{
double scale = (double)_scale / 100;
- if (!_zoomIn && _scale > 100) _scaleStep--;
+ // scale step decrease when zoom out
+ if (!_isZoomIn && _scale > 100) _scaleStep--;
+
if (_scale - _scaleStep < MINIMUM_SCALE) return;
_scale -= _scaleStep;
- _zoomIn = false;
+ _isZoomIn = false;
double newScale = (double)_scale / 100;
Scale(scale, newScale, _oriWidth / 2, _oriHeight / 2);
@@ -350,33 +353,49 @@ private void PictureViewer_MouseMove(object sender, MouseEventArgs e)
uiTranslate.X = _lastXOffset + offset.X;
uiTranslate.Y = _lastYOffset + offset.Y;
}
+
private void btnSave_Click(object sender, RoutedEventArgs e)
{
- if(_bitmap == null)
+ try
+ {
+ if (_bitmap == null)
+ {
+ MessageBox.Show("Invalid Picture!");
+ return;
+ }
+ Microsoft.Win32.SaveFileDialog save = new Microsoft.Win32.SaveFileDialog();
+ save.Filter = "Jpeg Files (*.jpg, *.jpeg)|*.jpg;*.jpeg | Png files (*.png) |*.png | Bmp Files (*.bmp)|*.bmp " +
+ "| Gif Files (*.gif)|*.gif | Emf Files (*.emf)|*.emf | All Files (*.*)|*.*";
+ if (save.ShowDialog() != true) return;
+ string ext = new FileInfo(save.FileName).Extension;
+ ImageFormat format = GetImageFormat(ext);
+
+ _bitmap.Save(save.FileName, format);
+ }
+ catch (Exception ex)
{
- MessageBox.Show("Invalid Picture!");
- return;
+ MessageBox.Show(ex.Message);
}
- Microsoft.Win32.SaveFileDialog save = new Microsoft.Win32.SaveFileDialog();
- save.Filter = "Jpeg Files (*.jpg, *.jpeg)|*.jpg;*.jpeg | Png files (*.png) |*.png | Bmp Files (*.bmp)|*.bmp " +
- "| Gif Files (*.gif)|*.gif | Emf Files (*.emf)|*.emf | All Files (*.*)|*.*";
- if (save.ShowDialog() != true) return;
- string ext = new FileInfo(save.FileName).Extension;
- ImageFormat format = GetImageFormat(ext);
-
- _bitmap.Save(save.FileName, format);
}
private void btnOpenWith_Click(object sender, RoutedEventArgs e)
{
- if (_bitmap == null)
+ try
+ {
+ if (_bitmap == null)
+ {
+ MessageBox.Show("Invalid Picture!");
+ return;
+ }
+ string tempFile = System.IO.Path.Combine(System.IO.Path.GetTempPath(), $"WordPictureViewer-{Guid.NewGuid()}.jpg");
+ _bitmap.Save(tempFile, ImageFormat.Jpeg);
+ System.Diagnostics.Process.Start(tempFile);
+ }
+ catch (Exception ex)
{
- MessageBox.Show("Invalid Picture!");
- return;
+ MessageBox.Show(ex.Message);
}
- string tempFile = System.IO.Path.Combine(System.IO.Path.GetTempPath(), $"WordPictureViewer-{Guid.NewGuid()}.jpg");
- _bitmap.Save(tempFile, ImageFormat.Jpeg);
- System.Diagnostics.Process.Start(tempFile);
+
}
private void btnClose_Click(object sender, RoutedEventArgs e)
@@ -397,6 +416,7 @@ private void btnZoomIn_Click(object sender, RoutedEventArgs e)
private void btnCentered_Click(object sender, RoutedEventArgs e)
{
+ // reset translate offset
uiTranslate.X = 0;
uiTranslate.Y = 0;
_lastXOffset = 0;
@@ -407,6 +427,7 @@ private void Window_KeyDown(object sender, KeyEventArgs e)
{
if(e.Key == Key.Escape)
{
+ if (_bitmap != null) _bitmap.Dispose();
Close();
}
}
diff --git a/src/Properties/AssemblyInfo.cs b/src/Properties/AssemblyInfo.cs
index 67997ee..6779c5c 100644
--- a/src/Properties/AssemblyInfo.cs
+++ b/src/Properties/AssemblyInfo.cs
@@ -1,4 +1,5 @@
-using System.Reflection;
+using System.Resources;
+using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
@@ -11,7 +12,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("WordPictureViewer")]
-[assembly: AssemblyCopyright("Copyright © 2022")]
+[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@@ -33,6 +34,5 @@
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
-
+[assembly: AssemblyVersion("1.1.0.0")]
+[assembly: AssemblyFileVersion("1.1.0.0")]
diff --git a/src/Properties/Resources.Designer.cs b/src/Properties/Resources.Designer.cs
deleted file mode 100644
index 536f5b2..0000000
--- a/src/Properties/Resources.Designer.cs
+++ /dev/null
@@ -1,62 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace WordPictureViewer.Properties {
-
-
- ///
- /// A strongly-typed resource class, for looking up localized strings, etc.
- ///
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources() {
- }
-
- ///
- /// Returns the cached ResourceManager instance used by this class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager {
- get {
- if (object.ReferenceEquals(resourceMan, null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WordPictureViewer.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- ///
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture {
- get {
- return resourceCulture;
- }
- set {
- resourceCulture = value;
- }
- }
- }
-}
diff --git a/src/Properties/Resources.resx b/src/Properties/Resources.resx
deleted file mode 100644
index af7dbeb..0000000
--- a/src/Properties/Resources.resx
+++ /dev/null
@@ -1,117 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
\ No newline at end of file
diff --git a/src/Properties/Settings.Designer.cs b/src/Properties/Settings.Designer.cs
deleted file mode 100644
index df4f1e3..0000000
--- a/src/Properties/Settings.Designer.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace WordPictureViewer.Properties {
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
-
- private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default {
- get {
- return defaultInstance;
- }
- }
- }
-}
diff --git a/src/Properties/Settings.settings b/src/Properties/Settings.settings
deleted file mode 100644
index 3964565..0000000
--- a/src/Properties/Settings.settings
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/src/Resources/Strings.Designer.cs b/src/Resources/Strings.Designer.cs
new file mode 100644
index 0000000..7de05d5
--- /dev/null
+++ b/src/Resources/Strings.Designer.cs
@@ -0,0 +1,135 @@
+//------------------------------------------------------------------------------
+//
+// 此代码由工具生成。
+// 运行时版本:4.0.30319.42000
+//
+// 对此文件的更改可能会导致不正确的行为,并且如果
+// 重新生成代码,这些更改将会丢失。
+//
+//------------------------------------------------------------------------------
+
+namespace WordPictureViewer.Resources {
+ using System;
+
+
+ ///
+ /// 一个强类型的资源类,用于查找本地化的字符串等。
+ ///
+ // 此类是由 StronglyTypedResourceBuilder
+ // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
+ // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
+ // (以 /str 作为命令选项),或重新生成 VS 项目。
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Strings {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Strings() {
+ }
+
+ ///
+ /// 返回此类使用的缓存的 ResourceManager 实例。
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WordPictureViewer.Resources.Strings", typeof(Strings).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// 重写当前线程的 CurrentUICulture 属性,对
+ /// 使用此强类型资源类的所有资源查找执行重写。
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ ///
+ /// 查找类似 Align Center 的本地化字符串。
+ ///
+ internal static string AlignCenter {
+ get {
+ return ResourceManager.GetString("AlignCenter", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Word Picture Viewer 的本地化字符串。
+ ///
+ internal static string AppName {
+ get {
+ return ResourceManager.GetString("AppName", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Close 的本地化字符串。
+ ///
+ internal static string Close {
+ get {
+ return ResourceManager.GetString("Close", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Enable 的本地化字符串。
+ ///
+ internal static string Enable {
+ get {
+ return ResourceManager.GetString("Enable", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Open With Photos 的本地化字符串。
+ ///
+ internal static string OpenWith {
+ get {
+ return ResourceManager.GetString("OpenWith", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Save As 的本地化字符串。
+ ///
+ internal static string SaveAs {
+ get {
+ return ResourceManager.GetString("SaveAs", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Zoom In 的本地化字符串。
+ ///
+ internal static string ZoomIn {
+ get {
+ return ResourceManager.GetString("ZoomIn", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Zoom Out 的本地化字符串。
+ ///
+ internal static string ZoomOut {
+ get {
+ return ResourceManager.GetString("ZoomOut", resourceCulture);
+ }
+ }
+ }
+}
diff --git a/src/Resources/Strings.en-US.Designer.cs b/src/Resources/Strings.en-US.Designer.cs
deleted file mode 100644
index e69de29..0000000
diff --git a/src/Resources/Strings.en-US.resx b/src/Resources/Strings.resx
similarity index 100%
rename from src/Resources/Strings.en-US.resx
rename to src/Resources/Strings.resx
diff --git a/src/Ribbon.Designer.cs b/src/Ribbon.Designer.cs
index 49d3eaf..c3282f6 100644
--- a/src/Ribbon.Designer.cs
+++ b/src/Ribbon.Designer.cs
@@ -11,8 +11,7 @@ public Ribbon()
: base(Globals.Factory.GetRibbonFactory())
{
InitializeComponent();
- tab1.Label = ResourceHelper.Current.GetString("AppName");
- UIEnable.Label = ResourceHelper.Current.GetString("Enable");
+ tab1.Label = ResourceHelper.Strings.GetString("AppName");
}
///
@@ -38,7 +37,8 @@ private void InitializeComponent()
{
this.tab1 = this.Factory.CreateRibbonTab();
this.group1 = this.Factory.CreateRibbonGroup();
- this.UIEnable = this.Factory.CreateRibbonCheckBox();
+ this.uiEnable = this.Factory.CreateRibbonCheckBox();
+ this.uiVersion = this.Factory.CreateRibbonLabel();
this.tab1.SuspendLayout();
this.group1.SuspendLayout();
this.SuspendLayout();
@@ -47,21 +47,26 @@ private void InitializeComponent()
//
this.tab1.ControlId.ControlIdType = Microsoft.Office.Tools.Ribbon.RibbonControlIdType.Office;
this.tab1.Groups.Add(this.group1);
- this.tab1.Label = "图片浏览器";
+ this.tab1.Label = "WordPictureViewer";
this.tab1.Name = "tab1";
this.tab1.Tag = "";
//
// group1
//
- this.group1.Items.Add(this.UIEnable);
- this.group1.Label = "选项";
+ this.group1.Items.Add(this.uiEnable);
+ this.group1.Items.Add(this.uiVersion);
this.group1.Name = "group1";
//
- // UIEnable
+ // uiEnable
//
- this.UIEnable.Checked = true;
- this.UIEnable.Label = "启用";
- this.UIEnable.Name = "UIEnable";
+ this.uiEnable.Checked = true;
+ this.uiEnable.Label = "启用";
+ this.uiEnable.Name = "uiEnable";
+ //
+ // uiVersion
+ //
+ this.uiVersion.Label = " ";
+ this.uiVersion.Name = "uiVersion";
//
// Ribbon
//
@@ -79,8 +84,9 @@ private void InitializeComponent()
#endregion
internal Microsoft.Office.Tools.Ribbon.RibbonGroup group1;
- internal Microsoft.Office.Tools.Ribbon.RibbonCheckBox UIEnable;
+ internal Microsoft.Office.Tools.Ribbon.RibbonCheckBox uiEnable;
internal Microsoft.Office.Tools.Ribbon.RibbonTab tab1;
+ internal Microsoft.Office.Tools.Ribbon.RibbonLabel uiVersion;
}
partial class ThisRibbonCollection
diff --git a/src/Ribbon.cs b/src/Ribbon.cs
index 1ce704a..d9f9987 100644
--- a/src/Ribbon.cs
+++ b/src/Ribbon.cs
@@ -2,6 +2,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using System.Reflection;
using System.Text;
namespace WordPictureViewer
@@ -10,13 +11,15 @@ public partial class Ribbon
{
public bool IsEnable
{
- get => UIEnable.Checked;
- set => UIEnable.Checked = value;
+ get => uiEnable.Checked;
+ set => uiEnable.Checked = value;
}
private void Ribbon_Load(object sender, RibbonUIEventArgs e)
{
-
+ uiEnable.Label = ResourceHelper.Strings.GetString("Enable");
+ Version version = Assembly.GetExecutingAssembly().GetName().Version;
+ uiVersion.Label = $"(V{version.Major}.{version.Minor}.{version.Build})";
}
}
}
diff --git a/src/ThisAddIn.cs b/src/ThisAddIn.cs
index bd59c36..eecd133 100644
--- a/src/ThisAddIn.cs
+++ b/src/ThisAddIn.cs
@@ -11,6 +11,7 @@
using System.Drawing;
using System.Windows.Media;
using System.Windows.Media.Imaging;
+using System.Globalization;
namespace WordPictureViewer
{
diff --git a/src/Utils/ResourceHelper.cs b/src/Utils/ResourceHelper.cs
index de5871c..6858807 100644
--- a/src/Utils/ResourceHelper.cs
+++ b/src/Utils/ResourceHelper.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.Globalization;
using System.Linq;
using System.Resources;
using System.Text;
@@ -11,11 +12,14 @@ internal class ResourceHelper
{
private static ResourceManager _resourceManager;
- public static ResourceManager Current
+ ///
+ /// The localizable strings resource.
+ ///
+ public static ResourceManager Strings
{
get
{
- if(_resourceManager == null)
+ if (_resourceManager == null)
{
_resourceManager = new ResourceManager("WordPictureViewer.Resources.Strings", typeof(ResourceHelper).Assembly);
}
diff --git a/src/WordPictureViewer.csproj b/src/WordPictureViewer.csproj
index 3cb4c9d..32fbadf 100644
--- a/src/WordPictureViewer.csproj
+++ b/src/WordPictureViewer.csproj
@@ -30,10 +30,10 @@
VSTO40
False
true
- publish\
+ ..\publish\
zh-chs
- 1.0.3.0
+ 1.1.0.0
false
true
7
@@ -195,38 +195,21 @@
True
-
- ResXFileCodeGenerator
- Resources.Designer.cs
- Designer
-
-
- True
- Resources.resx
-
ResXFileCodeGenerator
Strings.zh-CN.Designer.cs
-
+
ResXFileCodeGenerator
- Strings.en-US.Designer.cs
+ Strings.Designer.cs
Ribbon.cs
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
-
- True
- Settings.settings
-
-
+
True
True
- Strings.en-US.resx
+ Strings.resx
Component
@@ -285,7 +268,7 @@
WordPictureViewer_TemporaryKey.pfx
- ABF83C4DE1FFCDD83BE6A8D0F028A17982E6970D
+ BC6C0E0868AC98BB40D982682035B618A0FBD2E9
diff --git a/src/WordPictureViewer_TemporaryKey.pfx b/src/WordPictureViewer_TemporaryKey.pfx
index 2979099..178fd99 100644
Binary files a/src/WordPictureViewer_TemporaryKey.pfx and b/src/WordPictureViewer_TemporaryKey.pfx differ