Merge branch 'master' of http://www.scserverddns.top:13000/sc/SunlightAggregationManager
This commit is contained in:
commit
6b16bc838c
10 files changed
+222
-25
No files matched your search
@@ -0,0 +1,13 @@
|
||||
<UserControl x:Class="SunlightAggregationManager.View.ActionPage"
|
||||
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:SunlightAggregationManager.View"
|
||||
mc:Ignorable="d"
|
||||
Loaded="UserControl_Loaded"
|
||||
d:DesignHeight="720" d:DesignWidth="1080">
|
||||
<Grid>
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
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 SunlightAggregationManager.View
|
||||
{
|
||||
/// <summary>
|
||||
/// ActionPage.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class ActionPage : UserControl
|
||||
{
|
||||
public ActionPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void UserControl_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
<UserControl x:Class="SunlightAggregationManager.View.MachinePage"
|
||||
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:SunlightAggregationManager.View"
|
||||
xmlns:ConvertMoels="clr-namespace:SunlightAggregationManager.ConvertMoels"
|
||||
xmlns:lang="clr-namespace:SunlightAggregationManager"
|
||||
xmlns:viewmodel="clr-namespace:SunlightAggregationManager.ViewModel"
|
||||
d:DataContext="{d:DesignInstance Type=viewmodel:MainWindowViewModel}"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="720" d:DesignWidth="1080">
|
||||
<Grid>
|
||||
<DataGrid x:Name="DataGridmachines"
|
||||
ItemsSource="{Binding Machines.DefaultView}"
|
||||
SelectionChanged="DataGridmachines_SelectionChanged"
|
||||
SelectionMode="Single"
|
||||
AlternationCount="2"
|
||||
IsReadOnly="True"
|
||||
FontSize="26"
|
||||
Margin="5,5,5,5"
|
||||
AutoGenerateColumns="False"
|
||||
MinColumnWidth="30"
|
||||
HorizontalGridLinesBrush="#FFC9C9C9"
|
||||
VerticalGridLinesBrush="#FFC9C9C9"
|
||||
GridLinesVisibility="All"
|
||||
BorderBrush="#CCCCCC"
|
||||
BorderThickness="1,1,1,1"
|
||||
ColumnHeaderHeight="40"
|
||||
HorizontalContentAlignment="Right"
|
||||
CanUserReorderColumns="False"
|
||||
VerticalContentAlignment="Center">
|
||||
<DataGrid.RowStyle >
|
||||
<Style TargetType="{x:Type DataGridRow}">
|
||||
<Style.Triggers>
|
||||
<Trigger Property="ItemsControl.AlternationIndex" Value="0">
|
||||
<Setter Property="Background" Value="#FFFFFFFF" />
|
||||
<Setter Property="Height" Value="40" />
|
||||
</Trigger>
|
||||
<Trigger Property="ItemsControl.AlternationIndex" Value="1">
|
||||
<Setter Property="Background" Value="#FFF0F0F0" />
|
||||
<Setter Property="Height" Value="40" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="False">
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</DataGrid.RowStyle>
|
||||
<DataGrid.CellStyle>
|
||||
<Style TargetType="DataGridCell">
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="MinWidth" Value="20"/>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter Property="Background" Value="#FFC0C0C0"/>
|
||||
<Setter Property="BorderBrush" Value="#FFC0C0C0"/>
|
||||
<Setter Property="Foreground" Value="#000000"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</DataGrid.CellStyle>
|
||||
<DataGrid.Columns>
|
||||
<!--列信息绑定-->
|
||||
<DataGridTextColumn Header="{x:Static lang:ResourceLanguage.information}" Width="200" FontSize="26"
|
||||
Binding="{Binding Name}" MaxWidth="200" MinWidth="200" CanUserReorder="False"/>
|
||||
<DataGridTextColumn Header="{x:Static lang:ResourceLanguage.machine}" Width="200" FontSize="26"
|
||||
Binding="{Binding Machine}" MaxWidth="200" MinWidth="200" CanUserReorder="False"/>
|
||||
<DataGridTextColumn Header="{x:Static lang:ResourceLanguage.state}" Width="150" FontSize="26"
|
||||
Binding="{Binding State}" MinWidth="150" CanUserReorder="False"/>
|
||||
<DataGridTextColumn Header="{x:Static lang:ResourceLanguage.Mode}" Width="150" FontSize="26"
|
||||
Binding="{Binding Model}" MinWidth="150" CanUserReorder="False"/>
|
||||
<DataGridTextColumn Header="A" Width="150" FontSize="26"
|
||||
Binding="{Binding ModelA}" MinWidth="150" CanUserReorder="False"/>
|
||||
<DataGridTextColumn Header="B" Width="150" FontSize="26"
|
||||
Binding="{Binding ModelB}" MinWidth="150" CanUserReorder="False"/>
|
||||
<DataGridTextColumn Header="C" Width="150" FontSize="26"
|
||||
Binding="{Binding ModelC}" MinWidth="150" CanUserReorder="False"/>
|
||||
<DataGridTextColumn Header="D" Width="150" FontSize="26"
|
||||
Binding="{Binding ModelD}" MinWidth="150" CanUserReorder="False"/>
|
||||
<DataGridTextColumn Header="E" Width="150" FontSize="26"
|
||||
Binding="{Binding ModelE}" MinWidth="150" CanUserReorder="False"/>
|
||||
<DataGridTextColumn Header="F" Width="150" FontSize="26"
|
||||
Binding="{Binding ModelF}" MinWidth="150" CanUserReorder="False"/>
|
||||
<DataGridTextColumn Header="{x:Static lang:ResourceLanguage.information}" Width="*" FontSize="26"
|
||||
Binding="{Binding Information}" MinWidth="200" CanUserReorder="False"/>
|
||||
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
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 SunlightAggregationManager.View
|
||||
{
|
||||
/// <summary>
|
||||
/// MachinePage.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class MachinePage : UserControl
|
||||
{
|
||||
public MachinePage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private string id = "";
|
||||
private void DataGridmachines_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
int rownum = DataGridmachines.SelectedIndex;//获取鼠标选中行并定义变量
|
||||
if (rownum != -1)//判断鼠标定位是否有效
|
||||
{
|
||||
var row_ = DataGridmachines.Columns[0].GetCellContent(DataGridmachines.Items[rownum]);
|
||||
if (row_ is TextBlock textBlock)
|
||||
{
|
||||
id = textBlock.Text;//定位第0列,
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -40,12 +40,9 @@ namespace SunlightAggregationManager.View
|
||||
if (row_ is TextBlock textBlock)
|
||||
{
|
||||
user_id = textBlock.Text;//定位第0列,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void MenuItem_Information(object sender, RoutedEventArgs e)//信息
|
||||
|
||||
+7
-3
@@ -1,8 +1,10 @@
|
||||
using Net.Codecrete.QrCodeGenerator;
|
||||
using SunlightAggregationManager.ViewModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Reflection.PortableExecutable;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
@@ -94,9 +96,11 @@ namespace SunlightAggregationManager.View
|
||||
}
|
||||
|
||||
private void imgQR_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
string text_APP = "TEST"; // 要生成二维码的内容
|
||||
string text_LINK = Configini.IniReadvalue("SYS", "LINK"); // 要生成二维码的内容
|
||||
{
|
||||
string text_APP = "TEST"; //
|
||||
string text_LINK = MainWindowViewModel.MachineIP + ":"+ MainWindowViewModel.MachineIPP1 +
|
||||
",HTTP//:" + MainWindowViewModel.SERVERIP + "/" + MainWindowViewModel.Enterprise;
|
||||
// 要生成二维码的内容
|
||||
|
||||
imgQR_CREATE(text_APP, imgQR_app);
|
||||
imgQR_CREATE(text_LINK, imgQR_link);
|
||||
|
||||
Reference in new issue
Block a user