15 changed files with 803 additions and 0 deletions
@ -0,0 +1,6 @@ |
|||
<?xml version="1.0" encoding="utf-8" ?> |
|||
<configuration> |
|||
<startup> |
|||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" /> |
|||
</startup> |
|||
</configuration> |
|||
@ -0,0 +1,9 @@ |
|||
<Application x:Class="ProcessManagGUI.App" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:local="clr-namespace:ProcessManagGUI" |
|||
StartupUri="MainWindow.xaml"> |
|||
<Application.Resources> |
|||
|
|||
</Application.Resources> |
|||
</Application> |
|||
@ -0,0 +1,17 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Configuration; |
|||
using System.Data; |
|||
using System.Linq; |
|||
using System.Threading.Tasks; |
|||
using System.Windows; |
|||
|
|||
namespace ProcessManagGUI |
|||
{ |
|||
/// <summary>
|
|||
/// App.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class App : Application |
|||
{ |
|||
} |
|||
} |
|||
@ -0,0 +1,52 @@ |
|||
using System.Runtime.InteropServices; |
|||
using System.Text; |
|||
|
|||
namespace StatisticsUI |
|||
{ |
|||
internal class IniFile |
|||
{ |
|||
public class IniFiles |
|||
{ |
|||
public string path; |
|||
[DllImport("kernel32")] //返回0表示失败,非0为成功
|
|||
private static extern long WritePrivateProfileString(string section, string key, string val, string filePath); |
|||
[DllImport("kernel32")] //返回取得字符串缓冲区的长度
|
|||
private static extern int GetPrivateProfileString(string section, string key, string def, StringBuilder retVal, int size, string filePath); |
|||
/// <summary>
|
|||
/// 保存ini文件的路径
|
|||
/// 调用示例:var ini = IniFiles("C:\file.ini");
|
|||
/// </summary>
|
|||
/// <param name="INIPath"></param>
|
|||
public IniFiles(string iniPath) |
|||
{ |
|||
this.path = iniPath; |
|||
} |
|||
/// <summary>
|
|||
/// 写Ini文件
|
|||
/// 调用示例:ini.IniWritevalue("Server","name","localhost");
|
|||
/// </summary>
|
|||
/// <param name="Section">[缓冲区]</param>
|
|||
/// <param name="Key">键</param>
|
|||
/// <param name="value">值</param>
|
|||
public void IniWritevalue(string Section, string Key, string value) |
|||
{ |
|||
WritePrivateProfileString(Section, Key, value, this.path); |
|||
} |
|||
/// <summary>
|
|||
/// 读Ini文件
|
|||
/// 调用示例:ini.IniWritevalue("Server","name");
|
|||
/// </summary>
|
|||
/// <param name="Section">[缓冲区]</param>
|
|||
/// <param name="Key">键</param>
|
|||
/// <returns>值</returns>
|
|||
public string IniReadvalue(string Section, string Key) |
|||
{ |
|||
StringBuilder temp = new StringBuilder(255); |
|||
|
|||
int i = GetPrivateProfileString(Section, Key, "", temp, 255, this.path); |
|||
return temp.ToString(); |
|||
} |
|||
|
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,142 @@ |
|||
<Window x:Class="StatisticsUI.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:StatisticsUI" |
|||
mc:Ignorable="d" |
|||
Loaded="Window_Loaded" |
|||
Title="MainWindow" Height="720" Width="1280"> |
|||
<Grid> |
|||
<DataGrid x:Name="DataGridStatistics" MouseDoubleClick="DataGridStatistics_MouseDoubleClick" |
|||
SelectionMode="Single" AlternationCount="2" IsReadOnly="True" HorizontalAlignment="Left" |
|||
Margin="15,15,0,60" d:ItemsSource="{d:SampleData ItemCount=200}" AutoGenerateColumns="False" |
|||
MinColumnWidth="30" HorizontalGridLinesBrush="#FFC9C9C9" VerticalGridLinesBrush="#FFC9C9C9" |
|||
GridLinesVisibility="All" BorderBrush="#CCCCCC" BorderThickness="1,1,1,1" ColumnHeaderHeight="40" |
|||
HorizontalContentAlignment="Right" Grid.ColumnSpan="2" CanUserReorderColumns="False"> |
|||
<DataGrid.RowStyle > |
|||
<Style TargetType="{x:Type DataGridRow}"> |
|||
<Style.Triggers> |
|||
<Trigger Property="ItemsControl.AlternationIndex" Value="0"> |
|||
<Setter Property="Background" Value="#FFFFFFFF" /> |
|||
</Trigger> |
|||
<Trigger Property="ItemsControl.AlternationIndex" Value="1"> |
|||
<Setter Property="Background" Value="#FFF5F5F5" /> |
|||
</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="原料代码" Width="0" FontSize="15" Binding="{Binding ProductCode}" MaxWidth="0" MinWidth="0" CanUserReorder="False"/> |
|||
<DataGridTextColumn Header="原料名称" Width="130" FontSize="15" Binding="{Binding ProductName}" MaxWidth="200" MinWidth="50" CanUserReorder="False"/> |
|||
<DataGridTextColumn Header="总消耗(kg)" Width="150" FontSize="15" Binding="{Binding TotalDispenseGrams}" MaxWidth="200" MinWidth="50" CanUserReorder="False"/> |
|||
<DataGridTextColumn Header="使用次数" Width="120" FontSize="15" Binding="{Binding PrescriptionCount}" MaxWidth="200" MinWidth="50" CanUserReorder="False"/> |
|||
</DataGrid.Columns> |
|||
</DataGrid> |
|||
|
|||
<DataGrid x:Name="DataGridStatistics_mac" |
|||
SelectionMode="Single" AlternationCount="2" IsReadOnly="True" |
|||
Margin="470,15,15,60" d:ItemsSource="{d:SampleData ItemCount=200}" AutoGenerateColumns="False" |
|||
MinColumnWidth="30" HorizontalGridLinesBrush="#FFC9C9C9" VerticalGridLinesBrush="#FFC9C9C9" |
|||
GridLinesVisibility="All" BorderBrush="#CCCCCC" BorderThickness="1,1,1,1" ColumnHeaderHeight="40" |
|||
HorizontalContentAlignment="Right" CanUserReorderColumns="False" > |
|||
<DataGrid.RowStyle > |
|||
<Style TargetType="{x:Type DataGridRow}"> |
|||
<Style.Triggers> |
|||
<Trigger Property="ItemsControl.AlternationIndex" Value="0"> |
|||
<Setter Property="Background" Value="#FFFFFFFF" /> |
|||
</Trigger> |
|||
<Trigger Property="ItemsControl.AlternationIndex" Value="1"> |
|||
<Setter Property="Background" Value="#FFF5F5F5" /> |
|||
</Trigger> |
|||
<Trigger Property="IsMouseOver" Value="False"/> |
|||
</Style.Triggers> |
|||
</Style> |
|||
</DataGrid.RowStyle> |
|||
<DataGrid.CellStyle> |
|||
<Style TargetType="{x:Type 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="机台" Width="100" FontSize="15" Binding="{Binding MachineName}" MaxWidth="150" MinWidth="100" CanUserReorder="False"/> |
|||
<DataGridTextColumn Header="机台消耗(kg)" Binding="{Binding TotalDispenseGrams}" Width="200" FontSize="15" MaxWidth="180" MinWidth="100" CanUserReorder="False"/> |
|||
<DataGridTextColumn Header="料单数量" Binding="{Binding DyelotCount}" Width="150" FontSize="15" MaxWidth="150" MinWidth="50" CanUserReorder="False"/> |
|||
<DataGridTextColumn Header="输送执行次数" Binding="{Binding UniqueRecipeCount}" Width="150" FontSize="15" MaxWidth="150" MinWidth="50" CanUserReorder="False"/> |
|||
</DataGrid.Columns> |
|||
</DataGrid> |
|||
|
|||
<DatePicker x:Name="query_date_start" HorizontalAlignment="Left" Height="30" Margin="100,0,0,15" VerticalAlignment="Bottom" Width="115" FontSize="15" Padding="1,1,0,1"> |
|||
<DatePicker.Resources> |
|||
<Style TargetType="DatePickerTextBox"> |
|||
<Setter Property="IsReadOnly" Value="True"/> |
|||
</Style> |
|||
</DatePicker.Resources> |
|||
</DatePicker> |
|||
<ComboBox x:Name="query_date_start_time" HorizontalAlignment="Left" Height="30" Margin="225,0,0,15" Text="0:00:00" |
|||
VerticalAlignment="Bottom" Width="80" FontSize="15" IsReadOnly="True" IsEditable="True" |
|||
Background="White" Foreground="#FF474747" BorderBrush="#FFC2C2C2" Padding="0,-1,0,0"> |
|||
<ComboBoxItem Content="0:00:00"/> |
|||
<ComboBoxItem Content="8:00:00"/> |
|||
<ComboBoxItem Content="17:00:00"/> |
|||
<ComboBoxItem Content="20:00:00"/> |
|||
</ComboBox> |
|||
<DatePicker x:Name="query_date_end" HorizontalAlignment="Left" Height="30" Margin="345,0,0,15" VerticalAlignment="Bottom" Width="115" FontSize="15" Padding="1,1,0,1" > |
|||
<DatePicker.Resources> |
|||
<Style TargetType="DatePickerTextBox"> |
|||
<Setter Property="IsReadOnly" Value="True"/> |
|||
<Setter Property="Text" Value=""/> |
|||
</Style> |
|||
</DatePicker.Resources> |
|||
</DatePicker> |
|||
<ComboBox x:Name="query_date_end_time" HorizontalAlignment="Left" Height="30" Margin="470,0,0,15" Text="0:00:00" |
|||
VerticalAlignment="Bottom" Width="80" FontSize="15" IsReadOnly="True" IsEditable="True" |
|||
Background="White" Foreground="#FF474747" BorderBrush="#FFC2C2C2" Padding="0,-1,0,0"> |
|||
<ComboBoxItem Content="0:00:00"/> |
|||
<ComboBoxItem Content="8:00:00"/> |
|||
<ComboBoxItem Content="17:00:00"/> |
|||
<ComboBoxItem Content="20:00:00"/> |
|||
</ComboBox> |
|||
<TextBlock HorizontalAlignment="Left" Height="45" Margin="305,0,0,15" TextWrapping="Wrap" Text="~" |
|||
VerticalAlignment="Bottom" Width="40" FontSize="40"/> |
|||
<Button Content="统计" HorizontalAlignment="Right" Margin="0,0,15,15" |
|||
VerticalAlignment="Bottom" Height="30" Width="115" FontSize="15" |
|||
BorderBrush="{x:Null}" Background="#FFCECECE" Click="Button_Click"/> |
|||
<ComboBox x:Name="stuff_ProductType" HorizontalAlignment="Left" Height="30" Margin="560,0,0,15" Text="全部原料" |
|||
VerticalAlignment="Bottom" Width="95" FontSize="16" IsReadOnly="True" IsEditable="True"> |
|||
<ComboBoxItem Content="全部原料"></ComboBoxItem> |
|||
<ComboBoxItem Content="染料"></ComboBoxItem> |
|||
<ComboBoxItem Content="助剂"></ComboBoxItem> |
|||
<ComboBoxItem Content="粉体助剂"></ComboBoxItem> |
|||
<ComboBoxItem Content="液体染料"></ComboBoxItem> |
|||
</ComboBox> |
|||
<TextBlock HorizontalAlignment="Left" Height="30" Margin="15,0,0,15" TextWrapping="Wrap" Text="日期范围" |
|||
VerticalAlignment="Bottom" Width="90" FontSize="20"/> |
|||
|
|||
</Grid> |
|||
</Window> |
|||
@ -0,0 +1,163 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel; |
|||
using System.Data; |
|||
using System.Data.SqlClient; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using System.Windows; |
|||
using System.Windows.Controls; |
|||
using System.Windows.Controls.Primitives; |
|||
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; |
|||
using System.Windows.Threading; |
|||
|
|||
namespace StatisticsUI |
|||
{ |
|||
/// <summary>
|
|||
/// MainWindow.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class MainWindow : Window |
|||
{ |
|||
public MainWindow() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
|
|||
private static IniFile.IniFiles Configini = new IniFile.IniFiles(Convert.ToString(System.AppDomain.CurrentDomain.BaseDirectory) + "StatisticsUI.ini"); |
|||
private static string SQLIP = Configini.IniReadvalue("SQL_SERVER", "SQL1"); //读配置文件
|
|||
private static string SQLNAME = Configini.IniReadvalue("SQL_SERVER", "SQL2"); |
|||
private static string SQMOD = Configini.IniReadvalue("SQL_SERVER", "SQL3"); |
|||
private static string SQLUSER = Configini.IniReadvalue("SQL_SERVER", "SQL4"); |
|||
private static string SQLPASWORD = Configini.IniReadvalue("SQL_SERVER", "SQL5"); |
|||
private static DataTable DyelotsBulkedRecipe = new DataTable(); |
|||
private static DataTable Machine = new DataTable(); |
|||
private static DataTable Gram = new DataTable(); |
|||
private static DataTable Machine_Gram = new DataTable(); |
|||
SqlConnection conn_SC; |
|||
string Connstr_SC; |
|||
public static string DataGridStatistics_ProductCode = null; |
|||
public static string date_start_time; |
|||
public static string date_end_time; |
|||
public static string query_start = null;//全局变量开始时间
|
|||
public static string query_end = null;//全局变量结束时间
|
|||
public static int type = 0;//全局变量结束时间
|
|||
|
|||
private void DataGridStatistics_MouseDoubleClick(object sender, MouseButtonEventArgs e)//数据表双击事件
|
|||
{ |
|||
int rownum = DataGridStatistics.SelectedIndex;//获取鼠标选中行并定义变量
|
|||
if (rownum != -1)//判断鼠标定位是否有效
|
|||
{ |
|||
/*定位选中行及指定列单元格文本信息*/ |
|||
DataGridStatistics_ProductCode = (DataGridStatistics.Columns[0].GetCellContent(DataGridStatistics.Items[rownum]) as TextBlock).Text;//定位第0列,原料代码
|
|||
} |
|||
} |
|||
|
|||
private void Button_Click(object sender, RoutedEventArgs e) |
|||
{ |
|||
query_start = this.query_date_start.Text;//传递开始日期
|
|||
date_start_time = this.query_date_start_time.Text;//传递开始时间
|
|||
query_end = this.query_date_end.Text;//传递结束日期
|
|||
date_end_time = this.query_date_end_time.Text;//传递结束时间
|
|||
string t = DateTime.Now.ToString("yyyy-MM-dd"); |
|||
int query_endT = DateTime.Compare(Convert.ToDateTime(query_end), Convert.ToDateTime(t)); //比较结束时间及当期,小于-1 等于0 大于1
|
|||
if (query_endT == 0) query_end = DateTime.Now.AddDays(1).ToString("yyyy-MM-dd"); //如果结束时间为空则填入当天时间加1天
|
|||
if (query_end == DateTime.Now.ToString("yyyy-MM-dd")) query_end = DateTime.Now.AddDays(1).ToString("yyyy-MM-dd"); |
|||
int query_TimeCompare = DateTime.Compare(Convert.ToDateTime(query_start), Convert.ToDateTime(query_end)); //比较开始结束时间,小于-1 等于0 大于1
|
|||
if (query_TimeCompare == 1)//判断查询时间是否有效,等于1无效
|
|||
{ |
|||
MessageBox.Show("SC:无效查询时间", "错误");//返回无效时间弹窗
|
|||
} |
|||
else |
|||
{ |
|||
string DyelotsBulkedRecipe_sql; |
|||
string Machine_sql; |
|||
if (this.stuff_ProductType.Text == "染料") type = 1;//原料类型
|
|||
if (this.stuff_ProductType.Text == "助剂") type = 2; |
|||
if (this.stuff_ProductType.Text == "粉体助剂") type = 3; |
|||
if (this.stuff_ProductType.Text == "全部原料") |
|||
{ |
|||
DyelotsBulkedRecipe_sql = |
|||
"SELECT [ProductCode],[ProductName],SUM(DispenseGrams)/1000 as TotalDispenseGrams,COUNT(*) as PrescriptionCount " + |
|||
"FROM [BatchDyeingCentral].[dbo].[DyelotsBulkedRecipe] where Created > '" + query_start + " " + |
|||
date_start_time + "' AND Created < '" + query_end + " " + date_end_time + "'AND DispenseGrams IS NOT NULL" + |
|||
" GROUP BY [ProductCode],[ProductName] ORDER BY TotalDispenseGrams DESC "; |
|||
Machine_sql = |
|||
"SELECT m.Name AS MachineName," + |
|||
"COUNT(DISTINCT d.Dyelot) AS DyelotCount," + |
|||
"ISNULL(SUM(dbr.DispenseGrams)/1000, 0) AS TotalDispenseGrams," + |
|||
"COUNT(DISTINCT CASE WHEN dbr.Dyelot IS NOT NULL AND dbr.DispenseResult = 301" + |
|||
"THEN CONCAT(dbr.Dyelot, '|', ISNULL(dbr.ReDye, ''), '|', ISNULL(CAST(dbr.StepNumber AS NVARCHAR(10)), ''))" + |
|||
"END ) AS UniqueRecipeCount FROM Machines m LEFT JOIN Dyelots d ON m.Name = d.Machine " + |
|||
"LEFT JOIN DyelotsBulkedRecipe dbr ON d.Dyelot = dbr.Dyelot GROUP BY m.Name ORDER BY m.Name"; |
|||
} |
|||
else |
|||
{ |
|||
DyelotsBulkedRecipe_sql = |
|||
"SELECT [ProductCode],[ProductName],SUM(DispenseGrams)/1000 as TotalDispenseGrams,COUNT(*) as PrescriptionCount " + |
|||
"FROM [BatchDyeingCentral].[dbo].[DyelotsBulkedRecipe] where Created >= '" + query_start + " " + date_start_time + "' AND Created < '" + |
|||
query_end + " " + date_end_time + "'AND ProductType='"+ type + "'AND DispenseGrams IS NOT NULL" + |
|||
" GROUP BY [ProductCode],[ProductName] ORDER BY TotalDispenseGrams DESC "; |
|||
Machine_sql = |
|||
"SELECT m.Name AS MachineName," + |
|||
"COUNT(DISTINCT d.Dyelot) AS DyelotCount," + |
|||
"ISNULL(SUM(CASE WHEN dbr.ProductType = '"+type+"' THEN dbr.DispenseGrams END)/1000, 0) AS TotalDispenseGrams," + |
|||
"COUNT(DISTINCT CASE WHEN dbr.Dyelot IS NOT NULL AND dbr.DispenseResult = 301 AND dbr.ProductType = '"+type+ |
|||
"'THEN CONCAT(dbr.Dyelot, '|', ISNULL(dbr.ReDye, ''), '|', ISNULL(CAST(dbr.StepNumber AS NVARCHAR(10)), ''))" + |
|||
"END ) AS UniqueRecipeCount FROM Machines m LEFT JOIN Dyelots d ON m.Name = d.Machine " + |
|||
"AND d.CreationTime >= '" + query_start + " " + date_start_time + "' AND d.CreationTime < '" + query_end + |
|||
" " + date_end_time + "' LEFT JOIN DyelotsBulkedRecipe dbr ON d.Dyelot = dbr.Dyelot AND dbr.Created>='" + query_start + |
|||
" " + date_start_time + "' AND dbr.Created < '" + query_end + " " + date_end_time + "' GROUP BY m.Name ORDER BY m.Name"; |
|||
} |
|||
conn_SC.OpenAsync(); //连接数据库
|
|||
Machine.Clear(); |
|||
DyelotsBulkedRecipe.Clear(); |
|||
SqlDataAdapter DyelotsBulkedRecipe_ = new SqlDataAdapter(DyelotsBulkedRecipe_sql, Connstr_SC); |
|||
SqlDataAdapter Machine_ = new SqlDataAdapter(Machine_sql, Connstr_SC); |
|||
try |
|||
{ |
|||
// DyelotsBulkedRecipe.Clear();
|
|||
DyelotsBulkedRecipe_.Fill(DyelotsBulkedRecipe); |
|||
DataGridStatistics.ItemsSource = DyelotsBulkedRecipe.DefaultView; |
|||
// DyelotsBulkedRecipe.Clear();
|
|||
|
|||
//Machine.Clear();
|
|||
Machine_.Fill(Machine); |
|||
DataGridStatistics_mac.ItemsSource = Machine.DefaultView; |
|||
// Machine.Clear();
|
|||
|
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
} |
|||
finally |
|||
{ |
|||
conn_SC.Close(); |
|||
} |
|||
} |
|||
} |
|||
|
|||
private void Window_Loaded(object sender, RoutedEventArgs e) |
|||
{ |
|||
Connstr_SC = "server=" + SQLIP + ";database=" + SQLNAME + ";User ID=" + SQLUSER + ";Password=" + SQLPASWORD; |
|||
conn_SC = new SqlConnection(Connstr_SC); |
|||
|
|||
Gram.Columns.Add("ProductCode", typeof(string)); |
|||
Gram.Columns.Add("ProductName", typeof(string)); |
|||
Gram.Columns.Add("TotalDispenseGrams", typeof(string)); |
|||
Gram.Columns.Add("PrescriptionCount", typeof(string)); |
|||
|
|||
Machine_Gram.Columns.Add("MachineName", typeof(string)); |
|||
Machine_Gram.Columns.Add("TotalDispenseGrams", typeof(string)); |
|||
Machine_Gram.Columns.Add("DyelotCount", typeof(string)); |
|||
Machine_Gram.Columns.Add("UniqueRecipeCount", typeof(string)); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,52 @@ |
|||
using System.Reflection; |
|||
using System.Resources; |
|||
using System.Runtime.CompilerServices; |
|||
using System.Runtime.InteropServices; |
|||
using System.Windows; |
|||
|
|||
// 有关程序集的一般信息由以下
|
|||
// 控制。更改这些特性值可修改
|
|||
// 与程序集关联的信息。
|
|||
[assembly: AssemblyTitle("ProcessManagGUI")] |
|||
[assembly: AssemblyDescription("")] |
|||
[assembly: AssemblyConfiguration("")] |
|||
[assembly: AssemblyCompany("")] |
|||
[assembly: AssemblyProduct("ProcessManagGUI")] |
|||
[assembly: AssemblyCopyright("Copyright © 2025")] |
|||
[assembly: AssemblyTrademark("")] |
|||
[assembly: AssemblyCulture("")] |
|||
|
|||
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
|||
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
|||
//请将此类型的 ComVisible 特性设置为 true。
|
|||
[assembly: ComVisible(false)] |
|||
|
|||
//若要开始生成可本地化的应用程序,请设置
|
|||
//.csproj 文件中的 <UICulture>CultureYouAreCodingWith</UICulture>
|
|||
//在 <PropertyGroup> 中。例如,如果你使用的是美国英语。
|
|||
//使用的是美国英语,请将 <UICulture> 设置为 en-US。 然后取消
|
|||
//对以下 NeutralResourceLanguage 特性的注释。 更新
|
|||
//以下行中的“en-US”以匹配项目文件中的 UICulture 设置。
|
|||
|
|||
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
|
|||
|
|||
|
|||
[assembly: ThemeInfo( |
|||
ResourceDictionaryLocation.None, //主题特定资源词典所处位置
|
|||
//(未在页面中找到资源时使用,
|
|||
//或应用程序资源字典中找到时使用)
|
|||
ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置
|
|||
//(未在页面中找到资源时使用,
|
|||
//、应用程序或任何主题专用资源字典中找到时使用)
|
|||
)] |
|||
|
|||
|
|||
// 程序集的版本信息由下列四个值组成:
|
|||
//
|
|||
// 主版本
|
|||
// 次版本
|
|||
// 生成号
|
|||
// 修订号
|
|||
//
|
|||
[assembly: AssemblyVersion("1.0.0.0")] |
|||
[assembly: AssemblyFileVersion("1.0.0.0")] |
|||
@ -0,0 +1,71 @@ |
|||
//------------------------------------------------------------------------------
|
|||
// <auto-generated>
|
|||
// 此代码由工具生成。
|
|||
// 运行时版本: 4.0.30319.42000
|
|||
//
|
|||
// 对此文件的更改可能导致不正确的行为,如果
|
|||
// 重新生成代码,则所做更改将丢失。
|
|||
// </auto-generated>
|
|||
//------------------------------------------------------------------------------
|
|||
|
|||
namespace ProcessManagGUI.Properties |
|||
{ |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 强类型资源类,用于查找本地化字符串等。
|
|||
/// </summary>
|
|||
// 此类是由 StronglyTypedResourceBuilder
|
|||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
|||
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
|||
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
|||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] |
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
|||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] |
|||
internal class Resources |
|||
{ |
|||
|
|||
private static global::System.Resources.ResourceManager resourceMan; |
|||
|
|||
private static global::System.Globalization.CultureInfo resourceCulture; |
|||
|
|||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] |
|||
internal Resources() |
|||
{ |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 返回此类使用的缓存 ResourceManager 实例。
|
|||
/// </summary>
|
|||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] |
|||
internal static global::System.Resources.ResourceManager ResourceManager |
|||
{ |
|||
get |
|||
{ |
|||
if ((resourceMan == null)) |
|||
{ |
|||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ProcessManagGUI.Properties.Resources", typeof(Resources).Assembly); |
|||
resourceMan = temp; |
|||
} |
|||
return resourceMan; |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 重写当前线程的 CurrentUICulture 属性,对
|
|||
/// 使用此强类型资源类的所有资源查找执行重写。
|
|||
/// </summary>
|
|||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] |
|||
internal static global::System.Globalization.CultureInfo Culture |
|||
{ |
|||
get |
|||
{ |
|||
return resourceCulture; |
|||
} |
|||
set |
|||
{ |
|||
resourceCulture = value; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,117 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<root> |
|||
<!-- |
|||
Microsoft ResX Schema |
|||
|
|||
Version 2.0 |
|||
|
|||
The primary goals of this format is to allow a simple XML format |
|||
that is mostly human readable. The generation and parsing of the |
|||
various data types are done through the TypeConverter classes |
|||
associated with the data types. |
|||
|
|||
Example: |
|||
|
|||
... ado.net/XML headers & schema ... |
|||
<resheader name="resmimetype">text/microsoft-resx</resheader> |
|||
<resheader name="version">2.0</resheader> |
|||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
|||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
|||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
|||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
|||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
|||
<value>[base64 mime encoded serialized .NET Framework object]</value> |
|||
</data> |
|||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
|||
<comment>This is a comment</comment> |
|||
</data> |
|||
|
|||
There are any number of "resheader" rows that contain simple |
|||
name/value pairs. |
|||
|
|||
Each data row contains a name, and value. The row also contains a |
|||
type or mimetype. Type corresponds to a .NET class that support |
|||
text/value conversion through the TypeConverter architecture. |
|||
Classes that don't support this are serialized and stored with the |
|||
mimetype set. |
|||
|
|||
The mimetype is used for serialized objects, and tells the |
|||
ResXResourceReader how to depersist the object. This is currently not |
|||
extensible. For a given mimetype the value must be set accordingly: |
|||
|
|||
Note - application/x-microsoft.net.object.binary.base64 is the format |
|||
that the ResXResourceWriter will generate, however the reader can |
|||
read any of the formats listed below. |
|||
|
|||
mimetype: application/x-microsoft.net.object.binary.base64 |
|||
value : The object must be serialized with |
|||
: System.Serialization.Formatters.Binary.BinaryFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.soap.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.bytearray.base64 |
|||
value : The object must be serialized into a byte array |
|||
: using a System.ComponentModel.TypeConverter |
|||
: and then encoded with base64 encoding. |
|||
--> |
|||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
|||
<xsd:element name="root" msdata:IsDataSet="true"> |
|||
<xsd:complexType> |
|||
<xsd:choice maxOccurs="unbounded"> |
|||
<xsd:element name="metadata"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
<xsd:attribute name="type" type="xsd:string" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="assembly"> |
|||
<xsd:complexType> |
|||
<xsd:attribute name="alias" type="xsd:string" /> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="data"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" /> |
|||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="resheader"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
<resheader name="resmimetype"> |
|||
<value>text/microsoft-resx</value> |
|||
</resheader> |
|||
<resheader name="version"> |
|||
<value>2.0</value> |
|||
</resheader> |
|||
<resheader name="reader"> |
|||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
</root> |
|||
@ -0,0 +1,30 @@ |
|||
//------------------------------------------------------------------------------
|
|||
// <auto-generated>
|
|||
// This code was generated by a tool.
|
|||
// Runtime Version:4.0.30319.42000
|
|||
//
|
|||
// Changes to this file may cause incorrect behavior and will be lost if
|
|||
// the code is regenerated.
|
|||
// </auto-generated>
|
|||
//------------------------------------------------------------------------------
|
|||
|
|||
namespace ProcessManagGUI.Properties |
|||
{ |
|||
|
|||
|
|||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] |
|||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] |
|||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase |
|||
{ |
|||
|
|||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); |
|||
|
|||
public static Settings Default |
|||
{ |
|||
get |
|||
{ |
|||
return defaultInstance; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
<?xml version='1.0' encoding='utf-8'?> |
|||
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)"> |
|||
<Profiles> |
|||
<Profile Name="(Default)" /> |
|||
</Profiles> |
|||
<Settings /> |
|||
</SettingsFile> |
|||
@ -0,0 +1,105 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> |
|||
<PropertyGroup> |
|||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
|||
<ProjectGuid>{9D677FAF-CB71-49A1-B327-060E16D45E17}</ProjectGuid> |
|||
<OutputType>WinExe</OutputType> |
|||
<RootNamespace>ProcessManagGUI</RootNamespace> |
|||
<AssemblyName>ProcessManagGUI</AssemblyName> |
|||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> |
|||
<FileAlignment>512</FileAlignment> |
|||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> |
|||
<WarningLevel>4</WarningLevel> |
|||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> |
|||
<Deterministic>true</Deterministic> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|||
<PlatformTarget>AnyCPU</PlatformTarget> |
|||
<DebugSymbols>true</DebugSymbols> |
|||
<DebugType>full</DebugType> |
|||
<Optimize>false</Optimize> |
|||
<OutputPath>bin\Debug\</OutputPath> |
|||
<DefineConstants>DEBUG;TRACE</DefineConstants> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<WarningLevel>4</WarningLevel> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
|||
<PlatformTarget>AnyCPU</PlatformTarget> |
|||
<DebugType>pdbonly</DebugType> |
|||
<Optimize>true</Optimize> |
|||
<OutputPath>bin\Release\</OutputPath> |
|||
<DefineConstants>TRACE</DefineConstants> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<WarningLevel>4</WarningLevel> |
|||
</PropertyGroup> |
|||
<ItemGroup> |
|||
<Reference Include="System" /> |
|||
<Reference Include="System.Data" /> |
|||
<Reference Include="System.Drawing" /> |
|||
<Reference Include="System.Windows.Forms" /> |
|||
<Reference Include="System.Xml" /> |
|||
<Reference Include="Microsoft.CSharp" /> |
|||
<Reference Include="System.Core" /> |
|||
<Reference Include="System.Xml.Linq" /> |
|||
<Reference Include="System.Data.DataSetExtensions" /> |
|||
<Reference Include="System.Net.Http" /> |
|||
<Reference Include="System.Xaml"> |
|||
<RequiredTargetFramework>4.0</RequiredTargetFramework> |
|||
</Reference> |
|||
<Reference Include="WindowsBase" /> |
|||
<Reference Include="PresentationCore" /> |
|||
<Reference Include="PresentationFramework" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<ApplicationDefinition Include="App.xaml"> |
|||
<Generator>MSBuild:Compile</Generator> |
|||
<SubType>Designer</SubType> |
|||
</ApplicationDefinition> |
|||
<Page Include="MainWindow.xaml"> |
|||
<Generator>MSBuild:Compile</Generator> |
|||
<SubType>Designer</SubType> |
|||
</Page> |
|||
<Compile Include="App.xaml.cs"> |
|||
<DependentUpon>App.xaml</DependentUpon> |
|||
<SubType>Code</SubType> |
|||
</Compile> |
|||
<Compile Include="IniFile.cs" /> |
|||
<Compile Include="MainWindow.xaml.cs"> |
|||
<DependentUpon>MainWindow.xaml</DependentUpon> |
|||
<SubType>Code</SubType> |
|||
</Compile> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Compile Include="Properties\AssemblyInfo.cs"> |
|||
<SubType>Code</SubType> |
|||
</Compile> |
|||
<Compile Include="Properties\Resources.Designer.cs"> |
|||
<AutoGen>True</AutoGen> |
|||
<DesignTime>True</DesignTime> |
|||
<DependentUpon>Resources.resx</DependentUpon> |
|||
</Compile> |
|||
<Compile Include="Properties\Settings.Designer.cs"> |
|||
<AutoGen>True</AutoGen> |
|||
<DependentUpon>Settings.settings</DependentUpon> |
|||
<DesignTimeSharedInput>True</DesignTimeSharedInput> |
|||
</Compile> |
|||
<EmbeddedResource Include="Properties\Resources.resx"> |
|||
<Generator>ResXFileCodeGenerator</Generator> |
|||
<LastGenOutput>Resources.Designer.cs</LastGenOutput> |
|||
</EmbeddedResource> |
|||
<None Include="Properties\Settings.settings"> |
|||
<Generator>SettingsSingleFileGenerator</Generator> |
|||
<LastGenOutput>Settings.Designer.cs</LastGenOutput> |
|||
</None> |
|||
<None Include="StatisticsUI.ini" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<None Include="App.config" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Resource Include="sunlight_logo.ico" /> |
|||
</ItemGroup> |
|||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
|||
</Project> |
|||
@ -0,0 +1,7 @@ |
|||
[SQL_SERVER] |
|||
SQL1=www.scserverddns.top\EXPRESS ,21344 |
|||
SQL2=BatchDyeingCentral |
|||
SQL3=SQL SERVER |
|||
SQL4=sa |
|||
SQL5=SC971216@server |
|||
SQL6=10000 |
|||
@ -0,0 +1,25 @@ |
|||
|
|||
Microsoft Visual Studio Solution File, Format Version 12.00 |
|||
# Visual Studio Version 17 |
|||
VisualStudioVersion = 17.14.36511.14 |
|||
MinimumVisualStudioVersion = 10.0.40219.1 |
|||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StatisticsUI", "StatisticsUI.csproj", "{9D677FAF-CB71-49A1-B327-060E16D45E17}" |
|||
EndProject |
|||
Global |
|||
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
|||
Debug|Any CPU = Debug|Any CPU |
|||
Release|Any CPU = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(ProjectConfigurationPlatforms) = postSolution |
|||
{9D677FAF-CB71-49A1-B327-060E16D45E17}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{9D677FAF-CB71-49A1-B327-060E16D45E17}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{9D677FAF-CB71-49A1-B327-060E16D45E17}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{9D677FAF-CB71-49A1-B327-060E16D45E17}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(SolutionProperties) = preSolution |
|||
HideSolutionNode = FALSE |
|||
EndGlobalSection |
|||
GlobalSection(ExtensibilityGlobals) = postSolution |
|||
SolutionGuid = {2B17EF6F-2576-43B7-91BC-F480E72D06C9} |
|||
EndGlobalSection |
|||
EndGlobal |
|||
|
After Width: | Height: | Size: 17 KiB |
Loading…
Reference in new issue