Files
recordingtest/EG-BIMModeler_Source/MainWindow.xaml
2026-04-07 20:35:45 +09:00

166 lines
15 KiB
XML

<mah:MetroWindow x:Class="EGModeler.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:eg="http://hanmaceng.co.kr/HmEG"
xmlns:cb="clr-namespace:Editor.CommandControl;assembly=Editor04.CommandControl"
xmlns:local="clr-namespace:EGModeler"
xmlns:v="clr-namespace:EditorCore.View;assembly=EditorCore"
xmlns:control="clr-namespace:EGModeler.Controls"
xmlns:corecontrol="clr-namespace:EditorCore.Controls;assembly=EditorCore"
xmlns:commonUI="clr-namespace:HmCommonUI;assembly=HmCommonUI"
xmlns:vm="clr-namespace:EGModeler.ViewModels"
xmlns:enums="clr-namespace:EditorCore.Enums;assembly=EditorCore"
xmlns:localization="clr-namespace:Editor.Localization;assembly=Editor01.Localization"
MinWidth="1345" MinHeight="600" d:Width="1920" d:Height="1080" Width="1280" Height="720"
mc:Ignorable="d" WindowState="{Binding WindowState}" mah:DialogParticipation.Register="{Binding}"
ShowTitleBar="True" ShowMinButton="False" ShowCloseButton="False" ShowMaxRestoreButton="False"
Title="EGModeler" Name="root" Background="Transparent" Loaded="MainWindow_Loaded">
<mah:MetroWindow.TitleTemplate>
<DataTemplate>
<control:ModelerUpperBar x:Name="titleBar" Loaded="titleBar_Loaded"/>
</DataTemplate>
</mah:MetroWindow.TitleTemplate>
<mah:MetroWindow.Resources>
<local:BoolToParameterConverter x:Key="BoolToParameterConverter"/>
<Style TargetType="commonUI:StrokeText" BasedOn="{StaticResource {x:Type commonUI:StrokeText}}">
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.4"/>
</Trigger>
</Style.Triggers>
</Style>
</mah:MetroWindow.Resources>
<Grid x:Name="MainWindowContentGrid">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="3"/>
<RowDefinition Height="0" MaxHeight="400"/>
<RowDefinition Height="70"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="75"/>
<ColumnDefinition Width="315"/>
<ColumnDefinition MinWidth="200" Width="*"/>
<ColumnDefinition Width="2"/>
<ColumnDefinition MinWidth="200" Width="*"/>
<ColumnDefinition Width="75"/>
</Grid.ColumnDefinitions>
<localization:DummyControl Language="ko_KR"/>
<Grid x:Name="MainViewportGrid" Grid.Row="0" Grid.Column="0" Grid.RowSpan="3" Grid.ColumnSpan="6">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="{Binding IsSidePanelVisible, Converter={StaticResource BoolToParameterConverter}, ConverterParameter=2}" />
<ColumnDefinition Width="{Binding IsSidePanelVisible, Converter={StaticResource BoolToParameterConverter}, ConverterParameter=380}" MinWidth="{Binding IsSidePanelVisible, Converter={StaticResource BoolToParameterConverter}, ConverterParameter=380}" MaxWidth="1000"/>
</Grid.ColumnDefinitions>
<Grid Grid.Column="0">
<control:LeftViewportPanel AllowDrop="True" DragEnter="ViewPortPanel_DragEnter" Drop="ViewPortPanel_Drop" />
<corecontrol:PropertySummaryBar VerticalAlignment="Top" HorizontalAlignment="Left" Visibility="Hidden" Margin="330 0 0 0"/>
<StackPanel Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Left">
<Border CornerRadius="0 5 5 0" Background="#ECE4D2" BorderBrush="Black" BorderThickness="1" Visibility="{Binding IsLeftSidePanelVisible, Converter={StaticResource boolToVisibilityConverter}}">
<StackPanel Width="140">
<StackPanel HorizontalAlignment="Left" VerticalAlignment="Bottom" IsEnabled="{Binding IsUsingDefaultSelectFilter}" Margin="0 2">
<commonUI:StrokeText Fill="{DynamicResource SolidColorBrushTable.Type4.Normal.Foreground}" FontWeight="SemiBold" Text="{DynamicResource Control@SELECTIONFILTER}" Margin="2 5 2 2"/>
<commonUI:HmCheckBox Margin="2 3" Content="{DynamicResource Control@POINT}" IsChecked="{Binding Point, Mode=TwoWay}"/>
<commonUI:HmCheckBox Margin="2 3" Content="{DynamicResource Control@LINE}" IsChecked="{Binding Curve, Mode=TwoWay}"/>
<commonUI:HmCheckBox Margin="2 3" Content="{DynamicResource Control@MESH}" IsChecked="{Binding Mesh, Mode=TwoWay}"/>
<commonUI:HmCheckBox Margin="2 3" Content="{DynamicResource Control@DIMENSION}" IsChecked="{Binding Dimension, Mode=TwoWay}"/>
<commonUI:HmCheckBox Margin="2 3" Content="{DynamicResource Control@TEXT}" IsChecked="{Binding Text, Mode=TwoWay}"/>
<commonUI:HmCheckBox Margin="2 3" Content="{DynamicResource Control@HATCH}" IsEnabled="False"/>
<commonUI:HmCheckBox Margin="2 3" Content="{DynamicResource Control@BLOCK}" IsChecked="{Binding Block, Mode=TwoWay}"/>
<commonUI:HmCheckBox Margin="2 3" Content="{DynamicResource Control@GROUP}" IsEnabled="False"/>
<commonUI:HmCheckBox Margin="2 3" Content="{DynamicResource Control@BILLBOARD}" IsChecked="{Binding Billboard, Mode=TwoWay}"/>
<commonUI:HmCheckBox Margin="2 3" Content="{DynamicResource Control@CONTROL_POINT}" IsChecked="{Binding ControlPoint, Mode=TwoWay}"/>
<commonUI:HmCheckBox Margin="2 3" Content="{DynamicResource Control@VERTEX}" IsChecked="{Binding TopologyVertex, Mode=TwoWay}"/>
<commonUI:HmCheckBox Margin="2 3" Content="{DynamicResource Control@EDGE}" IsChecked="{Binding TopologyEdge, Mode=TwoWay}"/>
<commonUI:HmCheckBox Margin="2 3" Content="{DynamicResource Control@FACE}" IsChecked="{Binding TopologyFace, Mode=TwoWay}"/>
<commonUI:HmCheckBox Margin="2 3" Content="{DynamicResource Control@OTHER}" IsChecked="{Binding Other, Mode=TwoWay}"/>
</StackPanel>
<StackPanel HorizontalAlignment="Left" VerticalAlignment="Bottom" IsEnabled="{Binding IsOsnap}" Margin="0 2">
<commonUI:StrokeText Fill="{DynamicResource SolidColorBrushTable.Type4.Normal.Foreground}" FontWeight="SemiBold" Text="{DynamicResource Control@OSNAP}" Margin="2 5 2 2"/>
<commonUI:HmCheckBox Margin="2 3" Content="{DynamicResource Control@POINT}" IsChecked="{Binding PointOsnap, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
<commonUI:HmCheckBox Margin="2 3" Content="{DynamicResource Control@NEAR_POINT}" IsChecked="{Binding NearOsnap, Mode=TwoWay}"/>
<commonUI:HmCheckBox Margin="2 3" Content="{DynamicResource Control@END_POINT}" IsChecked="{Binding EndOsnap, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
<commonUI:HmCheckBox Margin="2 3" Content="{DynamicResource Control@MID_POINT}" IsChecked="{Binding MidpointOsnap, Mode=TwoWay}"/>
<commonUI:HmCheckBox Margin="2 3" Content="{DynamicResource Control@QUADRANT_POINT}" IsChecked="{Binding QuadrantOsnap, Mode=TwoWay}"/>
<commonUI:HmCheckBox Margin="2 3" Content="{DynamicResource Control@CENTER_POINT}" IsChecked="{Binding CenterOsnap, Mode=TwoWay}"/>
<commonUI:HmCheckBox Margin="2 3" Content="{DynamicResource Control@TANGENT_POINT}" IsChecked="{Binding TangentOsnap, Mode=TwoWay}"/>
<commonUI:HmCheckBox Margin="2 3" Content="{DynamicResource Control@VERTEX}" IsChecked="{Binding VertexOsnap, Mode=TwoWay}"/>
<commonUI:HmCheckBox Margin="2 3" Content="{DynamicResource Control@PERPENDICULAR_POINT}" IsChecked="{Binding PerpendicularOsnap, Mode=TwoWay}"/>
<commonUI:HmCheckBox Margin="2 3" Content="{DynamicResource Control@EXTENSION}" IsEnabled="False"/>
<commonUI:HmCheckBox Margin="2 3" Content="{DynamicResource Control@INTERSECTION}" IsChecked="{Binding IntersectionOsnap, Mode=TwoWay}"/>
<commonUI:HmCheckBox Margin="2 3" Content="{DynamicResource Control@KNOT_POINT}" IsChecked="{Binding KnotOsnap, Mode=TwoWay}" IsEnabled="False"/>
<commonUI:HmCheckBox Margin="2 3" Content="{DynamicResource Control@PROJECTION_POINT}" IsChecked="{Binding ProjectionOsnap, Mode=TwoWay}"/>
</StackPanel>
</StackPanel>
</Border>
<corecontrol:FlipToggleButton HorizontalAlignment="Left" VerticalAlignment="Bottom" IsChecked="{Binding IsLeftSidePanelVisible, Mode=TwoWay}" IsLeftFlip="True" Margin="-1 0 0 10"/>
</StackPanel>
<Grid HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="15 5 0 5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="330"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid Visibility="{Binding CursorCoordinateDisplay, Converter={StaticResource boolToVisibilityConverter}}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<commonUI:StrokeText Grid.Column="0" Text="{Binding MousePosX}" Fill="White" StrokeThickness="2" FontSize="13" FontWeight="Bold" VerticalAlignment="Bottom"/>
<commonUI:StrokeText Grid.Column="1" Text="{Binding MousePosY}" Fill="White" StrokeThickness="2" FontSize="13" FontWeight="Bold" VerticalAlignment="Bottom"/>
<commonUI:StrokeText Grid.Column="2" Text="{Binding MousePosZ}" Fill="White" StrokeThickness="2" FontSize="13" FontWeight="Bold" VerticalAlignment="Bottom"/>
</Grid>
<StackPanel Grid.Column="3" Margin="0 0 10 0">
<commonUI:StrokeText Text="{Binding ShowCoordOpt}" Fill="White" StrokeThickness="2" FontSize="13" FontWeight="Bold" Visibility="{Binding CursorCoordinateDisplay, Converter={StaticResource boolToVisibilityConverter}}"/>
<commonUI:StrokeText Text="{Binding CurrentUnitStr}" Fill="White" StrokeThickness="2" FontSize="13" FontWeight="Bold"/>
</StackPanel>
</Grid>
</Grid>
<corecontrol:FlipToggleButton HorizontalAlignment="Right" IsChecked="{Binding IsSidePanelVisible, Mode=TwoWay}" Margin="0 0 -1 0"/>
<GridSplitter Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="Transparent" Focusable="False"/>
<v:SidePanel Grid.Column="2" Visibility="{Binding IsSidePanelVisible, Converter={StaticResource boolToVisibilityConverter}}"/>
</Grid>
<GridSplitter Grid.Row="1" Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="Transparent" Focusable="False" MouseDoubleClick="GridSplitter_MouseDoubleClick"/>
<Button Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" Style="{DynamicResource LowerExpandButtonButtonStyle}" IsDefault="True" Content="{DynamicResource Control@SETTINGS}" Command="{Binding SeeAllCommands}" CommandParameter="{x:Static enums:AllCommandsWindowCategory.Settings}"/>
<Grid Grid.Row="3" Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<commonUI:HmFooterToggleButton Grid.Row="0" Grid.Column="0" Focusable="False" Content="{DynamicResource Control@OSNAP}" IsChecked="{Binding IsOsnap}" Kind="Object_Snap" />
<commonUI:HmFooterToggleButton Grid.Row="0" Grid.Column="1" Focusable="False" Content="{DynamicResource Control@GRIDSNAP}" IsChecked="{Binding GridSnap}" Kind="Grid_Snap" />
<commonUI:HmFooterToggleButton Grid.Row="0" Grid.Column="2" Focusable="False" Content="{DynamicResource Control@SNAP_TRACE}" IsChecked="{Binding SnapTrace}" Kind="Custom" PathData="{DynamicResource Object_Trace_DrawingImage}"/>
<commonUI:HmFooterToggleButton Grid.Row="1" Grid.Column="0" Focusable="False" Content="{DynamicResource Control@ORTHOMODE}" IsChecked="{Binding OrthoMode}" Kind="Orthogonal" />
<commonUI:HmFooterToggleButton Grid.Row="1" Grid.Column="1" Focusable="False" Content="{DynamicResource Control@PLANARMODE}" IsChecked="{Binding PlanarMode}" Kind="Orthogonal" />
<commonUI:HmFooterToggleButton Grid.Row="1" Grid.Column="2" Focusable="False" Content="{DynamicResource Control@SELECTIONFILTER}" IsChecked="{Binding IsUsingDefaultSelectFilter}" Kind="Visual_Effect" />
</Grid>
<cb:CommandPanel Grid.Row="2" Grid.Column="2" Grid.RowSpan="2" SizeChanged="CommandPanel_SizeChanged" InstanceIdx="0"/>
<GridSplitter Grid.Row="3" Grid.Column="3" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="Transparent" Focusable="False"/>
<control:CommandTabPanel Grid.Row="3" Grid.Column="4"/>
<Button Grid.Row="3" Grid.Column="5" HorizontalAlignment="Right" Style="{DynamicResource LowerExpandButtonButtonStyle}" IsDefault="True" Content="{DynamicResource Control@SEEALLCOMMANDS}" Command="{Binding SeeAllCommands}" CommandParameter="{x:Static enums:AllCommandsWindowCategory.Create}"/>
<Grid x:Name="WidzetCanvas" Grid.ColumnSpan="100" Grid.RowSpan="100"/>
<Grid x:Name="settingOptionPanel" HorizontalAlignment="Right" VerticalAlignment="Top" Grid.Column="4" Grid.ColumnSpan="2" Height="100" Width="408"/>
</Grid>
</mah:MetroWindow>