aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Utilities/Tango.UITests
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-11-21 14:30:01 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-11-21 14:30:01 +0200
commit36dcf50eec20835ab1955932e89f9c6ffc68acde (patch)
tree3ca1331b626f04c8f19af24b65b7459b5f0660cb /Software/Visual_Studio/Utilities/Tango.UITests
parent5f321b419501b2c836e8b03400fff2934be5f135 (diff)
downloadTango-36dcf50eec20835ab1955932e89f9c6ffc68acde.tar.gz
Tango-36dcf50eec20835ab1955932e89f9c6ffc68acde.zip
Working on Touch FileExplorer !
Diffstat (limited to 'Software/Visual_Studio/Utilities/Tango.UITests')
-rw-r--r--Software/Visual_Studio/Utilities/Tango.UITests/MainWindow.xaml14
-rw-r--r--Software/Visual_Studio/Utilities/Tango.UITests/MainWindow.xaml.cs141
-rw-r--r--Software/Visual_Studio/Utilities/Tango.UITests/Tango.UITests.csproj6
3 files changed, 22 insertions, 139 deletions
diff --git a/Software/Visual_Studio/Utilities/Tango.UITests/MainWindow.xaml b/Software/Visual_Studio/Utilities/Tango.UITests/MainWindow.xaml
index bccc5f3cc..ff1afdd22 100644
--- a/Software/Visual_Studio/Utilities/Tango.UITests/MainWindow.xaml
+++ b/Software/Visual_Studio/Utilities/Tango.UITests/MainWindow.xaml
@@ -12,13 +12,21 @@
xmlns:stubs="clr-namespace:Tango.Stubs.Views;assembly=Tango.Stubs"
xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
xmlns:commonControls="clr-namespace:Tango.PPC.Common.Controls;assembly=Tango.PPC.Common"
+ xmlns:explorer="clr-namespace:Tango.Explorer;assembly=Tango.Explorer"
mc:Ignorable="d"
- Title="MainWindow" Height="500" Width="800" Foreground="Red" DataContext="{Binding RelativeSource={RelativeSource Self}}">
+ Title="MainWindow" Height="564.721" Width="504.315" DataContext="{Binding RelativeSource={RelativeSource Self}}">
<Grid>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="232*"/>
+ <RowDefinition Height="50"/>
+ </Grid.RowDefinitions>
+ <explorer:ExplorerControl x:Name="explorer" CurrentPath="{Binding CurrentPath}" />
- <StackPanel VerticalAlignment="Center">
- <touch:TouchRingProgress Width="100" Height="100" Value="100" Maximum="100" IsIndeterminate="True" />
+ <StackPanel Orientation="Horizontal" Grid.Row="1">
+ <Button Click="Button_Click">LOAD</Button>
+ <Button Command="{Binding ElementName=explorer,Path=BackCommand}">BACK</Button>
+ <TextBox Width="200" Margin="10 0 0 0" Text="{Binding CurrentPath}"></TextBox>
</StackPanel>
</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 c3eca4c76..0ff703178 100644
--- a/Software/Visual_Studio/Utilities/Tango.UITests/MainWindow.xaml.cs
+++ b/Software/Visual_Studio/Utilities/Tango.UITests/MainWindow.xaml.cs
@@ -23,156 +23,27 @@ using Tango.SharedUI;
namespace Tango.UITests
{
- public class VM : ViewModel
- {
- public List<String> Names { get; set; }
-
- private String _email;
- public String Email
- {
- get { return _email; }
- set { _email = value; RaisePropertyChangedAuto(); }
- }
-
- private String _password;
-
- public String Password
- {
- get { return _password; }
- set { _password = value; RaisePropertyChangedAuto(); }
- }
-
- public RelayCommand LoginCommand { get; set; }
-
- public VM()
- {
- LoginCommand = new RelayCommand(Login);
-
- Names = new List<string>();
-
- for (int i = 0; i < 100; i++)
- {
- Names.Add("ITEM " + (i + 1).ToString());
- }
- }
-
- private void Login()
- {
- Validate();
- }
-
- protected override void OnValidating()
- {
- base.OnValidating();
-
- if (Email == "1234")
- {
- InsertError(nameof(Email), "This email is not good");
- }
- }
- }
-
- public class Person : ExtendedObject
- {
- public String FirstName { get; set; }
- public String LastName { get; set; }
- private int _index;
-
- public int Index
- {
- get { return _index; }
- set { _index = value; RaisePropertyChangedAuto(); }
- }
-
- public int Age { get; set; }
-
- public override string ToString()
- {
- return FirstName;
- }
- }
-
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
-
-
- public ObservableCollection<Person> Persons
- {
- get { return (ObservableCollection<Person>)GetValue(PersonsProperty); }
- set { SetValue(PersonsProperty, value); }
- }
- public static readonly DependencyProperty PersonsProperty =
- DependencyProperty.Register("Persons", typeof(ObservableCollection<Person>), typeof(MainWindow), new PropertyMetadata(null));
-
-
- public RelayCommand<DropEventArgs> DropCommand { get; set; }
-
- public int Value
- {
- get { return (int)GetValue(ValueProperty); }
- set { SetValue(ValueProperty, value); }
- }
- public static readonly DependencyProperty ValueProperty =
- DependencyProperty.Register("Value", typeof(int), typeof(MainWindow), new PropertyMetadata(0));
-
public MainWindow()
{
- Persons = new ObservableCollection<Person>();
-
- for (int i = 1; i < 10; i++)
- {
- Persons.Add(new Person()
- {
- Age = i,
- FirstName = i.ToString() + " Roy",
- LastName = "Ben Shabat " + i.ToString(),
- Index = i,
- });
- }
-
- DropCommand = new RelayCommand<DropEventArgs>(OnDrop);
-
- Value = 10;
-
InitializeComponent();
-
- //DataContext = new VM();
}
- private void OnDrop(DropEventArgs e)
+ public String CurrentPath
{
- var dragPerson = (e.Draggable as FrameworkElement).DataContext as Person;
- var dropPerson = (e.Droppable as FrameworkElement).DataContext as Person;
-
- Debug.WriteLine(dragPerson.FirstName + " dropped on " + dropPerson.FirstName);
-
- int dragIndex = dragPerson.Index;
- dragPerson.Index = dropPerson.Index;
- dropPerson.Index = dragIndex;
+ get { return (String)GetValue(CurrentPathProperty); }
+ set { SetValue(CurrentPathProperty, value); }
}
+ public static readonly DependencyProperty CurrentPathProperty =
+ DependencyProperty.Register("CurrentPath", typeof(String), typeof(MainWindow), new PropertyMetadata(null));
private void Button_Click(object sender, RoutedEventArgs e)
{
- MessageBox.Show("Done");
- }
-
- private void Button_Click_1(object sender, RoutedEventArgs e)
- {
- Persons.Add(new Person()
- {
- FirstName = "New",
- LastName = "Person",
- Age = 200,
- Index = 0
- });
- }
-
- private void TouchButton_Click(object sender, RoutedEventArgs e)
- {
- MessageBox.Show("Clicked");
+ CurrentPath = @"D:\PPC Explorer Test";
}
}
}
diff --git a/Software/Visual_Studio/Utilities/Tango.UITests/Tango.UITests.csproj b/Software/Visual_Studio/Utilities/Tango.UITests/Tango.UITests.csproj
index bb5501f0b..909acedb6 100644
--- a/Software/Visual_Studio/Utilities/Tango.UITests/Tango.UITests.csproj
+++ b/Software/Visual_Studio/Utilities/Tango.UITests/Tango.UITests.csproj
@@ -128,6 +128,10 @@
<Project>{b112d89a-a106-41ae-a0c1-4abc84c477f5}</Project>
<Name>Tango.DragAndDrop</Name>
</ProjectReference>
+ <ProjectReference Include="..\..\Tango.Explorer\Tango.Explorer.csproj">
+ <Project>{4399af76-db52-4cfb-8020-6f85bdb29fd5}</Project>
+ <Name>Tango.Explorer</Name>
+ </ProjectReference>
<ProjectReference Include="..\..\Tango.SharedUI\Tango.SharedUI.csproj">
<Project>{8491d07b-c1f6-4b62-a412-41b9fd2d6538}</Project>
<Name>Tango.SharedUI</Name>
@@ -144,7 +148,7 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
- <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" />
+ <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" />
</VisualStudio>
</ProjectExtensions>
</Project> \ No newline at end of file