aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2023-04-19 13:04:38 +0300
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2023-04-19 13:04:38 +0300
commit7ba903bb793adf638a7e1a5c7170e8a03bbb6ea9 (patch)
treeea8f80de80a9763ca482420aaa424f143a99af2c /Software/Visual_Studio/PPC/Tango.PPC.UI/Converters
parent1133972c0c51feb478aa3944fad5f374a8a2da35 (diff)
downloadTango-7ba903bb793adf638a7e1a5c7170e8a03bbb6ea9.tar.gz
Tango-7ba903bb793adf638a7e1a5c7170e8a03bbb6ea9.zip
Menu Gui. Set selection item.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Converters')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ComapareModulNameConverter.cs44
1 files changed, 44 insertions, 0 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ComapareModulNameConverter.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ComapareModulNameConverter.cs
new file mode 100644
index 000000000..8ac8a44b0
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ComapareModulNameConverter.cs
@@ -0,0 +1,44 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Data;
+using Tango.PPC.Common;
+
+namespace Tango.PPC.UI.Converters
+{
+ public class ComapareModulNameConverter : IMultiValueConverter
+ {
+ public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
+ {
+ try
+ {
+ if (values.Count() == 2)
+ {
+ IPPCModule CurrentModule = values[0] as IPPCModule;
+ string name = System.Convert.ToString(values[1]);
+
+ if (CurrentModule != null)
+ {
+ bool compare = String.Compare(CurrentModule.Name, name, true) == 0;
+ return compare;
+ }
+ }
+
+ return "false";
+ }
+ catch
+ {
+ return "false";
+ }
+ }
+
+ public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}