aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Utilities/Tango.UITests
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-05-06 18:01:50 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-05-06 18:01:50 +0300
commitd967b4b37644ab6aedac36539f8f6fa5cf3547f2 (patch)
tree68433d120d479480c6f50f21d4dcf9d21a21bdfe /Software/Visual_Studio/Utilities/Tango.UITests
parent12d7bb4a0323fa4b037a93036cc32f1e2e7cb591 (diff)
downloadTango-d967b4b37644ab6aedac36539f8f6fa5cf3547f2.tar.gz
Tango-d967b4b37644ab6aedac36539f8f6fa5cf3547f2.zip
Working on TCC..
Diffstat (limited to 'Software/Visual_Studio/Utilities/Tango.UITests')
-rw-r--r--Software/Visual_Studio/Utilities/Tango.UITests/MainWindow.xaml8
-rw-r--r--Software/Visual_Studio/Utilities/Tango.UITests/MainWindow.xaml.cs118
2 files changed, 60 insertions, 66 deletions
diff --git a/Software/Visual_Studio/Utilities/Tango.UITests/MainWindow.xaml b/Software/Visual_Studio/Utilities/Tango.UITests/MainWindow.xaml
index ab76a9745..3f189f28f 100644
--- a/Software/Visual_Studio/Utilities/Tango.UITests/MainWindow.xaml
+++ b/Software/Visual_Studio/Utilities/Tango.UITests/MainWindow.xaml
@@ -17,12 +17,6 @@
Title="MainWindow" Height="346.703" Width="716.514" DataContext="{Binding RelativeSource={RelativeSource Self}}">
<Grid>
- <StackPanel Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Center">
- <TextBlock HorizontalAlignment="Center" Margin="0 0 0 10" x:Name="txtStatus"></TextBlock>
- <ProgressBar x:Name="prog" VerticalAlignment="Center" Height="15" Width="700"></ProgressBar>
- <Button x:Name="btnStart" Click="btnStart_Click" HorizontalAlignment="Center" Padding="30 10" Margin="0 10 0 0">LOAD JOBS</Button>
- <Button x:Name="btnChange" Click="btnChange_Click" HorizontalAlignment="Center" Padding="30 10" Margin="0 10 0 0">CHANGE JOB</Button>
- <Button x:Name="btnListen" Click="btnListen_Click" HorizontalAlignment="Center" Padding="30 10" Margin="0 10 0 0">START LISTEN</Button>
- </StackPanel>
+ <touch:TouchProgressBar Width="300" Height="10" Maximum="100" Value="50" />
</Grid>
</Window>
diff --git a/Software/Visual_Studio/Utilities/Tango.UITests/MainWindow.xaml.cs b/Software/Visual_Studio/Utilities/Tango.UITests/MainWindow.xaml.cs
index 2fad8b46b..6c24121ba 100644
--- a/Software/Visual_Studio/Utilities/Tango.UITests/MainWindow.xaml.cs
+++ b/Software/Visual_Studio/Utilities/Tango.UITests/MainWindow.xaml.cs
@@ -47,9 +47,9 @@ namespace Tango.UITests
/// </summary>
public partial class MainWindow : Window
{
- private ITableDependency _dep;
+ //private ITableDependency _dep;
- private DataSource _dataSource;
+ //private DataSource _dataSource;
public MainWindow()
{
@@ -69,11 +69,11 @@ namespace Tango.UITests
//this.Closing += MainWindow_Closing;
- CmdCommand command = new CmdCommand("wmic", "pagefile list /format:list");
- var result = command.Run().Result;
+ //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();
+ //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();
@@ -82,71 +82,71 @@ namespace Tango.UITests
}
- private void MainWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
- {
- if (_dep != null)
- {
- _dep.Stop();
- _dep.Dispose();
- }
- }
+ //private void MainWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
+ //{
+ // //if (_dep != null)
+ // //{
+ // // _dep.Stop();
+ // // _dep.Dispose();
+ // //}
+ //}
- private void btnStart_Click(object sender, RoutedEventArgs e)
- {
- Stopwatch watch = Stopwatch.StartNew();
+ //private void btnStart_Click(object sender, RoutedEventArgs e)
+ //{
+ // Stopwatch watch = Stopwatch.StartNew();
- using (ObservablesContext db = ObservablesContext.CreateDefault(_dataSource))
- {
- var users = db.Users.ToList();
- var jobs = new JobsCollectionBuilder(db).SetAll().WithSegments().WithBrushStops().Build();
- var first_job = jobs.First();
+ // using (ObservablesContext db = ObservablesContext.CreateDefault(_dataSource))
+ // {
+ // var users = db.Users.ToList();
+ // var jobs = new JobsCollectionBuilder(db).SetAll().WithSegments().WithBrushStops().Build();
+ // var first_job = jobs.First();
- if (first_job.Name == "Changed Name 2")
- {
- Debug.WriteLine("Changed and cached !!!");
- }
- else
- {
- Debug.WriteLine("Not working.");
- }
- }
+ // if (first_job.Name == "Changed Name 2")
+ // {
+ // Debug.WriteLine("Changed and cached !!!");
+ // }
+ // else
+ // {
+ // Debug.WriteLine("Not working.");
+ // }
+ // }
- Debug.WriteLine($"Time to complete: {watch.Elapsed.TotalSeconds} seconds");
- }
+ // Debug.WriteLine($"Time to complete: {watch.Elapsed.TotalSeconds} seconds");
+ //}
- private void btnChange_Click(object sender, RoutedEventArgs e)
- {
- using (ObservablesContext db = ObservablesContext.CreateDefault(_dataSource))
- {
- var jobs = new JobsCollectionBuilder(db).SetAll().WithSegments().WithBrushStops().Build();
- var first_job = jobs.First();
- first_job.Name = "Changed Name 2";
- db.SaveChanges();
- }
- }
+ //private void btnChange_Click(object sender, RoutedEventArgs e)
+ //{
+ // using (ObservablesContext db = ObservablesContext.CreateDefault(_dataSource))
+ // {
+ // var jobs = new JobsCollectionBuilder(db).SetAll().WithSegments().WithBrushStops().Build();
+ // var first_job = jobs.First();
+ // first_job.Name = "Changed Name 2";
+ // db.SaveChanges();
+ // }
+ //}
- private void btnListen_Click(object sender, RoutedEventArgs e)
- {
- String str = _dataSource.ToConnection().ConnectionString;
+ //private void btnListen_Click(object sender, RoutedEventArgs e)
+ //{
+ // String str = _dataSource.ToConnection().ConnectionString;
- var dep = new SqlTableDependency<DAL.Remote.DB.USER>(str, "USERS", "dbo");
- dep.TraceLevel = TraceLevel.Verbose;
- dep.TraceListener = new TextWriterTraceListener(Console.Out);
+ // var dep = new SqlTableDependency<DAL.Remote.DB.USER>(str, "USERS", "dbo");
+ // dep.TraceLevel = TraceLevel.Verbose;
+ // dep.TraceListener = new TextWriterTraceListener(Console.Out);
- dep.OnChanged += Changed;
- dep.Start();
+ // dep.OnChanged += Changed;
+ // dep.Start();
- _dep = dep;
- }
+ // _dep = dep;
+ //}
- private void Changed(object sender, RecordChangedEventArgs<DAL.Remote.DB.USER> e)
- {
- var changedEntity = e.Entity;
+ //private void Changed(object sender, RecordChangedEventArgs<DAL.Remote.DB.USER> e)
+ //{
+ // var changedEntity = e.Entity;
- Console.WriteLine("DML operation: " + e.ChangeType);
+ // Console.WriteLine("DML operation: " + e.ChangeType);
- Console.WriteLine(changedEntity.ToJsonString());
- }
+ // Console.WriteLine(changedEntity.ToJsonString());
+ //}
}
}