aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Console/CodeTemplate.cs
blob: 4b307051f15f42374e8485c50fce19d36046b017 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using System;
using System.Text;
using System.Linq;
using System.Drawing;
using System.Diagnostics;
using System.Windows.Forms;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
using Tango.MachineStudio.Common.Notifications;
using Tango.MachineStudio.UI.Console;

public void OnExecute(ConsoleManager manager)
{
    manager.InvokeUI(() =>
    {

        var notification = manager.TangoIOC.GetInstance<INotificationProvider>();
        notification.ShowInfo("Hello world!");

    });
}
ources> <Grid> <Grid> <Grid.RowDefinitions> <RowDefinition Height="80"/> <RowDefinition Height="1*"/> </Grid.RowDefinitions> <Grid> <StackPanel Orientation="Horizontal" Margin="10"> <Image Source="/Images/machine-trans.png" RenderOptions.BitmapScalingMode="Fant"></Image> <TextBlock Text="Virtual Machine" VerticalAlignment="Center" Margin="10 0 0 0" FontSize="20"></TextBlock> </StackPanel> </Grid> <Grid Grid.Row="1" Margin="10 0 10 10"> <Grid.RowDefinitions> <RowDefinition Height="1*"/> <RowDefinition Height="50"/> </Grid.RowDefinitions> <Grid> <StackPanel Margin="0 10 0 0" > <TextBlock TextWrapping="Wrap"> <Run>Connecting directly to a machine's embedded firmware requires the selection of an existing machine from the database in order for machine studio to function properly.</Run> <LineBreak/> <LineBreak/> <Run>Please select a 'virtual machine' by entering the machine serial number</Run> </TextBlock> <StackPanel Orientation="Horizontal" Margin="0 20 0 0" Width="300" HorizontalAlignment="Left"> <materialDesign:PackIcon Kind="BarcodeScan" VerticalAlignment="Bottom" Width="24" Height="24" /> <autoComplete:AutoCompleteTextBox HorizontalContentAlignment="Stretch" Width="300" Margin="10 0 0 0" FontSize="16" Provider="{StaticResource MachinesProvider}" SelectedItem="{Binding SelectedMachine,Mode=TwoWay}" materialDesign:HintAssist.Hint="Serial Number / Name" DisplayMember="SerialNumber"> <autoComplete:AutoCompleteTextBox.ItemTemplate> <DataTemplate> <Border Padding="5"> <DockPanel LastChildFill="False" Width="250"> <StackPanel Orientation="Horizontal" DockPanel.Dock="Left"> <Image Source="/Images/machine-trans.png" Width="24" RenderOptions.BitmapScalingMode="Fant" /> <TextBlock Margin="10 0 0 0" FontWeight="SemiBold" Text="{Binding SerialNumber}" VerticalAlignment="Center"></TextBlock> </StackPanel> <TextBlock DockPanel.Dock="Right" HorizontalAlignment="Right" Text="{Binding Name}" Foreground="Gray" VerticalAlignment="Center"></TextBlock> </DockPanel> </Border> </DataTemplate> </autoComplete:AutoCompleteTextBox.ItemTemplate> </autoComplete:AutoCompleteTextBox> </StackPanel> </StackPanel> </Grid> <Grid Grid.Row="1"> <Button HorizontalAlignment="Right" Width="140" Command="{Binding OKCommand}">CONNECT</Button> </Grid> </Grid> </Grid> </Grid> </UserControl>