1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- <Window x:Class="FestoDebugger.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:local="clr-namespace:FestoDebugger"
- xmlns:UserControls="clr-namespace:FestoDebugger.UserControls"
- xmlns:prism="http://prismlibrary.com/"
- xmlns:local1="clr-namespace:FestoDebugger.ViewModels"
- mc:Ignorable="d"
- Title="FestoDebuger" Height="450" Width="800">
- <Window.DataContext>
- <local1:MainViewModel />
- </Window.DataContext>
- <Canvas>
-
- <Grid Height="40" Width="700" Margin="10,10,0,0" Panel.ZIndex="1">
- <Grid.RowDefinitions>
- <RowDefinition Height="30"/>
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="50"/>
- <ColumnDefinition Width="100"/>
- <ColumnDefinition Width="50"/>
- <ColumnDefinition Width="50"/>
- <ColumnDefinition Width="100"/>
- <ColumnDefinition Width="100"/>
- </Grid.ColumnDefinitions>
- <!-- IP地址输入 -->
- <TextBlock Text="IP地址:"
- Grid.Row="0" Grid.Column="0"
- VerticalAlignment="Center"/>
- <TextBox x:Name="IpTextBox"
- Grid.Row="0" Grid.Column="1"
- Text="{Binding IpAddress, UpdateSourceTrigger=PropertyChanged}"
- VerticalContentAlignment="Center" TextChanged="IpTextBox_TextChanged"/>
- <!-- 端口输入 -->
- <TextBlock Text="端口:"
- Grid.Row="0" Grid.Column="2"
- Margin="10,0,0,0"
- VerticalAlignment="Center"/>
- <TextBox x:Name="PortTextBox"
- Grid.Row="0" Grid.Column="3"
- Margin="0,0,0,0"
- Text="{Binding Port, UpdateSourceTrigger=PropertyChanged}"
- VerticalContentAlignment="Center"/>
- <!-- 连接按钮 -->
- <Button Content="Connect" Width="70"
- Margin="10,0,0,0"
- Grid.Row="0" Grid.Column="4"
- Command="{Binding ConnectCommand}"
- IsEnabled="{Binding IsNotConnecting}"/>
- <TextBlock Text="{Binding ConnectionStatus}"
- Grid.Row="0" Grid.Column="5"
- Margin="10,10,0,0"
- Foreground="{Binding StatusColor}"
- HorizontalAlignment="Center"/>
- </Grid>
- <ScrollViewer Height="450" Width="800">
- <ItemsControl ItemsSource="{Binding SignalModuleDatas}">
- <ItemsControl.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel Orientation="Horizontal" Margin="20,50,20,0"/>
- </ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <UserControls:FestoControl />
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </ScrollViewer>
- </Canvas>
- </Window>
|