RoboforkMenu.xaml 26.5 KB
<Window x:Class="RoboforkApp.RoboforkMenu"
        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"  
        WindowStartupLocation="CenterScreen"
        Height="1000" Width="1300">
    <Grid ShowGridLines="False" Margin="20,20,20,20">

        <Grid.RowDefinitions>
            <RowDefinition Height="0.8*"/>
            <RowDefinition Height="10*"/>
        </Grid.RowDefinitions>
        <Border Grid.Row="0" BorderThickness="1" BorderBrush="Gray" Margin="0,0,0,5">
            <Grid ShowGridLines="False">
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Label Grid.Row="0" Content="Autonomous Planning Tool" Margin="10,0,0,0" 
                                            FontSize="16"/>
            </Grid>
        </Border>

        <Grid ShowGridLines="False" Grid.Row="1">

            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="1.2*"/>
                <ColumnDefinition Width="20"/>
                <ColumnDefinition Width="3*"/>
            </Grid.ColumnDefinitions>

            <Grid ShowGridLines="False" Grid.Column="0">
                <Grid.RowDefinitions>
                    <RowDefinition Height="3*"/>
                    <RowDefinition Height="1*"/>
                </Grid.RowDefinitions>
                <Border Grid.Row="0" BorderThickness="1" BorderBrush="White" Margin="0,0,0,5">
                    <TreeView >
                        <TreeViewItem IsExpanded="True" Header="Project [AAA工場]"      FontSize="17" >
                            <TreeViewItem IsExpanded="True" Header="MAP"      FontSize="17">
                                <TreeViewItem Header="Pass plan" FontSize="17" Name="PassplanTree" Selected="btnMenu_Selected" Unselected="btnMenu_UnselectedSet" Tag="PassplanTree">
                                    <TreeViewItem Header="Set Start" FontSize="17" Name="btnSetStart" Selected="btnMenu_Selected" Unselected="btnMenu_UnselectedSet" Tag="SetStart"></TreeViewItem>
                                    <TreeViewItem Header="Set Goal" FontSize="17" Name="btnSetGoal" Selected="btnMenu_Selected" Unselected="btnMenu_UnselectedSet" Tag="SetGoal"></TreeViewItem>
                                    <TreeViewItem Header="Set Route" FontSize="17" Name="btnSetRoute" Selected="btnMenu_Selected" Unselected="btnMenu_UnselectedSet" Tag="SetupRoute"></TreeViewItem>
                                    <TreeViewItem Header="Make Root" FontSize="17" Name="btnMakeRoot" Selected="btnMenu_Selected" Unselected="btnMenu_UnselectedSet" Tag="MakeRoot"></TreeViewItem>
                                    <TreeViewItem Header="Delete Route" FontSize="17" Name="btnDeleteRoute" Selected="btnMenu_Selected" Unselected="btnMenu_UnselectedSet" Tag="DeleteRoute"></TreeViewItem>
                                </TreeViewItem>
                                <TreeViewItem IsExpanded="True" Header="Node" FontSize="17" Name="NodeTree" Selected="btnMenu_Selected" Unselected="btnMenu_UnselectedSet" Tag="NodeTree">
                                </TreeViewItem>
                                <TreeViewItem Header="--------------------"      FontSize="17">
                                </TreeViewItem>
                            </TreeViewItem>

                            <TreeViewItem Header="Vehicle"      FontSize="17">
                                <TreeViewItem Header="FK15_#1"
                                                  FontSize="17"
                                              Name="FK15Tree" 
                                              Selected="GetFK15Tree"
                                              Unselected="SetFK15Tree">
                                </TreeViewItem>
                                <TreeViewItem Header="[+]"
                                                  FontSize="17"
                                              Name="VehicleAddTree" 
                                              Selected="GetVehicleAddTree"
                                              Unselected="SetVehicleAddTree">
                                </TreeViewItem>
                                <TreeViewItem Header="--------------------">
                                </TreeViewItem>
                            </TreeViewItem>

                            <TreeViewItem Header="Work"
                                                  FontSize="17">
                                <TreeViewItem Header="Task patterm [FK15_#1]"
                                                  FontSize="17"
                                              Name="TaskpattermTree" 
                                              Selected="GetTaskpattermTree"
                                              Unselected="SetTaskpattermTree">
                                </TreeViewItem>
                                <TreeViewItem Header="[+]"
                                                  FontSize="17"
                                              Name="WorkAddTree" 
                                              Selected="GetWorkAddTree"
                                              Unselected="SetWorkAddTree">
                                </TreeViewItem>
                                <TreeViewItem Header="--------------------"
                                                  FontSize="17">
                                </TreeViewItem>
                            </TreeViewItem>

                            <TreeViewItem Header="Setting"
                                                  FontSize="17">
                                <TreeViewItem Header="Connect [Wi-Fi]"
                                                  FontSize="17"
                                              Name="ConnectTree" 
                                              Selected="GetConnectTree"
                                              Unselected="SetConnectTree">
                                </TreeViewItem>
                                <TreeViewItem Header="Parameter"
                                                  FontSize="17"
                                              Name="ParameterTree" 
                                              Selected="GetParameterTree"
                                              Unselected="SetParameterTree">
                                </TreeViewItem>
                                <TreeViewItem Header="--------------------"
                                                  FontSize="17">
                                </TreeViewItem>
                            </TreeViewItem>
                            <TreeViewItem Header="Schedule" FontSize="17" Name="ScheduleTree" Selected="btnMenu_Selected" Unselected="btnMenu_UnselectedSet" Tag="ScheduleRoute"></TreeViewItem>
                            <TreeViewItem Header="Logging"
                                                  FontSize="17"
                                              Name="LoggingTree" 
                                              Selected="GetLoggingTree"
                                              Unselected="SetLoggingTree">
                            </TreeViewItem>
                            <TreeViewItem Header="     --------------------">
                            </TreeViewItem>
                        </TreeViewItem>
                        <TreeViewItem Header="Alert"
                                            FontSize="17"
                                        Name="AlertTree" 
                                        Selected="GetAlertTree"
                                        Unselected="SetAlertTree">
                        </TreeViewItem>
                        <TreeViewItem Header="Help"
                                            FontSize="17"
                                        Name="HelpTree" 
                                        Selected="GetHelpTree"
                                        Unselected="SetHelpTree">
                        </TreeViewItem>
                        <TreeViewItem Header="[+New Project]"
                                            FontSize="17"
                                        Name="NewProjectTree" 
                                        Selected="GetNewProjectTree"
                                        Unselected="SetNewProjectTree">
                        </TreeViewItem>
                    </TreeView>
                </Border>
                <Border Grid.Row="1" BorderThickness="1" BorderBrush="Gray" Margin="0,5,0,0">

                    <Grid ShowGridLines="False">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="1*"/>
                            <RowDefinition Height="5*"/>
                        </Grid.RowDefinitions>
                        <Label Grid.Row="0" Content="Viewer" Margin="10,0,0,0"
                                            FontSize="17"/>
                    </Grid>
                </Border>
            </Grid>
            <TabControl x:Name="MainTab" 
                    Margin="0,0,0,0"
                    Grid.Column="2" >
                <TabItem x:Name="TabMap" >
                    <TabItem.Header>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="MAP " VerticalAlignment="Center"     FontSize="17"></TextBlock>
                        </StackPanel>
                    </TabItem.Header>
                    <Grid ShowGridLines="False">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="5*"/>
                            <RowDefinition Height="1*"/>
                            <RowDefinition Height="1*"/>
                        </Grid.RowDefinitions>

                        <Grid ShowGridLines="False" Grid.Row="0" Name="GridMap">
                            <Grid >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="{Binding ActualHeight, ElementName=GridMap}"/>
                                    <ColumnDefinition Width="*"/>
                                </Grid.ColumnDefinitions>
                                <Border Grid.Column="0" BorderThickness="1" BorderBrush="Red" Margin="5,5,5,5">

                                    <s:DesignerCanvas  x:Name="MyDesignerCanvas"
                                          AllowDrop="True"
                                          Background="White" HorizontalAlignment="Stretch">
                                        <Canvas.LayoutTransform>
                                            <!--Adjust ScaleX and ScaleY in lock-step to zoom-->
                                            <ScaleTransform ScaleX=".57" ScaleY=".57" CenterX=".57" CenterY=".57" />
                                        </Canvas.LayoutTransform>
                                        <Grid Name="MCGrid" Background="White" ShowGridLines="True" 
                                              Width="{Binding ActualWidth, ElementName=MyDesignerCanvas}" 
                                              Height="{Binding ActualHeight, ElementName=MyDesignerCanvas}">

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

                                <Border Grid.Column="1" BorderThickness="1" BorderBrush="Gray" Margin="5,5,5,5">

                                    <DockPanel >
                                        <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*"/>

                                            </Grid.RowDefinitions>
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="0.5*"/>
                                                <ColumnDefinition Width="6*"/>
                                            </Grid.ColumnDefinitions>
                                            <Border Grid.Row="0" Grid.Column="0" BorderThickness="1" />
                                            <Border Grid.Row="1" Grid.Column="0" BorderThickness="1" />
                                            <Border Grid.Row="2" Grid.Column="0" BorderThickness="1" />
                                            <Border Grid.Row="3" Grid.Column="0" BorderThickness="1" />
                                            <Border Grid.Row="4" Grid.Column="0" BorderThickness="1" />
                                            <Border Grid.Row="5" Grid.Column="0" BorderThickness="1" />
                                            <Border Grid.Row="6" Grid.Column="0" BorderThickness="1" />
                                            <Border Grid.Row="7" Grid.Column="0" BorderThickness="1" />
                                            <Border Grid.Row="8" Grid.Column="0" BorderThickness="1" />
                                            <Border Grid.Row="9" Grid.Column="0" BorderThickness="1" />
                                            <Border Grid.Row="10" Grid.Column="0" BorderThickness="1" />
                                            <Border Grid.Row="11" Grid.Column="0" BorderThickness="1" />
                                            <Border Grid.Row="12" Grid.Column="0" BorderThickness="1" />
                                            <Border Grid.Row="13" Grid.Column="0" BorderThickness="1" />
                                            <Border Grid.Row="14" Grid.Column="0" BorderThickness="1" />
                                            <Border Grid.Row="15" Grid.Column="0" BorderThickness="1" />



                                            <Label Grid.Row="0"  Grid.Column="1" Content="Monitor"      FontSize="17"/>
                                            <Label Grid.Row="1"  Grid.Column="1" Content="AOR 28249 [kg/h]"      FontSize="17"/>
                                            <Label Grid.Row="2"  Grid.Column="1" Content="ABC 4738 [trq]"      FontSize="17"/>
                                            <Label Grid.Row="3"  Grid.Column="1" Content="ATR 49593 [%]"      FontSize="17"/>
                                            <Label Grid.Row="4"  Grid.Column="1" Content="DEK 50403 [G]"      FontSize="17"/>
                                            <Label Grid.Row="5"  Grid.Column="1" Content="SKG 2739 [kg]"      FontSize="17"/>
                                            <Label Grid.Row="6"  Grid.Column="1" Content="SOC 86 [%]"      FontSize="17"/>
                                            <Label Grid.Row="7"  Grid.Column="1" Content="  :"      FontSize="17"/>
                                            <Label Grid.Row="8"  Grid.Column="1" Content="  :"      FontSize="17"/>
                                            <Label Grid.Row="9"  Grid.Column="1" Content="  :"      FontSize="17"/>
                                            <Label Grid.Row="10"  Grid.Column="1" Content="  :"      FontSize="17"/>
                                            <Label Grid.Row="11"  Grid.Column="1" Content="  :"      FontSize="17"/>
                                        </Grid>
                                        </ScrollViewer>
                                    </DockPanel >
                                </Border>
                            </Grid>

                        </Grid>
                        <Border Grid.Row="1" BorderThickness="1" BorderBrush="Gray" Margin="5,5,5,5">
                            <Grid ShowGridLines="False">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="1*"/>
                                    <ColumnDefinition Width="8*"/>
                                </Grid.ColumnDefinitions>
                                <Grid ShowGridLines="False" Grid.Column="0">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="1*"/>
                                        <RowDefinition Height="1*"/>
                                        <RowDefinition Height="1*"/>
                                    </Grid.RowDefinitions>
                                    <Label Grid.Row="0" Content="Schedule" Margin="10,0,0,0"      FontSize="17"/>
                                    <Label Grid.Row="1" Content="FK15_#1" Margin="10,0,0,0"     FontSize="17"/>
                                </Grid>
                                <Border Grid.Column="1" BorderThickness="1" BorderBrush="Red" Margin="5,5,5,5">

                                    <s:ScheduleCanvas x:Name="MyScheduleCanvas"
                                          AllowDrop="True"
                                          Background="White" HorizontalAlignment="Stretch">
                                        <Canvas.LayoutTransform>
                                            <!--Adjust ScaleX and ScaleY in lock-step to zoom-->
                                            <ScaleTransform ScaleX=".57" ScaleY=".57" CenterX=".57" CenterY=".57" />
                                        </Canvas.LayoutTransform>
                                        
                                        <Grid Name="MCGridShedule" Background="White" ShowGridLines="True" 
                                              Width="{Binding ActualWidth, ElementName=MyScheduleCanvas}" 
                                              Height="{Binding ActualHeight, ElementName=MyScheduleCanvas}">

                                            <Grid.RowDefinitions>
                                                <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>-->
                                        </Grid>
                                    </s:ScheduleCanvas>

                                </Border>
                            </Grid>
                        </Border>
                        <Border Grid.Row="2" BorderThickness="1" BorderBrush="Gray" Margin="5,5,5,5">
                            <Grid ShowGridLines="False">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="1*"/>
                                    <RowDefinition Height="2*"/>
                                </Grid.RowDefinitions>
                                <Label Grid.Row="0" Content="Work [FK15_#1]" Margin="10,0,0,0"     FontSize="17"/>
                            </Grid>
                        </Border>
                    </Grid>
                </TabItem>
                <TabItem x:Name="TabWork" >
                    <TabItem.Header>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text=" Work " VerticalAlignment="Center"     FontSize="17"></TextBlock>
                        </StackPanel>
                    </TabItem.Header>
                </TabItem>
                <TabItem x:Name="TabSchedule" >
                    <TabItem.Header>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text=" Schedule " VerticalAlignment="Center"     FontSize="17"></TextBlock>
                        </StackPanel>
                    </TabItem.Header>
                </TabItem>
            </TabControl>
        </Grid>
    </Grid>
</Window>