aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-01-08 14:37:29 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-01-08 14:37:29 +0200
commit0ec56a54ca0c64a2f7ba402a1b99b3c217cd5ae5 (patch)
treefde0d6465b2246c297278904f666909c229b35dd /Software/Visual_Studio/MachineStudio
parentf7cd23fa57b58bf86b71cae469f37c03913a9a80 (diff)
downloadTango-0ec56a54ca0c64a2f7ba402a1b99b3c217cd5ae5.tar.gz
Tango-0ec56a54ca0c64a2f7ba402a1b99b3c217cd5ae5.zip
Implemented auto scaling of machine studio to screen resolution.
Modified machine connection icons again. Added Embedded device name to settings. Added port USB and TCP to settings.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/StubManager.cs8
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/ViewModels/MainViewVM.cs32
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Views/MainView.xaml37
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Views/MainView.xaml.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/Views/MenuView.xaml122
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Images/external-bridge-tcp.pngbin10187 -> 3618 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Images/external-bridge-usb.pngbin9573 -> 3623 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml43
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml81
10 files changed, 195 insertions, 132 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/StubManager.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/StubManager.cs
index 8e0eafa3a..5b30b0cd3 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/StubManager.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/StubManager.cs
@@ -20,7 +20,7 @@ namespace Tango.MachineStudio.Stubs
/// </summary>
public class StubManager
{
- private ITransportAdapter _adapter; //Holds the USB transport adapter.
+ public ITransportAdapter Adapter { get; private set; }
/// <summary>
/// Occurs when the stub has failed to execute.
@@ -48,7 +48,7 @@ namespace Tango.MachineStudio.Stubs
/// <param name="adapter">The adapter.</param>
public StubManager(ITransportAdapter adapter)
{
- _adapter = adapter;
+ Adapter = adapter;
}
/// <summary>
@@ -121,13 +121,13 @@ namespace Tango.MachineStudio.Stubs
Task.Factory.StartNew(() =>
{
- _adapter.Write(requestData);
+ Adapter.Write(requestData);
DateTime startTime = DateTime.Now;
MessageContainer responseContainer = null;
- _adapter.DataAvailable += (sender, data) =>
+ Adapter.DataAvailable += (sender, data) =>
{
responseContainer = MessageFactory.ParseContainer(data);
};
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/ViewModels/MainViewVM.cs
index 48297c418..2490f9cb3 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/ViewModels/MainViewVM.cs
@@ -24,7 +24,7 @@ namespace Tango.MachineStudio.Stubs.ViewModels
/// Represents the script execution utility main view model.
/// </summary>
/// <seealso cref="Tango.SharedUI.ViewModel" />
- public class MainViewVM : ViewModel
+ public class MainViewVM : ViewModel , IShutdownRequestBlocker
{
private UsbTransportAdapter _adapter; //Holds the USB transport adapter.
private StubManager _stubManager;
@@ -41,7 +41,19 @@ namespace Tango.MachineStudio.Stubs.ViewModels
public bool UseConnectedMachine
{
get { return _useConnectedMachine; }
- set { _useConnectedMachine = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); }
+ set
+ {
+ _useConnectedMachine = value;
+
+ if (_useConnectedMachine && !ApplicationManager.IsMachineConnected)
+ {
+ _notification.ShowError("No connected machine found.");
+ _useConnectedMachine = false;
+ }
+
+ RaisePropertyChangedAuto();
+ InvalidateRelayCommands();
+ }
}
/// <summary>
@@ -251,13 +263,13 @@ namespace Tango.MachineStudio.Stubs.ViewModels
"COM9",
};
- SelectedPort = SettingsManager.Default.StubsUI.SelectedPort != null ? SettingsManager.Default.StubsUI.SelectedPort : Ports.First();
+ SelectedPort = SettingsManager.Default.MachineStudio.StubsModule.SelectedPort != null ? SettingsManager.Default.MachineStudio.StubsModule.SelectedPort : Ports.First();
Status = "Ready";
- if (SettingsManager.Default.StubsUI.LastTabs.Count > 0)
+ if (SettingsManager.Default.MachineStudio.StubsModule.LastTabs.Count > 0)
{
- foreach (var file in SettingsManager.Default.StubsUI.LastTabs)
+ foreach (var file in SettingsManager.Default.MachineStudio.StubsModule.LastTabs)
{
if (File.Exists(file))
{
@@ -269,8 +281,6 @@ namespace Tango.MachineStudio.Stubs.ViewModels
{
CreateNewTab();
}
-
- Application.Current.Exit += Current_Exit;
}
#endregion
@@ -513,11 +523,17 @@ namespace Tango.MachineStudio.Stubs.ViewModels
Status = "Completed";
}
- private void Current_Exit(object sender, ExitEventArgs e)
+ /// <summary>
+ /// Called when [shutdown request].
+ /// </summary>
+ /// <returns></returns>
+ public Task<bool> OnShutdownRequest()
{
SettingsManager.Default.MachineStudio.StubsModule.SelectedPort = SelectedPort;
SettingsManager.Default.MachineStudio.StubsModule.LastTabs = CodeTabs.Select(x => x.File).ToList();
SettingsManager.SaveDefaultSettings();
+
+ return Task.FromResult(true);
}
#endregion
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Views/MainView.xaml
index 7f6039110..f1254db47 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Views/MainView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Views/MainView.xaml
@@ -199,7 +199,42 @@
<Grid>
<TabControl x:Name="tabControl" Margin="5" ItemsSource="{Binding CodeTabs}" SelectedItem="{Binding SelectedCodeTab}">
-
+ <TabControl.Resources>
+ <Style BasedOn="{StaticResource MetroTabItem}" TargetType="{x:Type TabItem}">
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self},Path=IsSelected}" Value="True">
+ <Setter Property="Background" Value="#007ACC"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ <Setter Property="mahapps:ControlsHelper.HeaderFontSize" Value="12"></Setter>
+ <Setter Property="HeaderTemplate">
+ <Setter.Value>
+ <DataTemplate>
+ <Border>
+ <StackPanel Orientation="Horizontal">
+ <mahapps:ProgressRing Width="5" Height="5" Margin="0 0 5 0" Foreground="White" Visibility="{Binding IsRunning,Converter={StaticResource BooleanToVisibilityConverter}}"></mahapps:ProgressRing>
+ <TextBlock Text="{Binding Title}" ToolTip="{Binding File}" Foreground="Gainsboro" VerticalAlignment="Center"></TextBlock>
+ <Button Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.CloseTabCommand}" CommandParameter="{Binding}" Margin="5 0 0 0" Cursor="Hand" Width="24" Height="24" VerticalAlignment="Center" Style="{DynamicResource MetroCircleButtonStyle}" mahapps:ButtonHelper.PreserveTextCase="True" BorderThickness="0">
+ <StackPanel Orientation="Horizontal">
+ <fa:ImageAwesome Width="10" Height="10" Icon="Close" Foreground="Gainsboro"></fa:ImageAwesome>
+ </StackPanel>
+ </Button>
+ </StackPanel>
+ </Border>
+ </DataTemplate>
+ </Setter.Value>
+ </Setter>
+ <Setter Property="ContentTemplate">
+ <Setter.Value>
+ <DataTemplate>
+ <Grid Background="#181818">
+ <controls:ScriptEditorControl Text="{Binding Code,Mode=TwoWay}" InsertSnippetCommand="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.InsertSnippetCommand,Mode=TwoWay}" SaveCommand="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.SaveCommand}" HighlightTypes="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.HighlightTypes}" RunCommand="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.RunCommand}" StopCommand="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.StopCommand}" />
+ </Grid>
+ </DataTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+ </TabControl.Resources>
</TabControl>
<Grid HorizontalAlignment="Right" Margin="0 45 40 0" VerticalAlignment="Top" Visibility="{Binding IsRunning,Converter={StaticResource BooleanToVisibilityConverter}}">
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Views/MainView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Views/MainView.xaml.cs
index 5eee980de..16de196e1 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Views/MainView.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Views/MainView.xaml.cs
@@ -32,7 +32,7 @@ namespace Tango.MachineStudio.Stubs.Views
private void MainView_Loaded(object sender, RoutedEventArgs e)
{
- ServiceLocator.Current.GetInstance<MainViewVM>().CodeTabs.RemoveAt(0);
+ //ServiceLocator.Current.GetInstance<MainViewVM>().CodeTabs.RemoveAt(0);
}
//Auto scroll to bottom of response log each time it is changed.
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/Views/MenuView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/Views/MenuView.xaml
index 67501743b..b7f37b022 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/Views/MenuView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/Views/MenuView.xaml
@@ -10,74 +10,76 @@
d:DesignHeight="720" d:DesignWidth="1280" DataContext="{x:Static global:ViewModelLocator.MenuViewVM}">
<Grid>
<Grid>
- <UniformGrid Columns="3">
- <Grid VerticalAlignment="Center">
- <StackPanel>
- <StackPanel HorizontalAlignment="Center" Margin="0 0 0 30">
- <TextBlock TextAlignment="Center" FontSize="25">Local Synchronization</TextBlock>
- <TextBlock TextAlignment="Center" FontSize="14" Foreground="#303030">Synchronize two SQLite local database files.</TextBlock>
- </StackPanel>
- <Viewbox RenderOptions.BitmapScalingMode="Fant" Width="400">
- <Grid Width="450">
- <StackPanel>
- <StackPanel Orientation="Horizontal">
- <Image Source="../Images/sqlite.png" Width="160"></Image>
- <Image Source="../Images/arrow_right.png" Width="100" RenderTransformOrigin="0.5,0.5"></Image>
- <Image Source="../Images/sqlite.png" Width="130"></Image>
+ <Viewbox MaxWidth="1600">
+ <UniformGrid Columns="3">
+ <Grid VerticalAlignment="Center">
+ <StackPanel>
+ <StackPanel HorizontalAlignment="Center" Margin="0 0 0 30">
+ <TextBlock TextAlignment="Center" FontSize="25">Local Synchronization</TextBlock>
+ <TextBlock TextAlignment="Center" FontSize="14" Foreground="#303030">Synchronize two SQLite local database files.</TextBlock>
+ </StackPanel>
+ <Viewbox RenderOptions.BitmapScalingMode="Fant" Width="400">
+ <Grid Width="450">
+ <StackPanel>
+ <StackPanel Orientation="Horizontal">
+ <Image Source="../Images/sqlite.png" Width="160"></Image>
+ <Image Source="../Images/arrow_right.png" Width="100" RenderTransformOrigin="0.5,0.5"></Image>
+ <Image Source="../Images/sqlite.png" Width="130"></Image>
+ </StackPanel>
+
+ <Button Command="{Binding StartLocalSyncCommand}" Height="80" Margin="0 20 0 0" HorizontalAlignment="Center" Padding="10" FontSize="20" Width="200">START</Button>
</StackPanel>
+ </Grid>
+ </Viewbox>
+ </StackPanel>
+ </Grid>
- <Button Command="{Binding StartLocalSyncCommand}" Height="80" Margin="0 20 0 0" HorizontalAlignment="Center" Padding="10" FontSize="20" Width="200">START</Button>
- </StackPanel>
- </Grid>
- </Viewbox>
- </StackPanel>
- </Grid>
+ <Grid VerticalAlignment="Center">
+ <StackPanel>
+ <StackPanel HorizontalAlignment="Center" Margin="0 0 0 30">
+ <TextBlock TextAlignment="Center" FontSize="25">Direct Remote Synchronization</TextBlock>
+ <TextBlock TextAlignment="Center" FontSize="14" Foreground="#303030">Connect and synchronized a Tango machine over the network.</TextBlock>
+ </StackPanel>
+ <Viewbox RenderOptions.BitmapScalingMode="Fant" Width="400">
+ <Grid Width="450">
+ <StackPanel>
+ <StackPanel Orientation="Horizontal">
+ <Image Source="../Images/remote-db.png" Width="200"></Image>
+ <Image Source="../Images/arrow_right.png" Width="100"></Image>
+ <Image Source="../Images/machine-trans.png" Width="120"></Image>
+ </StackPanel>
- <Grid VerticalAlignment="Center">
- <StackPanel>
- <StackPanel HorizontalAlignment="Center" Margin="0 0 0 30">
- <TextBlock TextAlignment="Center" FontSize="25">Direct Remote Synchronization</TextBlock>
- <TextBlock TextAlignment="Center" FontSize="14" Foreground="#303030">Connect and synchronized a Tango machine over the network.</TextBlock>
- </StackPanel>
- <Viewbox RenderOptions.BitmapScalingMode="Fant" Width="400">
- <Grid Width="450">
- <StackPanel>
- <StackPanel Orientation="Horizontal">
- <Image Source="../Images/remote-db.png" Width="200"></Image>
- <Image Source="../Images/arrow_right.png" Width="100"></Image>
- <Image Source="../Images/machine-trans.png" Width="120"></Image>
+ <Button Command="{Binding StartDirectRemoteSyncCommand}" Height="80" Margin="0 20 0 0" HorizontalAlignment="Center" Padding="10" FontSize="20" Width="200">START</Button>
</StackPanel>
+ </Grid>
+ </Viewbox>
+ </StackPanel>
+ </Grid>
- <Button Command="{Binding StartDirectRemoteSyncCommand}" Height="80" Margin="0 20 0 0" HorizontalAlignment="Center" Padding="10" FontSize="20" Width="200">START</Button>
- </StackPanel>
- </Grid>
- </Viewbox>
- </StackPanel>
- </Grid>
+ <Grid VerticalAlignment="Center">
+ <StackPanel>
+ <StackPanel HorizontalAlignment="Center" Margin="0 0 0 30">
+ <TextBlock TextAlignment="Center" FontSize="25">Semi Remote Synchronization</TextBlock>
+ <TextBlock TextAlignment="Center" FontSize="14" Foreground="#303030">Synchronize local SQLite database file with the remote Twine database.</TextBlock>
+ </StackPanel>
+ <Viewbox RenderOptions.BitmapScalingMode="Fant" Width="400">
+ <Grid Width="450">
+ <StackPanel>
+ <StackPanel Orientation="Horizontal">
+ <Image Source="../Images/remote-db.png" Width="200"></Image>
+ <Image Source="../Images/arrow_right.png" Width="100"></Image>
+ <Image Source="../Images/sqlite.png" Width="120"></Image>
+ </StackPanel>
- <Grid VerticalAlignment="Center">
- <StackPanel>
- <StackPanel HorizontalAlignment="Center" Margin="0 0 0 30">
- <TextBlock TextAlignment="Center" FontSize="25">Semi Remote Synchronization</TextBlock>
- <TextBlock TextAlignment="Center" FontSize="14" Foreground="#303030">Synchronize local SQLite database file with the remote Twine database.</TextBlock>
- </StackPanel>
- <Viewbox RenderOptions.BitmapScalingMode="Fant" Width="400">
- <Grid Width="450">
- <StackPanel>
- <StackPanel Orientation="Horizontal">
- <Image Source="../Images/remote-db.png" Width="200"></Image>
- <Image Source="../Images/arrow_right.png" Width="100"></Image>
- <Image Source="../Images/sqlite.png" Width="120"></Image>
+ <Button Command="{Binding StartRemoteSyncCommand}" Height="80" Margin="0 20 0 0" HorizontalAlignment="Center" Padding="10" FontSize="20" Width="200">START</Button>
</StackPanel>
+ </Grid>
+ </Viewbox>
+ </StackPanel>
+ </Grid>
- <Button Command="{Binding StartRemoteSyncCommand}" Height="80" Margin="0 20 0 0" HorizontalAlignment="Center" Padding="10" FontSize="20" Width="200">START</Button>
- </StackPanel>
- </Grid>
- </Viewbox>
- </StackPanel>
- </Grid>
-
- </UniformGrid>
+ </UniformGrid>
+ </Viewbox>
</Grid>
</Grid>
</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Images/external-bridge-tcp.png b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Images/external-bridge-tcp.png
index 2d8c684b7..192cbcaa7 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Images/external-bridge-tcp.png
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Images/external-bridge-tcp.png
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Images/external-bridge-usb.png b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Images/external-bridge-usb.png
index 62fab6225..414bbab04 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Images/external-bridge-usb.png
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Images/external-bridge-usb.png
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml
index f07e7f476..83f41b785 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml
@@ -8,27 +8,32 @@
xmlns:views="clr-namespace:Tango.MachineStudio.UI.Views"
xmlns:sharedControls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
mc:Ignorable="d"
- Title="Tango" Height="720" Width="1280" WindowStartupLocation="CenterOwner" WindowState="Maximized" Foreground="#494949">
+ Title="Tango" Height="800" Width="1280" WindowStartupLocation="CenterOwner" WindowState="Maximized" Foreground="#494949" BorderThickness="1" BorderBrush="{StaticResource AccentColorBrush}">
+
<Grid>
- <sharedControls:MultiTransitionControl AlwaysFade="True" TransitionType="Zoom" x:Name="TransitionControl" x:FieldModifier="public">
- <sharedControls:MultiTransitionControl.Controls>
- <ContentControl Tag="LoadingView">
- <views:LoadingView></views:LoadingView>
- </ContentControl>
- <ContentControl Tag="LoginView">
- <views:LoginView></views:LoginView>
- </ContentControl>
- <ContentControl Tag="MainView">
- <views:MainView></views:MainView>
- </ContentControl>
- <ContentControl Tag="ShutdownView">
- <views:ShutdownView></views:ShutdownView>
- </ContentControl>
- </sharedControls:MultiTransitionControl.Controls>
- </sharedControls:MultiTransitionControl>
+ <Viewbox Stretch="Fill" UseLayoutRounding="True" SnapsToDevicePixels="True">
+ <Grid Width="1920" Height="1145">
+ <sharedControls:MultiTransitionControl AlwaysFade="True" TransitionType="Zoom" x:Name="TransitionControl" x:FieldModifier="public">
+ <sharedControls:MultiTransitionControl.Controls>
+ <ContentControl Tag="LoadingView">
+ <views:LoadingView></views:LoadingView>
+ </ContentControl>
+ <ContentControl Tag="LoginView">
+ <views:LoginView></views:LoginView>
+ </ContentControl>
+ <ContentControl Tag="MainView">
+ <views:MainView></views:MainView>
+ </ContentControl>
+ <ContentControl Tag="ShutdownView">
+ <views:ShutdownView></views:ShutdownView>
+ </ContentControl>
+ </sharedControls:MultiTransitionControl.Controls>
+ </sharedControls:MultiTransitionControl>
- <Grid Background="Black" Opacity="0.7" x:Name="shadowGrid" Visibility="Hidden">
+ <Grid Background="Black" Opacity="0.7" x:Name="shadowGrid" Visibility="Hidden">
- </Grid>
+ </Grid>
+ </Grid>
+ </Viewbox>
</Grid>
</mahapps:MetroWindow>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs
index b21b23935..b08c259af 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs
@@ -184,7 +184,7 @@ namespace Tango.MachineStudio.UI.ViewModels
}
else
{
- using (NotificationProvider.PushTaskItem("Connecting to machine " + x.SelectedMachine.Device + "..."))
+ using (NotificationProvider.PushTaskItem("Connecting to " + x.SelectedMachine.Device + "..."))
{
try
{
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml
index d7d0f8dc3..616187288 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml
@@ -135,10 +135,10 @@
</Button.Background>-->
<StackPanel Orientation="Horizontal">
<TextBlock Text="Machine Connection" VerticalAlignment="Center" Foreground="White"></TextBlock>
- <materialDesign:PackIcon Margin="10 0 0 0" Width="16" Height="16">
+ <materialDesign:PackIcon Margin="10 0 0 0" Width="24" Height="24">
<materialDesign:PackIcon.Style>
<Style TargetType="materialDesign:PackIcon">
- <Setter Property="Foreground" Value="#FF6767"></Setter>
+ <Setter Property="Foreground" Value="#333333"></Setter>
<Setter Property="Kind" Value="LanDisconnect"></Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding ApplicationManager.IsMachineConnected,Mode=OneWay}" Value="True">
@@ -175,43 +175,48 @@
<TextBlock HorizontalAlignment="Right" Margin="0 5 -130 0" FontStyle="Italic" Style="{StaticResource MaterialDesignSubheadingTextBlock}" Foreground="{StaticResource AccentColorBrush}">Select Your Studio Module...</TextBlock>
</StackPanel>
</Grid>
- <ItemsControl ItemsSource="{Binding StudioModuleLoader.UserModules}" Grid.Row="2" Margin="10">
- <ItemsControl.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel IsItemsHost="True"></WrapPanel>
- </ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <materialDesign:Card Width="300" Margin="10" Height="400">
- <Grid >
- <Grid.RowDefinitions>
- <RowDefinition Height="180" />
- <RowDefinition Height="*" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
- <Image Source="{Binding Image,Mode=OneWay}" Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" />
- <Button Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.StartModuleCommand}" CommandParameter="{Binding}" Grid.Row="0" Margin="0,0,20,-35" HorizontalAlignment="Right" Width="70" Height="70" VerticalAlignment="Bottom" Style="{StaticResource MaterialDesignFloatingActionMiniButton}" ToolTip="Start This Module">
- <materialDesign:PackIcon Kind="Play" Width="30" Height="30" />
- </Button>
- <StackPanel Grid.Row="1" Margin="8,24,8,0">
- <TextBlock FontWeight="Bold" FontSize="20" Text="{Binding Name,Mode=OneWay}"></TextBlock>
- <TextBlock VerticalAlignment="Center" Margin="0 5 0 0" FontSize="14" TextWrapping="Wrap" Text="{Binding Description,Mode=OneWay}"></TextBlock>
- </StackPanel>
- <StackPanel Grid.Row="2" Margin="8" HorizontalAlignment="Right" Orientation="Horizontal">
- <materialDesign:PopupBox Padding="2,0,2,0" Style="{StaticResource MaterialDesignToolPopupBox}">
- <StackPanel>
- <Button Content="More" />
- <Button Content="Options" />
+ <Grid Grid.Row="2">
+ <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
+ <ItemsControl ItemsSource="{Binding StudioModuleLoader.UserModules}" Margin="10">
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <WrapPanel IsItemsHost="True"></WrapPanel>
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <materialDesign:Card Width="300" Margin="10" Height="400">
+ <Grid >
+ <Grid.RowDefinitions>
+ <RowDefinition Height="180" />
+ <RowDefinition Height="*" />
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+ <Image Source="{Binding Image,Mode=OneWay}" Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" />
+ <Button Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.StartModuleCommand}" CommandParameter="{Binding}" Grid.Row="0" Margin="0,0,20,-35" HorizontalAlignment="Right" Width="70" Height="70" VerticalAlignment="Bottom" Style="{StaticResource MaterialDesignFloatingActionMiniButton}" ToolTip="Start This Module">
+ <materialDesign:PackIcon Kind="Play" Width="30" Height="30" />
+ </Button>
+ <StackPanel Grid.Row="1" Margin="8,24,8,0">
+ <TextBlock FontWeight="Bold" FontSize="20" Text="{Binding Name,Mode=OneWay}"></TextBlock>
+ <TextBlock VerticalAlignment="Center" Margin="0 5 0 0" FontSize="14" TextWrapping="Wrap" Text="{Binding Description,Mode=OneWay}"></TextBlock>
+ </StackPanel>
+ <StackPanel Grid.Row="2" Margin="8" HorizontalAlignment="Right" Orientation="Horizontal">
+ <materialDesign:PopupBox Padding="2,0,2,0" Style="{StaticResource MaterialDesignToolPopupBox}">
+ <StackPanel>
+ <Button Content="More" />
+ <Button Content="Options" />
+ </StackPanel>
+ </materialDesign:PopupBox>
</StackPanel>
- </materialDesign:PopupBox>
- </StackPanel>
- </Grid>
- </materialDesign:Card>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
+ </Grid>
+ </materialDesign:Card>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ </ScrollViewer>
+ </Grid>
</Grid>
<Grid Grid.Row="1" RenderTransformOrigin="0.5,0.5">
@@ -289,7 +294,7 @@
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="20 0 0 0">
<mahapps:ProgressRing Width="24" Height="24" Foreground="White"></mahapps:ProgressRing>
- <TextBlock Text="{Binding NotificationProvider.CurrentTaskItem.Message}" Foreground="White" VerticalAlignment="Center" Margin="10 0 0 0"></TextBlock>
+ <TextBlock Text="{Binding NotificationProvider.CurrentTaskItem.Message}" Foreground="White" VerticalAlignment="Center" Margin="10 0 0 0" TextWrapping="Wrap"></TextBlock>
</StackPanel>
</Border>
</Grid>