MainWindow.xaml 23 KB
<Window x:Class="RoboforkApp.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:s="clr-namespace:RoboforkApp"
        Title="Robofork App"
        ResizeMode="NoResize"  
        WindowState="Maximized"
        FontFamily="SegoeUI">

    <DockPanel Margin="0">

        <Grid Margin="0,5,0,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="210" />
                <ColumnDefinition />
                <ColumnDefinition Width="210" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="1*"></RowDefinition>
                <RowDefinition Height="8*"></RowDefinition>
                <RowDefinition Height="8*"></RowDefinition>
                <RowDefinition Height="8*"></RowDefinition>
                <RowDefinition Height="8*"></RowDefinition>
            </Grid.RowDefinitions>


            <Border Grid.Column="0" Grid.Row="0" BorderBrush="LightGray" Background="MistyRose"
                    BorderThickness="1">
                <Label Content="ROBO FORK" HorizontalAlignment="Center"/>
            </Border>


            <Border BorderBrush="LightGray" Grid.Column="1" Grid.Row="0"
                    BorderThickness="1">
                <Label Content="Route status" HorizontalAlignment="Left"/>
            </Border>


            <Border  Grid.Column="3" Grid.Row="0" BorderBrush="LightGray"  Background="Gainsboro"
                    BorderThickness="1">
                <Label Content="Route, data, info" HorizontalAlignment="Left"/>
            </Border>

            <StackPanel Grid.Row="1" Grid.Column="0" Grid.RowSpan="2">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Button Name="btnSetupRestriction" Tag="SetupRestriction" Grid.Row="0" Grid.Column="0" HorizontalContentAlignment="Stretch" Click="btnMenu_Click">
                        <TextBlock Text="Setup Restriction" TextAlignment="Left"/>
                    </Button>
                    <Button Name="btnSetupRoute" Tag="SetupRoute" Grid.Row="1" Grid.Column="0" HorizontalContentAlignment="Stretch" Click="btnMenu_Click">
                        <TextBlock Text="Setup Route" TextAlignment="Left"/>
                    </Button>
                    <Button Name="btnMakeRoot" Tag="MakeRoot" Grid.Row="2" Grid.Column="0" HorizontalContentAlignment="Stretch" Click="btnMenu_Click">
                        <TextBlock Text="Make Root" TextAlignment="Left"/>
                    </Button>
                    <Button Grid.Row="3" Grid.Column="0" HorizontalContentAlignment="Stretch">
                        <TextBlock Text="Load3D data" TextAlignment="Left"/>
                    </Button>
                    <Button Grid.Row="4" Grid.Column="0" HorizontalContentAlignment="Stretch">
                        <TextBlock Text="Unload 3D data" TextAlignment="Left"/>
                    </Button>
                    <Button Name="btnDeleteRoute" Tag="DeleteRoute" Grid.Row="5" Grid.Column="0" HorizontalContentAlignment="Stretch"  Click="btnMenu_Click">
                        <TextBlock Text="Delete route" TextAlignment="Left"/>
                    </Button>
                    <Button Grid.Row="6" Grid.Column="0" HorizontalContentAlignment="Stretch">
                        <TextBlock Text="Edit route" TextAlignment="Left"/>
                    </Button>

                </Grid>

                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Button Margin="30, 0, 0, 0" Grid.Row="0" Grid.Column="0" HorizontalContentAlignment="Stretch">
                        <TextBlock Text="Load3D data" TextAlignment="Left"/>
                    </Button>
                    <Button Margin="30, 0, 0, 0" Grid.Row="1" Grid.Column="0" HorizontalContentAlignment="Stretch">
                        <TextBlock Text="Unload 3D data" TextAlignment="Left"/>
                    </Button>
                    <Button Margin="30, 0, 0, 0" Grid.Row="2" Grid.Column="0" HorizontalContentAlignment="Stretch">
                        <TextBlock Text="Delete route" TextAlignment="Left"/>
                    </Button>

                    <Button Margin="30, 0, 0, 0" Grid.Row="3" Grid.Column="0" HorizontalContentAlignment="Stretch">
                        <TextBlock Text="Edit route" TextAlignment="Left"/>
                    </Button>

                </Grid>

                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Button Grid.Row="0" Grid.Column="0" Name="btnSetStart"  Tag="SetStart"  HorizontalContentAlignment="Stretch" Content="Set Start" Click="btnMenu_Click"></Button>
                    <Button Grid.Row="1" Grid.Column="0" Name="btnSetGoal" Tag="SetGoal"  HorizontalContentAlignment="Stretch" Content="Set Goal" Click="btnMenu_Click"></Button>
                    <Button Grid.Row="2" Grid.Column="0" Name="btnSetAutoNodes" Tag="SetAutoNodes"  HorizontalContentAlignment="Stretch" Content="Set Auto Nodes" Click="btnMenu_Click"></Button>
                    <Button Grid.Row="3" Grid.Column="0" Name="btnSetFreeNodes" Tag="SetFreeNodes"  HorizontalContentAlignment="Stretch" Content="Set Free Nodes" Click="btnMenu_Click"></Button>
                    <Button Grid.Row="4" Grid.Column="0" Name="btnEditNode" Tag="EditNode"  HorizontalContentAlignment="Stretch" Content="Edit Node" Click="btnMenu_Click"></Button>
                    <Button Grid.Row="5" Grid.Column="0" HorizontalContentAlignment="Stretch" Content="Route simulation"></Button>
                    <Button Grid.Row="6" Grid.Column="0" HorizontalContentAlignment="Stretch" Content="Route data transfer"></Button>

                </Grid>

            </StackPanel>


            <Border Margin="0,0,0,0"
                    Grid.Column="1"
                    Grid.Row="1"
                    Grid.RowSpan="4"
                    Background="WhiteSmoke"
                    BorderBrush="LightGray"
                    BorderThickness="1">


                <s:DesignerCanvas  x:Name="MyDesignerCanvas"
                                          AllowDrop="True"
                                          Background="White" Width="1000" Height="1000">
                    <Canvas.LayoutTransform>
                        <!-- Adjust ScaleX and ScaleY in lock-step to zoom -->
                        <ScaleTransform ScaleX=".8" ScaleY=".8" CenterX=".8" CenterY=".8" />
                    </Canvas.LayoutTransform>

                    <Border
                        Grid.RowSpan="8"
                        Grid.ColumnSpan="8"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Center"
                        BorderThickness="2"
                        Margin="-2 -2 0 0"
                        BorderBrush="Red" Width="1004" Height="1004" />
                    <Grid Name="MCGrid" Width="1000" Height="1000" Background="White" ShowGridLines="True">

                        <Grid.RowDefinitions>
                            <RowDefinition Height="1*"/>
                            <RowDefinition Height="1*"/>
                            <RowDefinition Height="1*"/>
                            <RowDefinition Height="1*"/>
                            <RowDefinition Height="1*"/>
                            <RowDefinition Height="1*"/>
                            <RowDefinition Height="1*"/>
                            <RowDefinition Height="1*"/>
                            <RowDefinition Height="1*"/>
                            <RowDefinition Height="1*"/>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Row="0" Grid.Column="1" Foreground="SkyBlue">100</TextBlock>
                        <TextBlock Grid.Row="0" Grid.Column="2" Foreground="SkyBlue">200</TextBlock>
                        <TextBlock Grid.Row="0" Grid.Column="3" Foreground="SkyBlue">300</TextBlock>
                        <TextBlock Grid.Row="0" Grid.Column="4" Foreground="SkyBlue">400</TextBlock>
                        <TextBlock Grid.Row="0" Grid.Column="5" Foreground="SkyBlue">500</TextBlock>
                        <TextBlock Grid.Row="0" Grid.Column="6" Foreground="SkyBlue">600</TextBlock>
                        <TextBlock Grid.Row="0" Grid.Column="7" Foreground="SkyBlue">700</TextBlock>
                        <TextBlock Grid.Row="0" Grid.Column="8" Foreground="SkyBlue">800</TextBlock>
                        <TextBlock Grid.Row="0" Grid.Column="9" Foreground="SkyBlue">900</TextBlock>

                        <TextBlock Grid.Row="1" Grid.Column="0" Foreground="SkyBlue">100</TextBlock>
                        <TextBlock Grid.Row="2" Grid.Column="0" Foreground="SkyBlue">200</TextBlock>
                        <TextBlock Grid.Row="3" Grid.Column="0" Foreground="SkyBlue">300</TextBlock>
                        <TextBlock Grid.Row="4" Grid.Column="0" Foreground="SkyBlue">400</TextBlock>
                        <TextBlock Grid.Row="5" Grid.Column="0" Foreground="SkyBlue">500</TextBlock>
                        <TextBlock Grid.Row="6" Grid.Column="0" Foreground="SkyBlue">600</TextBlock>
                        <TextBlock Grid.Row="7" Grid.Column="0" Foreground="SkyBlue">700</TextBlock>
                        <TextBlock Grid.Row="8" Grid.Column="0" Foreground="SkyBlue">800</TextBlock>
                        <TextBlock Grid.Row="9" Grid.Column="0" Foreground="SkyBlue">900</TextBlock>
                    </Grid>
                   
                </s:DesignerCanvas>

            </Border>

            <StackPanel Grid.Column="0" Grid.Row="3" VerticalAlignment="Bottom">
                <Border Grid.Column="0"  Background="Gainsboro"
                    BorderBrush="LightGray"
                    BorderThickness="1">
                    <Label Content="FORK LIFT 01" HorizontalAlignment="Center"/>
                </Border>
                <Grid VerticalAlignment="Bottom" >
                    <Grid.RowDefinitions>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="1*"/>
                        <ColumnDefinition Width="6*"/>
                    </Grid.ColumnDefinitions>
                    <Border Grid.Row="0" Grid.Column="0" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="1" Grid.Column="0" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="2" Grid.Column="0" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="3" Grid.Column="0" BorderBrush="LightGray" BorderThickness="1" />


                    <Border Grid.Row="0" Grid.Column="1" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="1" Grid.Column="1" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="2" Grid.Column="1" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="3" Grid.Column="1" BorderBrush="LightGray" BorderThickness="1" />


                    <Label Grid.Row="0"  Grid.Column="0" Content="1" />
                    <Label Grid.Row="1"  Grid.Column="0" Content="2" />
                    <Label Grid.Row="2"  Grid.Column="0" Content="3" />
                    <Label Grid.Row="3"  Grid.Column="0" Content="4" />


                    <Label Grid.Row="0"  Grid.Column="1" Content="Position 123.3443" />
                    <Label Grid.Row="1"  Grid.Column="1" Content="rotate poR" />
                    <Label Grid.Row="2"  Grid.Column="1" Content="move 22.65m" />
                    <Label Grid.Row="3"  Grid.Column="1" Content="check position" />

                </Grid>
            </StackPanel>

            <StackPanel Grid.Column="0" Grid.Row="4">
                <Border Grid.Column="0"  Background="Gainsboro"
                    BorderBrush="LightGray"
                    BorderThickness="1">
                    <Label Content="AREA VIEW" HorizontalAlignment="Center"/>
                </Border>
            </StackPanel>


            <DockPanel  Grid.Column="3" Grid.Row="1" Grid.RowSpan="3">
                <ScrollViewer>
                <Grid Name="grdRouteInfo">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="1*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="1*"/>
                        <ColumnDefinition Width="6*"/>
                    </Grid.ColumnDefinitions>
                    <Border Grid.Row="0" Grid.Column="0" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="1" Grid.Column="0" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="2" Grid.Column="0" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="3" Grid.Column="0" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="4" Grid.Column="0" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="5" Grid.Column="0" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="6" Grid.Column="0" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="7" Grid.Column="0" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="8" Grid.Column="0" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="9" Grid.Column="0" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="10" Grid.Column="0" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="11" Grid.Column="0" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="12" Grid.Column="0" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="13" Grid.Column="0" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="14" Grid.Column="0" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="15" Grid.Column="0" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="16" Grid.Column="0" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="17" Grid.Column="0" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="18" Grid.Column="0" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="19" Grid.Column="0" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="20" Grid.Column="0" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="21" Grid.Column="0" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="22" Grid.Column="0" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="23" Grid.Column="0" BorderBrush="LightGray" BorderThickness="1" />


                    <Border Grid.Row="0" Grid.Column="1" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="1" Grid.Column="1" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="2" Grid.Column="1" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="3" Grid.Column="1" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="4" Grid.Column="1" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="5" Grid.Column="1" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="6" Grid.Column="1" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="7" Grid.Column="1" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="8" Grid.Column="1" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="9" Grid.Column="1" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="10" Grid.Column="1" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="11" Grid.Column="1" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="12" Grid.Column="1" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="13" Grid.Column="1" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="14" Grid.Column="1" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="15" Grid.Column="1" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="16" Grid.Column="1" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="17" Grid.Column="1" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="18" Grid.Column="1" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="19" Grid.Column="1" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="20" Grid.Column="1" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="21" Grid.Column="1" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="22" Grid.Column="1" BorderBrush="LightGray" BorderThickness="1" />
                    <Border Grid.Row="23" Grid.Column="1" BorderBrush="LightGray" BorderThickness="1" />

                    <!--<Label Grid.Row="0"  Grid.Column="0" Content="1" />
                    <Label Grid.Row="1"  Grid.Column="0" Content="2" />
                    <Label Grid.Row="2"  Grid.Column="0" Content="3" />
                    <Label Grid.Row="3"  Grid.Column="0" Content="4" />
                    <Label Grid.Row="4"  Grid.Column="0" Content="5" />
                    <Label Grid.Row="5"  Grid.Column="0" Content="6" />
                    <Label Grid.Row="6"  Grid.Column="0" Content="7" />
                    <Label Grid.Row="7"  Grid.Column="0" Content="8" />
                    <Label Grid.Row="8"  Grid.Column="0" Content="9" />
                    <Label Grid.Row="9"  Grid.Column="0" Content="10" />
                    <Label Grid.Row="10"  Grid.Column="0" Content="11" />
                    <Label Grid.Row="11"  Grid.Column="0" Content="12" />

                    <Label Grid.Row="0"  Grid.Column="1" Content="Position 123.3443" />
                    <Label Grid.Row="1"  Grid.Column="1" Content="rotate poR" />
                    <Label Grid.Row="2"  Grid.Column="1" Content="move 22.65m" />
                    <Label Grid.Row="3"  Grid.Column="1" Content="check position" />
                    <Label Grid.Row="4"  Grid.Column="1" Content="rotate poL" />
                    <Label Grid.Row="5"  Grid.Column="1" Content="move 32m" />
                    <Label Grid.Row="6"  Grid.Column="1" Content="move 32.65m" />
                    <Label Grid.Row="7"  Grid.Column="1" Content="move 32.65m" />
                    <Label Grid.Row="8"  Grid.Column="1" Content="rotate 80L" />
                    <Label Grid.Row="9"  Grid.Column="1" Content="check position" />
                    <Label Grid.Row="10"  Grid.Column="1" Content="submit" />
                    <Label Grid.Row="11"  Grid.Column="1" Content="xxx" />-->
                </Grid>
                    </ScrollViewer>
            </DockPanel >
            <StackPanel Grid.Column="3" Grid.Row="4">
                <Border BorderBrush="LightGray"  Background="Gainsboro"
                    BorderThickness="1">
                    <Label Content="MOVE VIEW" HorizontalAlignment="Center"/>
                </Border>
            </StackPanel>
        </Grid>
    </DockPanel>
</Window>