aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Console/ConsoleTextBoxMaxWidthConverter.cs
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2020-02-27 18:25:51 +0200
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2020-02-27 18:25:51 +0200
commit03970962af1bfbfc5c13109c3f0a465cf9a1dc29 (patch)
tree94d97e7aff1e6c0e95495636540c7fa99f5ef16d /Software/Visual_Studio/Tango.Console/ConsoleTextBoxMaxWidthConverter.cs
parentcd974051e442dd0420eb14513a57855e69beef86 (diff)
downloadTango-03970962af1bfbfc5c13109c3f0a465cf9a1dc29.tar.gz
Tango-03970962af1bfbfc5c13109c3f0a465cf9a1dc29.zip
Create FSE module project template.
Implemented core PPC console components. Added FSE PPC Console module.
Diffstat (limited to 'Software/Visual_Studio/Tango.Console/ConsoleTextBoxMaxWidthConverter.cs')
-rw-r--r--Software/Visual_Studio/Tango.Console/ConsoleTextBoxMaxWidthConverter.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.Console/ConsoleTextBoxMaxWidthConverter.cs b/Software/Visual_Studio/Tango.Console/ConsoleTextBoxMaxWidthConverter.cs
new file mode 100644
index 000000000..5ed7c0938
--- /dev/null
+++ b/Software/Visual_Studio/Tango.Console/ConsoleTextBoxMaxWidthConverter.cs
@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+
+namespace Tango.Console
+{
+ public class ConsoleTextBoxMaxWidthConverter : IMultiValueConverter
+ {
+ public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
+ {
+ double workingFolderWidth = (double)values[0];
+ double consoleWidth = (double)values[1];
+
+ return consoleWidth - workingFolderWidth;
+ }
+
+ public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}