添加资源,模拟图
This commit is contained in:
commit
026a3f4f2b
6 files changed
+217
-63
No files matched your search
@@ -451,6 +451,9 @@
|
||||
<Content Include="Fonts\font-awesome-4.7.0\css\font-awesome.css" />
|
||||
<Content Include="Fonts\font-awesome-4.7.0\css\font-awesome.min.css" />
|
||||
<Content Include="Fonts\font-awesome-4.7.0\fonts\fontawesome-webfont.svg" />
|
||||
<Resource Include="Lmage\10009-0.png" />
|
||||
<Resource Include="Lmage\10009-1.png" />
|
||||
<Resource Include="Lmage\12500-1.png" />
|
||||
<Resource Include="Lmage\12000-1.png" />
|
||||
<Resource Include="Lmage\12000.png" />
|
||||
<Resource Include="Lmage\10002-1.png" />
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
@@ -13,78 +13,161 @@
|
||||
<Image Source="/Lmage/12000-1.png"/>
|
||||
<Image Width="514" gif:ImageBehavior.AnimatedSource="/Lmage/1000-1.png"
|
||||
HorizontalAlignment="Left" Canvas.Left="-44" Canvas.Top="144" Margin="57,238,0,112"/>
|
||||
|
||||
<Image Width="300" Height="300" gif:ImageBehavior.AnimatedSource="/Lmage/10001.gif"
|
||||
gif:ImageBehavior.RepeatBehavior="Forever" HorizontalAlignment="Left" Canvas.Left="20"
|
||||
Canvas.Top="180" Visibility="Collapsed" x:Name="Swing_"/>
|
||||
<TextBlock x:Name="M_T" HorizontalAlignment="Left" Height="35" Margin="535,257,0,0" TextWrapping="Wrap" Text="C" TextAlignment="Right"
|
||||
|
||||
<TextBlock x:Name="M_T" HorizontalAlignment="Center" Height="35" Margin="0,208,0,0" TextWrapping="Wrap" Text="C" TextAlignment="Right"
|
||||
VerticalAlignment="Top" Width="160" FontSize="30" Background="White" Padding="5,0,5,0"/>
|
||||
<TextBlock x:Name="M_L" HorizontalAlignment="Left" Height="35" Margin="535,528,0,0" TextWrapping="Wrap" Text="L" TextAlignment="Right"
|
||||
<TextBlock x:Name="M_L" HorizontalAlignment="Center" Height="35" Margin="0,522,0,0" TextWrapping="Wrap" Text="L" TextAlignment="Right"
|
||||
VerticalAlignment="Top" Width="160" FontSize="30" Background="White" Padding="5,0,5,0"/>
|
||||
</Grid>
|
||||
<Grid Width="400" Height="400" Canvas.Left="1398" Canvas.Top="198">
|
||||
<Image Width="200" Height="200" gif:ImageBehavior.AnimatedSource="/Lmage/tong.png"
|
||||
HorizontalAlignment="Right" Canvas.Left="930" Canvas.Top="79" VerticalAlignment="Top"/>
|
||||
<TextBlock x:Name="S1_T" HorizontalAlignment="Right" Height="30" TextWrapping="Wrap" Text="C"
|
||||
TextAlignment="Right" VerticalAlignment="Top" Width="100" FontSize="20" Background="White"
|
||||
Padding="5,0,5,0" Margin="20,10,20,0"/>
|
||||
<TextBlock x:Name="S1_L" HorizontalAlignment="Right" Height="30" TextWrapping="Wrap" Text="L"
|
||||
TextAlignment="Right" VerticalAlignment="Top" Width="100" FontSize="20" Background="White"
|
||||
Padding="5,0,5,0" Margin="20,60,20,0" />
|
||||
<Image Width="50" gif:ImageBehavior.AnimatedSource="/Lmage/2000.png"
|
||||
HorizontalAlignment="Left" Canvas.Left="20" Canvas.Top="180"
|
||||
Margin="0,20,0,0" VerticalAlignment="Top" Height="50"/>
|
||||
<Image Width="50" gif:ImageBehavior.AnimatedSource="/Lmage/2000.png"
|
||||
HorizontalAlignment="Left" Canvas.Left="20" Canvas.Top="180"
|
||||
Margin="0,80,0,0" VerticalAlignment="Top" Height="50"/>
|
||||
<Image Width="50" gif:ImageBehavior.AnimatedSource="/Lmage/2000.png"
|
||||
HorizontalAlignment="Left" Canvas.Left="20" Canvas.Top="180"
|
||||
Margin="120,20,0,0" VerticalAlignment="Top" Height="50"/>
|
||||
<Image Width="50" gif:ImageBehavior.AnimatedSource="/Lmage/2001.png"
|
||||
HorizontalAlignment="Left" Canvas.Left="20" Canvas.Top="180"
|
||||
Margin="0,20,0,0" VerticalAlignment="Top" Height="50"/>
|
||||
<Image Width="50" gif:ImageBehavior.AnimatedSource="/Lmage/2001.png"
|
||||
HorizontalAlignment="Left" Canvas.Left="20" Canvas.Top="180"
|
||||
Margin="0,80,0,0" VerticalAlignment="Top" Height="50"/>
|
||||
<Image Width="50" gif:ImageBehavior.AnimatedSource="/Lmage/2001.png"
|
||||
HorizontalAlignment="Left" Canvas.Left="20" Canvas.Top="180"
|
||||
Margin="120,20,0,0" VerticalAlignment="Top" Height="50"/>
|
||||
<Slider Height="30" Width="100" FontSize="30" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="620,0,0,0"/>
|
||||
|
||||
<Grid HorizontalAlignment="Left" VerticalAlignment="Top" Height="75" Width="125"
|
||||
Margin="66,562,0,0" >
|
||||
<Image MouseLeftButtonDown="ID3020_MouseLeftButtonDown" HorizontalAlignment="Left">
|
||||
<Image.Style>
|
||||
<Style TargetType="Image">
|
||||
<Setter Property="Source" Value="/Lmage/10009-0.png"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ID3020}" Value="false">
|
||||
<Setter Property="Source" Value="/Lmage/10009-0.png"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding ID3020}" Value="true">
|
||||
<Setter Property="Source" Value="/Lmage/10009-1.png"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Image.Style>
|
||||
</Image>
|
||||
<TextBlock Text="溢流" HorizontalAlignment="Right" FontSize="30" Width="35" TextWrapping="Wrap"/>
|
||||
</Grid>
|
||||
<Grid HorizontalAlignment="Left" VerticalAlignment="Top" Height="75" Width="110"
|
||||
Margin="548,40,0,0">
|
||||
<Image MouseLeftButtonDown="ID3007_MouseLeftButtonDown" HorizontalAlignment="Left">
|
||||
<Image.Style>
|
||||
<Style TargetType="{x:Type Image}">
|
||||
<Setter Property="Source" Value="/Lmage/10009-0.png"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ID3007}" Value="false">
|
||||
<Setter Property="Source" Value="/Lmage/10009-0.png"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding ID3007}" Value="true">
|
||||
<Setter Property="Source" Value="/Lmage/10009-1.png"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Image.Style>
|
||||
</Image>
|
||||
<TextBlock Text="加压" HorizontalAlignment="Right" FontSize="30" Width="35" TextWrapping="Wrap"/>
|
||||
</Grid>
|
||||
<Grid HorizontalAlignment="Left" VerticalAlignment="Top" Height="75" Width="110"
|
||||
Margin="655,40,0,0">
|
||||
<Image MouseLeftButtonDown="ID3008_MouseLeftButtonDown" HorizontalAlignment="Left">
|
||||
<Image.Style>
|
||||
<Style TargetType="{x:Type Image}">
|
||||
<Setter Property="Source" Value="/Lmage/10009-0.png"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ID3008}" Value="false">
|
||||
<Setter Property="Source" Value="/Lmage/10009-0.png"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding ID3008}" Value="true">
|
||||
<Setter Property="Source" Value="/Lmage/10009-1.png"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Image.Style>
|
||||
</Image>
|
||||
<TextBlock Text="减压" HorizontalAlignment="Right" FontSize="30" Width="35" TextWrapping="Wrap"/>
|
||||
</Grid>
|
||||
|
||||
<Image Width="100" Height="100" gif:ImageBehavior.AnimatedSource="/Lmage/beng_stop.png"
|
||||
HorizontalAlignment="Left" Canvas.Left="20" Canvas.Top="180" Margin="284,159,0,141"/>
|
||||
|
||||
</Grid>
|
||||
<Grid Width="400" Height="400" Canvas.Left="1398" Canvas.Top="603">
|
||||
<Image Width="200" Height="200" gif:ImageBehavior.AnimatedSource="/Lmage/tong.png"
|
||||
HorizontalAlignment="Right" Canvas.Left="930" Canvas.Top="79" VerticalAlignment="Top"/>
|
||||
<TextBlock x:Name="S3_T" HorizontalAlignment="Right" Height="30" TextWrapping="Wrap" Text="C"
|
||||
<Grid Width="650" Height="400" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="1000,30,0,0">
|
||||
<Image gif:ImageBehavior.AnimatedSource="/Lmage/12500-1.png" HorizontalAlignment="Left" />
|
||||
<TextBlock Text="1" FontSize="60" Height="80" Width="50" Foreground="Red" Margin="80,100,0,0" HorizontalAlignment="Left" VerticalAlignment="Top"/>
|
||||
<TextBlock x:Name="S1_T" HorizontalAlignment="Left" Height="30" TextWrapping="Wrap" Text="C"
|
||||
TextAlignment="Right" VerticalAlignment="Top" Width="100" FontSize="20" Background="White"
|
||||
Padding="5,0,5,0" Margin="20,10,20,0"/>
|
||||
<TextBlock x:Name="S3_L" HorizontalAlignment="Right" Height="30" TextWrapping="Wrap" Text="L"
|
||||
Padding="5,0,5,0" Margin="150,100,250,0"/>
|
||||
<TextBlock x:Name="S1_L" HorizontalAlignment="Left" Height="30" TextWrapping="Wrap" Text="L"
|
||||
TextAlignment="Right" VerticalAlignment="Top" Width="100" FontSize="20" Background="White"
|
||||
Padding="5,0,5,0" Margin="20,60,20,0" />
|
||||
<Image Width="50" gif:ImageBehavior.AnimatedSource="/Lmage/2000.png"
|
||||
HorizontalAlignment="Left" Canvas.Left="20" Canvas.Top="180"
|
||||
Margin="0,20,0,0" VerticalAlignment="Top" Height="50"/>
|
||||
<Image Width="50" gif:ImageBehavior.AnimatedSource="/Lmage/2000.png"
|
||||
HorizontalAlignment="Left" Canvas.Left="20" Canvas.Top="180"
|
||||
Margin="0,80,0,0" VerticalAlignment="Top" Height="50"/>
|
||||
<Image Width="50" gif:ImageBehavior.AnimatedSource="/Lmage/2000.png"
|
||||
HorizontalAlignment="Left" Canvas.Left="20" Canvas.Top="180"
|
||||
Margin="120,20,0,0" VerticalAlignment="Top" Height="50"/>
|
||||
<Image Width="50" gif:ImageBehavior.AnimatedSource="/Lmage/2001.png"
|
||||
HorizontalAlignment="Left" Canvas.Left="20" Canvas.Top="180"
|
||||
Margin="0,20,0,0" VerticalAlignment="Top" Height="50"/>
|
||||
<Image Width="50" gif:ImageBehavior.AnimatedSource="/Lmage/2001.png"
|
||||
HorizontalAlignment="Left" Canvas.Left="20" Canvas.Top="180"
|
||||
Margin="0,80,0,0" VerticalAlignment="Top" Height="50"/>
|
||||
<Image Width="50" gif:ImageBehavior.AnimatedSource="/Lmage/2001.png"
|
||||
HorizontalAlignment="Left" Canvas.Left="20" Canvas.Top="180"
|
||||
Margin="120,20,0,0" VerticalAlignment="Top" Height="50"/>
|
||||
Padding="5,0,5,0" Margin="150,165,331,0" />
|
||||
<Slider Height="30" Width="100" FontSize="30" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="340,0,0,0"/>
|
||||
|
||||
<Grid HorizontalAlignment="Left" VerticalAlignment="Top" Height="75" Width="110"
|
||||
Margin="288,20,0,0">
|
||||
<Image MouseLeftButtonDown="ID3008_MouseLeftButtonDown" HorizontalAlignment="Left">
|
||||
<Image.Style>
|
||||
<Style TargetType="{x:Type Image}">
|
||||
<Setter Property="Source" Value="/Lmage/10009-1.png"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ID3008}" Value="false">
|
||||
<Setter Property="Source" Value="/Lmage/10009-0.png"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding ID3008}" Value="true">
|
||||
<Setter Property="Source" Value="/Lmage/10009-1.png"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Image.Style>
|
||||
</Image>
|
||||
<TextBlock Text="回水" HorizontalAlignment="Right" FontSize="30" Width="35" TextWrapping="Wrap"/>
|
||||
</Grid>
|
||||
<Grid HorizontalAlignment="Left" VerticalAlignment="Top" Height="110" Width="110"
|
||||
Margin="400,20,0,0">
|
||||
<Image MouseLeftButtonDown="ID3008_MouseLeftButtonDown" HorizontalAlignment="Left" VerticalAlignment="Top" Width="75" Height="74">
|
||||
<Image.Style>
|
||||
<Style TargetType="{x:Type Image}">
|
||||
<Setter Property="Source" Value="/Lmage/10009-1.png"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ID3008}" Value="false">
|
||||
<Setter Property="Source" Value="/Lmage/10009-0.png"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding ID3008}" Value="true">
|
||||
<Setter Property="Source" Value="/Lmage/10009-1.png"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Image.Style>
|
||||
</Image>
|
||||
<TextBlock Text="入水1" HorizontalAlignment="Right" FontSize="30" Width="35" TextWrapping="Wrap"/>
|
||||
</Grid>
|
||||
<Grid HorizontalAlignment="Left" VerticalAlignment="Top" Height="110" Width="110"
|
||||
Margin="511,20,0,0">
|
||||
<Image MouseLeftButtonDown="ID3008_MouseLeftButtonDown" HorizontalAlignment="Left" VerticalAlignment="Top" Width="75" Height="74">
|
||||
<Image.Style>
|
||||
<Style TargetType="{x:Type Image}">
|
||||
<Setter Property="Source" Value="/Lmage/10009-1.png"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ID3008}" Value="false">
|
||||
<Setter Property="Source" Value="/Lmage/10009-0.png"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding ID3008}" Value="true">
|
||||
<Setter Property="Source" Value="/Lmage/10009-1.png"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Image.Style>
|
||||
</Image>
|
||||
<TextBlock Text="入水2" HorizontalAlignment="Right" FontSize="30" Width="35" TextWrapping="Wrap"/>
|
||||
</Grid>
|
||||
|
||||
|
||||
<Image Width="100" Height="100" gif:ImageBehavior.AnimatedSource="/Lmage/beng_stop.png"
|
||||
HorizontalAlignment="Left" Canvas.Left="20" Canvas.Top="180" Margin="284,159,0,141"/>
|
||||
|
||||
</Grid>
|
||||
<Grid Width="600" Height="400" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="1000,480,0,0" >
|
||||
<Image gif:ImageBehavior.AnimatedSource="/Lmage/12500-1.png"/>
|
||||
<TextBlock Text="2" FontSize="60" Height="80" Width="50" Foreground="Red" Margin="80,100,0,0" HorizontalAlignment="Left" VerticalAlignment="Top"/>
|
||||
<TextBlock x:Name="S2_T" HorizontalAlignment="Left" Height="30" TextWrapping="Wrap" Text="C"
|
||||
TextAlignment="Right" VerticalAlignment="Top" Width="100" FontSize="20" Background="White"
|
||||
Padding="5,0,5,0" Margin="150,100,20,0"/>
|
||||
<TextBlock x:Name="S2_L" HorizontalAlignment="Left" Height="30" TextWrapping="Wrap" Text="L"
|
||||
TextAlignment="Right" VerticalAlignment="Top" Width="100" FontSize="20" Background="White"
|
||||
Padding="5,0,5,0" Margin="150,165,20,0" />
|
||||
<Slider Height="30" Width="100" FontSize="30" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="340,0,0,0"/>
|
||||
</Grid>
|
||||
|
||||
</Canvas>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using DyeingComputer.ViewModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@@ -21,22 +22,72 @@ namespace DyeingComputer.View
|
||||
/// <summary>
|
||||
/// EquipmentSimulationView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class EquipmentSimulationView : UserControl
|
||||
public partial class EquipmentSimulationView : UserControl, INotifyPropertyChanged
|
||||
{
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
protected virtual void OnPropertyChanged(string propertyName)
|
||||
{
|
||||
if (PropertyChanged != null)
|
||||
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
public void RaisePropertyChanged(string propertyName)
|
||||
{
|
||||
if (PropertyChanged != null)
|
||||
{
|
||||
if (propertyName != null)
|
||||
{
|
||||
PropertyChanged.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public EquipmentSimulationView()
|
||||
{
|
||||
InitializeComponent();
|
||||
DataContext = this;
|
||||
CountDown();
|
||||
}
|
||||
bool _ID3007, _ID3008,_ID3020;
|
||||
public bool ID3007
|
||||
{
|
||||
get => _ID3007;
|
||||
set
|
||||
{
|
||||
_ID3007 = value;
|
||||
OnPropertyChanged("ID3007");
|
||||
}
|
||||
}
|
||||
public bool ID3008
|
||||
{
|
||||
get => _ID3008;
|
||||
set
|
||||
{
|
||||
_ID3008 = value;
|
||||
OnPropertyChanged("ID3008");
|
||||
}
|
||||
}
|
||||
public bool ID3020
|
||||
{
|
||||
get => _ID3020;
|
||||
set
|
||||
{
|
||||
_ID3020 = value;
|
||||
OnPropertyChanged("ID3020");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Tick_Event_1S(object sender, EventArgs e)//Tick_Event周期执行事件1S
|
||||
{
|
||||
M_T.Text = string.Format(" {0:###.#}", Convert.ToDouble(MainWindowViewModel.Selet_dtm("1010"))) + "°C";//主缸温度
|
||||
M_L.Text = string.Format("{0:D4}", Convert.ToInt16(MainWindowViewModel.Selet_dtm("1015"))) + "L";//主缸水
|
||||
if (MainWindowViewModel.Selet_dtd("3023") || MainWindowViewModel.Selet_dtd("3024"))//摆动显示
|
||||
{ Swing_.Visibility = Visibility.Visible; }
|
||||
else { Swing_.Visibility = Visibility.Collapsed; }
|
||||
S1_T.Text = string.Format(" {0:###.#}", Convert.ToDouble(MainWindowViewModel.Selet_dtm("1012"))) + "°C";//缸1温度
|
||||
S1_L.Text = string.Format("{0:D4}", Convert.ToInt16(MainWindowViewModel.Selet_dtm("1017"))) + "L";//缸1水
|
||||
S2_T.Text = string.Format(" {0:###.#}", Convert.ToDouble(MainWindowViewModel.Selet_dtm("1013"))) + "°C";//缸2温度
|
||||
S2_L.Text = string.Format("{0:D4}", Convert.ToInt16(MainWindowViewModel.Selet_dtm("1018"))) + "L";//缸2水
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void CountDown()
|
||||
@@ -48,5 +99,22 @@ namespace DyeingComputer.View
|
||||
timer1s.Tick += Tick_Event_1S;
|
||||
timer1s.Start();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void ID3007_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
ID3007 = !ID3007;
|
||||
}
|
||||
private void ID3008_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
ID3008 = !ID3008;
|
||||
}
|
||||
private void ID3020_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
ID3020 = !ID3020;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user