TA的每日心情 | 奋斗 2016-8-26 01:52 |
---|
签到天数: 120 天 连续签到: 1 天 [LV.7]常住居民III
|
本帖最后由 Kite 于 2012-10-28 19:10 编辑
标题说得有点绕了,其实就是写了个WPF窗体{:soso_e113:},只是个单纯的界面,什么功能也没有{:soso_e153:}……
界面效果:
XAML代码(运行环境:Visual Studio 2010)
- <Window x:Class="EEboard_室内环境监测系统_Demo.MainWindow"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- Title="EEboard_室内环境监测系统_Demo(2012.10.24)" Height="350" Width="525" ResizeMode="CanMinimize">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="25"/>
- <RowDefinition Height="1*"/>
- <RowDefinition Height="1*"/>
- <RowDefinition Height="25"/>
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="180"/>
- <ColumnDefinition Width="120"/>
- <ColumnDefinition Width="1*"/>
- <ColumnDefinition Width="120"/>
- </Grid.ColumnDefinitions>
- <Menu Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="4">
- <MenuItem Name="menuItem1" Header="登陆">
- <MenuItem Name="menuItem11" Header="用户登录"/>
- <MenuItem Name="menuItem12" Header="修改密码"/>
- </MenuItem>
- <MenuItem Name="menuItem2" Header="配置">
- <MenuItem Name="menuItem21" Header="温湿度检测配置"/>
- <MenuItem Name="menuItem22" Header="气体传感器配置"/>
- <MenuItem Name="menuItem23" Header="空气质量检测配置"/>
- </MenuItem>
- <MenuItem Name="menuItem3" Header="搜索串口">
- </MenuItem>
- <MenuItem Name="menuItem4" Header="帮助">
- </MenuItem>
- <MenuItem Name="menuItem5" Header="版权说明">
- </MenuItem>
- </Menu>
- <GroupBox Name="groupBox1" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3"
- Header="温湿度检测" Margin="5">
- <Grid>
- <Label Content="28" Height="85" HorizontalAlignment="Left"
- Margin="23,3,0,0" Name="label1" VerticalAlignment="Top" Width="85" FontSize="65" />
- <Label Content="℃" Height="47" HorizontalAlignment="Left"
- Margin="104,42,0,0" Name="label2" VerticalAlignment="Top" Width="44" FontSize="32" FontFamily="KaiTi" />
- <Label Content="56" Height="85" HorizontalAlignment="Left"
- Margin="197,4,0,0" Name="label3" VerticalAlignment="Top" Width="85" FontSize="65" />
- <Label Content="%" Height="48" HorizontalAlignment="Left"
- Margin="280,41,0,0" Name="label4" VerticalAlignment="Top" Width="45" FontSize="32" />
- </Grid>
- </GroupBox>
- <GroupBox Name="groupBox2" Grid.Row="2" Grid.Column="0"
- Header="气体检测" Margin="5">
- <Grid>
- <Label Content="1115" Height="59" HorizontalAlignment="Left" Margin="6,11,0,0"
- Name="label6" VerticalAlignment="Top" Width="115" FontSize="45" />
- <Label Content="ppm" Height="36" HorizontalAlignment="Left" Margin="95,55,0,0"
- Name="label7" VerticalAlignment="Top" FontSize="20" />
- </Grid>
- </GroupBox>
- <GroupBox Name="groupBox3" Grid.Row="2" Grid.Column="1"
- Header="空气质量" Margin="5">
- <Grid>
- <Label Content="良" Height="92" HorizontalAlignment="Left" Margin="6,2,0,0"
- Name="label8" VerticalAlignment="Top" Width="88" FontSize="75" FontFamily="KaiTi" Foreground="Green" />
- </Grid>
- </GroupBox>
- <Grid Grid.Row="1" Grid.Column="3" Margin="10">
- <Label Content="连接状态" Height="28" HorizontalAlignment="Left"
- Margin="19,12,0,0" Name="label5" VerticalAlignment="Top" Width="70" FontSize="15" />
- <Button Content="已连接" Height="52" HorizontalAlignment="Left"
- Margin="16,50,0,0" Name="button1" VerticalAlignment="Top" Width="73" FontSize="13" />
- </Grid>
- <Image Name="image1" Grid.Row="2" Grid.Column="2" Grid.ColumnSpan="2">
- <Image.Source>
- <BitmapImage UriSource="EEboard.gif"/>
- </Image.Source>
- </Image>
- <StatusBar Name="statusBar1" Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="4">
- <StatusBarItem Name="statusBarItem1" Width="190"
- Content="当前温度:28℃ 湿度:56%"/>
- <StatusBarItem Name="statusBarItem2" Width="130"
- Content="气体检测:1115ppm"/>
- <StatusBarItem Name="statusBarItem3" Width="90"
- Content="空气质量:良"/>
- <StatusBarItem Name="statusBarItem4"
- Content="串口号:COM2"/>
- </StatusBar>
- </Grid>
- </Window>
复制代码
|
|