aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/Views/MenuView.xaml
blob: b7f37b022082548cb4a875c4b1e6abfbc02ba39b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<UserControl x:Class="Tango.MachineStudio.Synchronization.Views.MenuView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:Tango.MachineStudio.Synchronization.Views"
             xmlns:global="clr-namespace:Tango.MachineStudio.Synchronization"
             mc:Ignorable="d" 
             d:DesignHeight="720" d:DesignWidth="1280" DataContext="{x:Static global:ViewModelLocator.MenuViewVM}">
    <Grid>
        <Grid>
            <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>

                    <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>

                                        <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>

                                        <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>
            </Viewbox>
        </Grid>
    </Grid>
</UserControl>
mmary> /// Gets/Sets the visual column number. /// Can be -1 (meaning unknown visual column). /// </summary> public int VisualColumn { get { return visualColumn; } set { visualColumn = value; } } /// <summary> /// Creates a new TextViewPosition instance. /// </summary> public TextViewPosition(int line, int column, int visualColumn) { this.line = line; this.column = column; this.visualColumn = visualColumn; } /// <summary> /// Creates a new TextViewPosition instance. /// </summary> public TextViewPosition(int line, int column) : this(line, column, -1) { } /// <summary> /// Creates a new TextViewPosition instance. /// </summary> public TextViewPosition(TextLocation location, int visualColumn) { this.line = location.Line; this.column = location.Column; this.visualColumn = visualColumn; } /// <summary> /// Creates a new TextViewPosition instance. /// </summary> public TextViewPosition(TextLocation location) : this(location, -1) { } /// <inheritdoc/> public override string ToString() { return string.Format(CultureInfo.InvariantCulture, "[TextViewPosition Line={0} Column={1} VisualColumn={2}]", this.line, this.column, this.visualColumn); } /// <summary> /// Implicit conversion to <see cref="TextLocation"/>. /// </summary> [Obsolete("Use the Location property instead of the implicit conversion to TextLocation")] public static implicit operator TextLocation(TextViewPosition position) { return new TextLocation(position.Line, position.Column); } #region Equals and GetHashCode implementation // The code in this region is useful if you want to use this structure in collections. // If you don't need it, you can just remove the region and the ": IEquatable<Struct1>" declaration. /// <inheritdoc/> public override bool Equals(object obj) { if (obj is TextViewPosition) return Equals((TextViewPosition)obj); // use Equals method below else return false; } /// <inheritdoc/> public override int GetHashCode() { int hashCode = 0; unchecked { hashCode += 1000000007 * Line.GetHashCode(); hashCode += 1000000009 * Column.GetHashCode(); hashCode += 1000000021 * VisualColumn.GetHashCode(); } return hashCode; } /// <summary> /// Equality test. /// </summary> public bool Equals(TextViewPosition other) { return this.Line == other.Line && this.Column == other.Column && this.VisualColumn == other.VisualColumn; } /// <summary> /// Equality test. /// </summary> public static bool operator ==(TextViewPosition left, TextViewPosition right) { return left.Equals(right); } /// <summary> /// Inequality test. /// </summary> public static bool operator !=(TextViewPosition left, TextViewPosition right) { return !(left.Equals(right)); // use operator == and negate result } #endregion } }