diff options
Diffstat (limited to 'Software/Visual_Studio/Utilities/Tango.UITests/MainWindow.xaml.cs')
| -rw-r--r-- | Software/Visual_Studio/Utilities/Tango.UITests/MainWindow.xaml.cs | 38 |
1 files changed, 26 insertions, 12 deletions
diff --git a/Software/Visual_Studio/Utilities/Tango.UITests/MainWindow.xaml.cs b/Software/Visual_Studio/Utilities/Tango.UITests/MainWindow.xaml.cs index ca676e277..2fad8b46b 100644 --- a/Software/Visual_Studio/Utilities/Tango.UITests/MainWindow.xaml.cs +++ b/Software/Visual_Studio/Utilities/Tango.UITests/MainWindow.xaml.cs @@ -37,6 +37,8 @@ using TableDependency.SqlClient.Base; using TableDependency.SqlClient; using TableDependency.SqlClient.Base.EventArgs; using TableDependency.SqlClient.Base.Abstracts; +using Tango.Core.Components; +using System.Text.RegularExpressions; namespace Tango.UITests { @@ -51,21 +53,33 @@ namespace Tango.UITests public MainWindow() { - _dataSource = new DataSource() - { - Address = "twine.database.windows.net", - Catalog = "Tango_DEV", - Type = DataSourceType.SQLServer, - UserName = "Roy", - Password = "Aa123456", - IntegratedSecurity = false, - }; + //_dataSource = new DataSource() + //{ + // Address = "twine.database.windows.net", + // Catalog = "Tango_DEV", + // Type = DataSourceType.SQLServer, + // UserName = "Roy", + // Password = "Aa123456", + // IntegratedSecurity = false, + //}; + + //InitializeComponent(); + //EntityFrameworkCache.Initialize(new MyMemoryCache() { Expiration = TimeSpan.FromMinutes(1) }); + + + //this.Closing += MainWindow_Closing; + + CmdCommand command = new CmdCommand("wmic", "pagefile list /format:list"); + var result = command.Run().Result; + + Regex regEx = new Regex("Name=(.+)"); + var pageFiles = regEx.Matches(result.StandardOutput).OfType<Match>().Select(x => x.Groups.OfType<Group>().LastOrDefault()).ToList().Select(x => x.Value.Replace("\n", "").Replace("\r", "")).ToList(); + + - InitializeComponent(); - EntityFrameworkCache.Initialize(new MyMemoryCache() { Expiration = TimeSpan.FromMinutes(1) }); + //var matches = matches.OfType<Match>().Select(x => x.Groups.OfType<Group>().Last().Value.Replace("\n","").Replace("\r","")).ToList(); - this.Closing += MainWindow_Closing; } private void MainWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e) |
