This commit is contained in:
sc committed 2024-11-03 00:03:55 +08:00
commit 662103b2d7
12 files changed
+170 -46

No files matched your search

+6 -2
View File
@@ -4,9 +4,13 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:SunlightCentralizedControlManagement_SCCM_.View"
mc:Ignorable="d"
mc:Ignorable="d" Loaded="UserControl_Loaded"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
<ScrollViewer x:Name="scr" Margin="0" VerticalScrollBarVisibility="Auto">
<WrapPanel Orientation="Horizontal" x:Name="WholeView" Background="White">
</WrapPanel>
</ScrollViewer>
</Grid>
</UserControl>
+39
View File
@@ -24,5 +24,44 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
{
InitializeComponent();
}
private void UserControl_Loaded(object sender, RoutedEventArgs e)
{
TextBox textBox = new TextBox();
textBox.Text = "12431414";
// textBox.HorizontalAlignment = HorizontalAlignment.Left;
// textBox.VerticalAlignment = VerticalAlignment.Top;
textBox.Background =new SolidColorBrush( Color.FromRgb(100,100,100));
textBox.Width = 100;
textBox.Height = 200;
textBox.Margin = new Thickness( 5,5,0,0);
WholeView.Children.Add(textBox);
TextBox textBox1 = new TextBox();
textBox1.Text = "12431414";
textBox1.Margin = new Thickness(5,5,0,0);
// textBox1.HorizontalAlignment = HorizontalAlignment.Left;
// textBox1.VerticalAlignment = VerticalAlignment.Top;
textBox1.Background = new SolidColorBrush(Color.FromRgb(100, 100, 100));
textBox1.Width = 100;
textBox1.Height = 100;
WholeView.Children.Add(textBox1);
View.info[] inf = new View.info[60];
for (int i=1; i<50; i++)
{
inf[i] = new View.info();
inf[i].Margin = new Thickness(5, 5, 0, 5);
inf[i].Width = 300;
inf[i].Height = 400;
inf[i].name.Text = i.ToString();
inf[i].temp.Text = "123c";
WholeView.Children.Add(inf[i]);
}
}
}
}
+24
View File
@@ -0,0 +1,24 @@
<UserControl x:Class="SunlightCentralizedControlManagement_SCCM_.View.info"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:SunlightCentralizedControlManagement_SCCM_.View"
xmlns:lang="clr-namespace:SunlightCentralizedControlManagement_SCCM_.Properties"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300" Background="White">
<Grid>
<TextBlock x:Name="name" VerticalAlignment="Top" Height="50" Background="Red" Text="Machine" FontWeight="Bold" FontSize="36" />
<TextBlock x:Name="temp" VerticalAlignment="Top" Height="50" Text="000.0°C" FontWeight="Bold" FontSize="36" HorizontalAlignment="Right" Padding="5,0,5,0"/>
<TextBlock Text="{x:Static lang:Resources.process}" Height="30" FontWeight="Bold" FontSize="24" Margin="5,50,5,0" VerticalAlignment="Top" Focusable="False"/>
<TextBlock x:Name="Process" Text="NO Information" Height="30" FontWeight="Bold" FontSize="24" Margin="120,50,5,0" VerticalAlignment="Top" Focusable="False"/>
<TextBlock Text="{x:Static lang:Resources.Step}" Height="30" FontWeight="Bold" FontSize="24" Margin="5,100,5,0" VerticalAlignment="Top" Focusable="False"/>
<TextBlock x:Name="Step" Text="NO Information" Height="30" FontWeight="Bold" FontSize="24" Margin="120,100,5,0" VerticalAlignment="Top" Focusable="False"/>
<TextBlock Text="{x:Static lang:Resources.message}" Height="30" FontWeight="Bold" FontSize="24" Margin="5,150,5,0" VerticalAlignment="Top" Focusable="False"/>
<TextBlock x:Name="Message" Text="NO Information" Height="30" FontWeight="Bold" FontSize="24" Margin="120,150,5,0" VerticalAlignment="Top" Focusable="False"/>
<TextBlock Text="{x:Static lang:Resources.orders}" Height="30" FontWeight="Bold" FontSize="24" Margin="5,200,5,0" VerticalAlignment="Top" Focusable="False"/>
<TextBlock x:Name="Orders" Text="NO Information" Height="30" FontWeight="Bold" FontSize="24" Margin="120,200,5,0" VerticalAlignment="Top" Focusable="False"/>
<TextBlock x:Name="time" Text="" Height="30" FontWeight="Bold" FontSize="24" Margin="5,250,5,0" VerticalAlignment="Top" Focusable="False"/>
</Grid>
</UserControl>
+29
View File
@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace SunlightCentralizedControlManagement_SCCM_.View
{
/// <summary>
/// info.xaml 的交互逻辑
/// </summary>
public partial class info : UserControl
{
public info()
{
InitializeComponent();
}
}
}