diff --git a/src/AddIn/RegistryUtil.cs b/src/AddIn/RegistryUtil.cs
index 5fe2eea..a13e941 100644
--- a/src/AddIn/RegistryUtil.cs
+++ b/src/AddIn/RegistryUtil.cs
@@ -63,9 +63,15 @@ namespace RehauSku
{
priceListPath = value;
RootKey.SetValue("PriceListPath", value);
+ RibbonController.RefreshControl("setPriceList");
}
}
+ public static string GetPriceListName()
+ {
+ return Path.GetFileName(priceListPath);
+ }
+
public static ResponseOrder StoreResponseOrder
{
get
diff --git a/src/Interface/RibbonController.cs b/src/Interface/RibbonController.cs
index bd50550..7bf9ee1 100644
--- a/src/Interface/RibbonController.cs
+++ b/src/Interface/RibbonController.cs
@@ -2,6 +2,8 @@
using Microsoft.Office.Interop.Excel;
using RehauSku.PriceListTools;
using System;
+using System.IO;
+using System.Reflection;
using System.Runtime.InteropServices;
using System.Windows.Forms;
@@ -27,8 +29,8 @@ namespace RehauSku.Interface
-
-
+
+
@@ -118,5 +120,17 @@ namespace RehauSku.Interface
return selection.Columns.Count == 2;
}
}
+
+ public string GetVersionLabel(IRibbonControl control)
+ {
+ string version = Assembly.GetExecutingAssembly().GetName().Version.ToString();
+ return $"v{version}";
+ }
+
+ public string GetPriceListPathLabel(IRibbonControl control)
+ {
+ string name = RegistryUtil.GetPriceListName();
+ return string.IsNullOrEmpty(name) ? "Нет файла шаблона!" : name;
+ }
}
}