新增操作记录功能
This commit is contained in:
parent
47b39b35f0
commit
6990b2b668
228
src/PBAnaly/Assist/OperatingRecord.cs
Normal file
228
src/PBAnaly/Assist/OperatingRecord.cs
Normal file
@ -0,0 +1,228 @@
|
||||
using PBAnaly.LoginCommon;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PBAnaly.Assist
|
||||
{
|
||||
#region OperatingRecord 操作记录
|
||||
/// <summary>
|
||||
/// 操作记录
|
||||
/// </summary>
|
||||
public static class OperatingRecord
|
||||
{
|
||||
public static event EventHandler OperatingChanged;
|
||||
private static FileWriter OpWriter = new FileWriter();
|
||||
private static int OperatingIndex = 0;
|
||||
|
||||
private const string FILE_HEADER = "ID,Time,Operator,Role,Description,Action";
|
||||
|
||||
/// <summary>
|
||||
/// 写操作日志
|
||||
/// </summary>
|
||||
/// <param name="s1">描述</param>
|
||||
/// <param name="s2">动作</param>
|
||||
public static void CreateRecord(string s1, string s2)
|
||||
{
|
||||
lock (lockObj)
|
||||
{
|
||||
try
|
||||
{
|
||||
//获取程序运行的根目录
|
||||
string directory = AppDomain.CurrentDomain.BaseDirectory + "//OperatingRecord//";
|
||||
|
||||
|
||||
//判断目录是否存在,如果目录不存在,则创建目录
|
||||
if (!System.IO.Directory.Exists(directory))
|
||||
{
|
||||
System.IO.Directory.CreateDirectory(directory);
|
||||
}
|
||||
|
||||
//拼接文件名称
|
||||
string fileName = directory + DateTime.Now.ToString("yyyyMMdd") + ".csv";
|
||||
|
||||
|
||||
if (!File.Exists(fileName))
|
||||
{
|
||||
StreamWriter sw = new StreamWriter(fileName, true, Encoding.UTF8);
|
||||
sw.WriteLine(FILE_HEADER);
|
||||
sw.Flush();
|
||||
sw.Close();
|
||||
sw.Dispose();
|
||||
}
|
||||
|
||||
if (OpWriter.FileName != fileName)
|
||||
{
|
||||
OperatingIndex = File.ReadAllLines(fileName).Length - 1;
|
||||
OpWriter.Close();
|
||||
OpWriter.SetFileName(fileName);
|
||||
}
|
||||
|
||||
string strlog = string.Format("{0},{1}',{2},{3},{4},{5}",
|
||||
OperatingIndex, DateTime.Now.ToString("G"), UserManage.LogionUser.Name,
|
||||
UserManage.LogionUser.Role.ToString(), s1, s2);
|
||||
|
||||
OpWriter.WriteLine(strlog);
|
||||
OpWriter.Close();
|
||||
|
||||
OperatingIndex++;
|
||||
|
||||
if (OperatingChanged != null)
|
||||
{
|
||||
OperatingChanged(null, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region lockObj 创建操作记录方法使用的线程锁对象
|
||||
/// <summary>
|
||||
/// 创建操作记录方法使用的线程锁对象
|
||||
/// </summary>
|
||||
private static readonly object lockObj = new object();
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region FileWriter 文件操作类,主要用于写MESLog文件,和本地数据保存
|
||||
/// <summary>
|
||||
/// 文件操作类,主要用于写MESLog文件,和本地数据保存
|
||||
/// 使用方法:
|
||||
/// 1.实例化对象
|
||||
/// 2.调用SetFileName设置文件名
|
||||
/// 3.调用WriteLine写文件
|
||||
/// 4.调用Close关闭文件
|
||||
/// </summary>
|
||||
public class FileWriter
|
||||
{
|
||||
public string FileName
|
||||
{
|
||||
get { return mStrFileName; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 保存文件名
|
||||
/// </summary>
|
||||
private string mStrFileName = "";
|
||||
/// <summary>
|
||||
/// 用于写文件的写入流
|
||||
/// </summary>
|
||||
private System.IO.StreamWriter mStreamWriter = null;
|
||||
|
||||
#region SetFileName 设置文件路径
|
||||
/// <summary>
|
||||
/// 设置文件路径
|
||||
/// </summary>
|
||||
/// <param name="filePath">文件路径</param>
|
||||
public void SetFileName(string filePath)
|
||||
{
|
||||
mStrFileName = filePath;
|
||||
if (mStreamWriter == null)
|
||||
{
|
||||
mStreamWriter = new System.IO.StreamWriter(mStrFileName, true, Encoding.UTF8);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region CheckFileExist 检查文件是否存在
|
||||
/// <summary>
|
||||
/// 检查文件是否存在
|
||||
/// </summary>
|
||||
/// <param name="filePath">文件路</param>
|
||||
/// <returns>true-文件存在,false-文件不存在</returns>
|
||||
public bool CheckFileExist(string filePath)
|
||||
{
|
||||
return System.IO.File.Exists(filePath);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region WriteLine 向文件中写入一行数据,此方法用于写CSV文件
|
||||
/// <summary>
|
||||
/// 向文件中写入一行数据,此方法用于写CSV文件
|
||||
/// </summary>
|
||||
/// <param name="values">将要写入的字符串以“,”号分割</param>
|
||||
/// <param name="isFlush">清理缓存数据,并写入流</param>
|
||||
/// <returns>true写入成功,false写入失败</returns>
|
||||
public bool WriteLine(string[] values, bool isFlush = true)
|
||||
{
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
|
||||
for (int index = 0; index < values.Length; index++)
|
||||
{
|
||||
stringBuilder.Append(values[index]);
|
||||
if (index != values.Length - 1)
|
||||
{
|
||||
stringBuilder.Append(",");
|
||||
}
|
||||
}
|
||||
|
||||
return WriteLine(stringBuilder.ToString(), isFlush);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region WriteLine 向文件中写入一行数据
|
||||
/// <summary>
|
||||
/// 向文件中写入一行数据
|
||||
/// </summary>
|
||||
/// <param name="s">向文件中写入的字符串</param>
|
||||
/// <param name="isFlush">是否立即刷新到文件中,默认为立即写入文件,true-立即写入文件</param>
|
||||
/// <returns>true-写入成功,false-写入失败</returns>
|
||||
public bool WriteLine(string s, bool isFlush = true)
|
||||
{
|
||||
bool isWriteOk;
|
||||
|
||||
//判断文件是否已经打开过,当mStreamWriter==null时,说明流未打开,需要初始化
|
||||
if (mStreamWriter == null)
|
||||
{
|
||||
//初始化文件流,并打开文件
|
||||
mStreamWriter = new System.IO.StreamWriter(mStrFileName, true, Encoding.UTF8);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
//将s写入到文件流中
|
||||
mStreamWriter.WriteLine(s);
|
||||
//是否立即刷新到文件,true为立即写入,false不写入
|
||||
if (isFlush)
|
||||
{
|
||||
//清理当前缓存,并将缓存数据希尔文件
|
||||
mStreamWriter.Flush();
|
||||
}
|
||||
isWriteOk = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
isWriteOk = false;
|
||||
}
|
||||
return isWriteOk;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Close 关闭文件
|
||||
/// <summary>
|
||||
/// 关闭文件
|
||||
/// </summary>
|
||||
public void Close()
|
||||
{
|
||||
//判断文件流是否打开,如果为null则没有打开,如果不为null则文件已打开
|
||||
if (mStreamWriter != null)
|
||||
{
|
||||
//将缓存数据刷入到文件中
|
||||
mStreamWriter.Flush();
|
||||
//关闭文件流
|
||||
mStreamWriter.Close();
|
||||
//将文件流指向null,有利于下次打开时做判断
|
||||
mStreamWriter = null;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
}
|
@ -5,6 +5,7 @@ using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Linq;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace PBAnaly.LoginCommon
|
||||
@ -32,10 +33,6 @@ namespace PBAnaly.LoginCommon
|
||||
AccessItems = xs.Deserialize(fs) as List<AccessItem>;
|
||||
fs.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
System.Windows.Forms.MessageBox.Show("加载配置文件AccessControl.xml不存在。即将推出程序.");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@ -1,5 +1,6 @@
|
||||
using MaterialSkin;
|
||||
using MaterialSkin.Controls;
|
||||
using PBAnaly.Assist;
|
||||
using ReaLTaiizor.Manager;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -169,6 +170,9 @@ namespace PBAnaly.LoginCommon
|
||||
//将本次登录更新为上一次登录的用户插入数据库,方便下次登录的时候查看
|
||||
UserManage.UpDateLastUser(UserName, Password, Remember);
|
||||
isOK = true;
|
||||
|
||||
OperatingRecord.CreateRecord("登录按钮", "用户登录");
|
||||
|
||||
Close();
|
||||
}
|
||||
else { MessageBox.Show("Password is incorrect, please re-enter"); return; }
|
||||
|
130
src/PBAnaly/MainForm.Designer.cs
generated
130
src/PBAnaly/MainForm.Designer.cs
generated
@ -81,17 +81,17 @@
|
||||
this.metroPanel_RightTop.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.metroPanel_RightTop.HorizontalScrollbarBarColor = true;
|
||||
this.metroPanel_RightTop.HorizontalScrollbarHighlightOnWheel = false;
|
||||
this.metroPanel_RightTop.HorizontalScrollbarSize = 9;
|
||||
this.metroPanel_RightTop.Location = new System.Drawing.Point(280, 0);
|
||||
this.metroPanel_RightTop.HorizontalScrollbarSize = 7;
|
||||
this.metroPanel_RightTop.Location = new System.Drawing.Point(210, 0);
|
||||
this.metroPanel_RightTop.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.metroPanel_RightTop.Name = "metroPanel_RightTop";
|
||||
this.metroPanel_RightTop.Size = new System.Drawing.Size(746, 69);
|
||||
this.metroPanel_RightTop.Size = new System.Drawing.Size(639, 55);
|
||||
this.metroPanel_RightTop.TabIndex = 12;
|
||||
this.metroPanel_RightTop.Theme = MetroFramework.MetroThemeStyle.Dark;
|
||||
this.metroPanel_RightTop.UseCustomBackColor = true;
|
||||
this.metroPanel_RightTop.VerticalScrollbarBarColor = true;
|
||||
this.metroPanel_RightTop.VerticalScrollbarHighlightOnWheel = false;
|
||||
this.metroPanel_RightTop.VerticalScrollbarSize = 9;
|
||||
this.metroPanel_RightTop.VerticalScrollbarSize = 7;
|
||||
//
|
||||
// materialButton_log
|
||||
//
|
||||
@ -102,11 +102,11 @@
|
||||
this.materialButton_log.HighEmphasis = true;
|
||||
this.materialButton_log.Icon = ((System.Drawing.Image)(resources.GetObject("materialButton_log.Icon")));
|
||||
this.materialButton_log.Location = new System.Drawing.Point(581, 0);
|
||||
this.materialButton_log.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.materialButton_log.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.materialButton_log.MouseState = MaterialSkin.MouseState.HOVER;
|
||||
this.materialButton_log.Name = "materialButton_log";
|
||||
this.materialButton_log.NoAccentTextColor = System.Drawing.Color.Empty;
|
||||
this.materialButton_log.Size = new System.Drawing.Size(113, 69);
|
||||
this.materialButton_log.Size = new System.Drawing.Size(113, 55);
|
||||
this.materialButton_log.TabIndex = 19;
|
||||
this.materialButton_log.Text = "操作日志";
|
||||
this.materialButton_log.Type = MaterialSkin.Controls.MaterialButton.MaterialButtonType.Contained;
|
||||
@ -123,11 +123,11 @@
|
||||
this.materialButton_setting.HighEmphasis = true;
|
||||
this.materialButton_setting.Icon = ((System.Drawing.Image)(resources.GetObject("materialButton_setting.Icon")));
|
||||
this.materialButton_setting.Location = new System.Drawing.Point(468, 0);
|
||||
this.materialButton_setting.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.materialButton_setting.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.materialButton_setting.MouseState = MaterialSkin.MouseState.HOVER;
|
||||
this.materialButton_setting.Name = "materialButton_setting";
|
||||
this.materialButton_setting.NoAccentTextColor = System.Drawing.Color.Empty;
|
||||
this.materialButton_setting.Size = new System.Drawing.Size(113, 69);
|
||||
this.materialButton_setting.Size = new System.Drawing.Size(113, 55);
|
||||
this.materialButton_setting.TabIndex = 18;
|
||||
this.materialButton_setting.Text = "系统设置";
|
||||
this.materialButton_setting.Type = MaterialSkin.Controls.MaterialButton.MaterialButtonType.Contained;
|
||||
@ -145,11 +145,11 @@
|
||||
this.materialButton_curveimage.HighEmphasis = true;
|
||||
this.materialButton_curveimage.Icon = ((System.Drawing.Image)(resources.GetObject("materialButton_curveimage.Icon")));
|
||||
this.materialButton_curveimage.Location = new System.Drawing.Point(339, 0);
|
||||
this.materialButton_curveimage.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.materialButton_curveimage.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.materialButton_curveimage.MouseState = MaterialSkin.MouseState.HOVER;
|
||||
this.materialButton_curveimage.Name = "materialButton_curveimage";
|
||||
this.materialButton_curveimage.NoAccentTextColor = System.Drawing.Color.Empty;
|
||||
this.materialButton_curveimage.Size = new System.Drawing.Size(129, 69);
|
||||
this.materialButton_curveimage.Size = new System.Drawing.Size(129, 55);
|
||||
this.materialButton_curveimage.TabIndex = 17;
|
||||
this.materialButton_curveimage.Text = "泳道波形图";
|
||||
this.materialButton_curveimage.Type = MaterialSkin.Controls.MaterialButton.MaterialButtonType.Contained;
|
||||
@ -167,11 +167,11 @@
|
||||
this.materialButton_analyzedata.HighEmphasis = true;
|
||||
this.materialButton_analyzedata.Icon = ((System.Drawing.Image)(resources.GetObject("materialButton_analyzedata.Icon")));
|
||||
this.materialButton_analyzedata.Location = new System.Drawing.Point(226, 0);
|
||||
this.materialButton_analyzedata.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.materialButton_analyzedata.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.materialButton_analyzedata.MouseState = MaterialSkin.MouseState.HOVER;
|
||||
this.materialButton_analyzedata.Name = "materialButton_analyzedata";
|
||||
this.materialButton_analyzedata.NoAccentTextColor = System.Drawing.Color.Empty;
|
||||
this.materialButton_analyzedata.Size = new System.Drawing.Size(113, 69);
|
||||
this.materialButton_analyzedata.Size = new System.Drawing.Size(113, 55);
|
||||
this.materialButton_analyzedata.TabIndex = 16;
|
||||
this.materialButton_analyzedata.Text = "分析数据";
|
||||
this.materialButton_analyzedata.Type = MaterialSkin.Controls.MaterialButton.MaterialButtonType.Contained;
|
||||
@ -189,11 +189,11 @@
|
||||
this.materialButton_outimage.HighEmphasis = true;
|
||||
this.materialButton_outimage.Icon = ((System.Drawing.Image)(resources.GetObject("materialButton_outimage.Icon")));
|
||||
this.materialButton_outimage.Location = new System.Drawing.Point(113, 0);
|
||||
this.materialButton_outimage.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.materialButton_outimage.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.materialButton_outimage.MouseState = MaterialSkin.MouseState.HOVER;
|
||||
this.materialButton_outimage.Name = "materialButton_outimage";
|
||||
this.materialButton_outimage.NoAccentTextColor = System.Drawing.Color.Empty;
|
||||
this.materialButton_outimage.Size = new System.Drawing.Size(113, 69);
|
||||
this.materialButton_outimage.Size = new System.Drawing.Size(113, 55);
|
||||
this.materialButton_outimage.TabIndex = 15;
|
||||
this.materialButton_outimage.Text = "导出图像";
|
||||
this.materialButton_outimage.Type = MaterialSkin.Controls.MaterialButton.MaterialButtonType.Contained;
|
||||
@ -211,11 +211,11 @@
|
||||
this.materialButton_LoadData.HighEmphasis = true;
|
||||
this.materialButton_LoadData.Icon = ((System.Drawing.Image)(resources.GetObject("materialButton_LoadData.Icon")));
|
||||
this.materialButton_LoadData.Location = new System.Drawing.Point(0, 0);
|
||||
this.materialButton_LoadData.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.materialButton_LoadData.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.materialButton_LoadData.MouseState = MaterialSkin.MouseState.HOVER;
|
||||
this.materialButton_LoadData.Name = "materialButton_LoadData";
|
||||
this.materialButton_LoadData.NoAccentTextColor = System.Drawing.Color.Empty;
|
||||
this.materialButton_LoadData.Size = new System.Drawing.Size(113, 69);
|
||||
this.materialButton_LoadData.Size = new System.Drawing.Size(113, 55);
|
||||
this.materialButton_LoadData.TabIndex = 14;
|
||||
this.materialButton_LoadData.Text = "加载数据";
|
||||
this.materialButton_LoadData.Type = MaterialSkin.Controls.MaterialButton.MaterialButtonType.Contained;
|
||||
@ -226,9 +226,9 @@
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
this.tableLayoutPanel1.ColumnCount = 3;
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 280F));
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 210F));
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 437F));
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 248F));
|
||||
this.tableLayoutPanel1.Controls.Add(this.tl_right_main_view, 1, 2);
|
||||
this.tableLayoutPanel1.Controls.Add(this.metroPanel_RightTop, 1, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.CompanyIcon_pictureBox, 0, 0);
|
||||
@ -236,30 +236,30 @@
|
||||
this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel2, 1, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.pl_right, 2, 1);
|
||||
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(4, 30);
|
||||
this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 24);
|
||||
this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
this.tableLayoutPanel1.RowCount = 3;
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 69F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 39F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 55F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 31F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(1463, 726);
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(1097, 581);
|
||||
this.tableLayoutPanel1.TabIndex = 18;
|
||||
//
|
||||
// tl_right_main_view
|
||||
//
|
||||
this.tl_right_main_view.ColumnCount = 2;
|
||||
this.tl_right_main_view.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tl_right_main_view.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 432F));
|
||||
this.tl_right_main_view.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 324F));
|
||||
this.tl_right_main_view.Controls.Add(this.DataProcess_panel, 0, 0);
|
||||
this.tl_right_main_view.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tl_right_main_view.Location = new System.Drawing.Point(280, 108);
|
||||
this.tl_right_main_view.Location = new System.Drawing.Point(210, 86);
|
||||
this.tl_right_main_view.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.tl_right_main_view.Name = "tl_right_main_view";
|
||||
this.tl_right_main_view.RowCount = 2;
|
||||
this.tl_right_main_view.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tl_right_main_view.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tl_right_main_view.Size = new System.Drawing.Size(746, 618);
|
||||
this.tl_right_main_view.Size = new System.Drawing.Size(639, 495);
|
||||
this.tl_right_main_view.TabIndex = 0;
|
||||
//
|
||||
// DataProcess_panel
|
||||
@ -268,12 +268,11 @@
|
||||
this.tl_right_main_view.SetColumnSpan(this.DataProcess_panel, 2);
|
||||
this.DataProcess_panel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.DataProcess_panel.EdgeColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(41)))), ((int)(((byte)(50)))));
|
||||
this.DataProcess_panel.Location = new System.Drawing.Point(4, 4);
|
||||
this.DataProcess_panel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.DataProcess_panel.Location = new System.Drawing.Point(3, 3);
|
||||
this.DataProcess_panel.Name = "DataProcess_panel";
|
||||
this.DataProcess_panel.Padding = new System.Windows.Forms.Padding(7, 6, 7, 6);
|
||||
this.DataProcess_panel.Padding = new System.Windows.Forms.Padding(5, 5, 5, 5);
|
||||
this.tl_right_main_view.SetRowSpan(this.DataProcess_panel, 2);
|
||||
this.DataProcess_panel.Size = new System.Drawing.Size(738, 610);
|
||||
this.DataProcess_panel.Size = new System.Drawing.Size(633, 489);
|
||||
this.DataProcess_panel.SmoothingType = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
|
||||
this.DataProcess_panel.TabIndex = 19;
|
||||
this.DataProcess_panel.Text = "panel1";
|
||||
@ -284,11 +283,10 @@
|
||||
this.CompanyIcon_pictureBox.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.CompanyIcon_pictureBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.CompanyIcon_pictureBox.Image = global::PBAnaly.Properties.Resources.京仪科技定稿_画板_1_副本2;
|
||||
this.CompanyIcon_pictureBox.Location = new System.Drawing.Point(4, 4);
|
||||
this.CompanyIcon_pictureBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.CompanyIcon_pictureBox.Location = new System.Drawing.Point(3, 3);
|
||||
this.CompanyIcon_pictureBox.Name = "CompanyIcon_pictureBox";
|
||||
this.tableLayoutPanel1.SetRowSpan(this.CompanyIcon_pictureBox, 2);
|
||||
this.CompanyIcon_pictureBox.Size = new System.Drawing.Size(272, 100);
|
||||
this.CompanyIcon_pictureBox.Size = new System.Drawing.Size(204, 80);
|
||||
this.CompanyIcon_pictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.CompanyIcon_pictureBox.TabIndex = 16;
|
||||
this.CompanyIcon_pictureBox.TabStop = false;
|
||||
@ -303,10 +301,10 @@
|
||||
this.flowLayoutPanel1.Controls.Add(this.materialButton_correction);
|
||||
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
|
||||
this.flowLayoutPanel1.Location = new System.Drawing.Point(3, 110);
|
||||
this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.flowLayoutPanel1.Location = new System.Drawing.Point(2, 88);
|
||||
this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
|
||||
this.flowLayoutPanel1.Size = new System.Drawing.Size(274, 614);
|
||||
this.flowLayoutPanel1.Size = new System.Drawing.Size(206, 491);
|
||||
this.flowLayoutPanel1.TabIndex = 18;
|
||||
//
|
||||
// materialButton_imageProcess
|
||||
@ -319,12 +317,12 @@
|
||||
this.materialButton_imageProcess.Font = new System.Drawing.Font("宋体", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.materialButton_imageProcess.HighEmphasis = true;
|
||||
this.materialButton_imageProcess.Icon = ((System.Drawing.Image)(resources.GetObject("materialButton_imageProcess.Icon")));
|
||||
this.materialButton_imageProcess.Location = new System.Drawing.Point(5, 8);
|
||||
this.materialButton_imageProcess.Margin = new System.Windows.Forms.Padding(5, 8, 5, 8);
|
||||
this.materialButton_imageProcess.Location = new System.Drawing.Point(4, 6);
|
||||
this.materialButton_imageProcess.Margin = new System.Windows.Forms.Padding(4, 6, 4, 6);
|
||||
this.materialButton_imageProcess.MouseState = MaterialSkin.MouseState.HOVER;
|
||||
this.materialButton_imageProcess.Name = "materialButton_imageProcess";
|
||||
this.materialButton_imageProcess.NoAccentTextColor = System.Drawing.Color.Empty;
|
||||
this.materialButton_imageProcess.Size = new System.Drawing.Size(267, 60);
|
||||
this.materialButton_imageProcess.Size = new System.Drawing.Size(200, 48);
|
||||
this.materialButton_imageProcess.TabIndex = 4;
|
||||
this.materialButton_imageProcess.Text = "图像处理";
|
||||
this.materialButton_imageProcess.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
@ -341,12 +339,12 @@
|
||||
this.materialButton_acidAnalyze.Depth = 0;
|
||||
this.materialButton_acidAnalyze.HighEmphasis = true;
|
||||
this.materialButton_acidAnalyze.Icon = ((System.Drawing.Image)(resources.GetObject("materialButton_acidAnalyze.Icon")));
|
||||
this.materialButton_acidAnalyze.Location = new System.Drawing.Point(5, 84);
|
||||
this.materialButton_acidAnalyze.Margin = new System.Windows.Forms.Padding(5, 8, 5, 8);
|
||||
this.materialButton_acidAnalyze.Location = new System.Drawing.Point(4, 66);
|
||||
this.materialButton_acidAnalyze.Margin = new System.Windows.Forms.Padding(4, 6, 4, 6);
|
||||
this.materialButton_acidAnalyze.MouseState = MaterialSkin.MouseState.HOVER;
|
||||
this.materialButton_acidAnalyze.Name = "materialButton_acidAnalyze";
|
||||
this.materialButton_acidAnalyze.NoAccentTextColor = System.Drawing.Color.Empty;
|
||||
this.materialButton_acidAnalyze.Size = new System.Drawing.Size(267, 60);
|
||||
this.materialButton_acidAnalyze.Size = new System.Drawing.Size(200, 48);
|
||||
this.materialButton_acidAnalyze.TabIndex = 5;
|
||||
this.materialButton_acidAnalyze.Text = "泳道分析";
|
||||
this.materialButton_acidAnalyze.Type = MaterialSkin.Controls.MaterialButton.MaterialButtonType.Contained;
|
||||
@ -362,12 +360,12 @@
|
||||
this.materialButton_roiAnalyze.Depth = 0;
|
||||
this.materialButton_roiAnalyze.HighEmphasis = true;
|
||||
this.materialButton_roiAnalyze.Icon = ((System.Drawing.Image)(resources.GetObject("materialButton_roiAnalyze.Icon")));
|
||||
this.materialButton_roiAnalyze.Location = new System.Drawing.Point(5, 160);
|
||||
this.materialButton_roiAnalyze.Margin = new System.Windows.Forms.Padding(5, 8, 5, 8);
|
||||
this.materialButton_roiAnalyze.Location = new System.Drawing.Point(4, 126);
|
||||
this.materialButton_roiAnalyze.Margin = new System.Windows.Forms.Padding(4, 6, 4, 6);
|
||||
this.materialButton_roiAnalyze.MouseState = MaterialSkin.MouseState.HOVER;
|
||||
this.materialButton_roiAnalyze.Name = "materialButton_roiAnalyze";
|
||||
this.materialButton_roiAnalyze.NoAccentTextColor = System.Drawing.Color.Empty;
|
||||
this.materialButton_roiAnalyze.Size = new System.Drawing.Size(267, 60);
|
||||
this.materialButton_roiAnalyze.Size = new System.Drawing.Size(200, 48);
|
||||
this.materialButton_roiAnalyze.TabIndex = 6;
|
||||
this.materialButton_roiAnalyze.Text = "ROIs分析";
|
||||
this.materialButton_roiAnalyze.Type = MaterialSkin.Controls.MaterialButton.MaterialButtonType.Contained;
|
||||
@ -382,12 +380,12 @@
|
||||
this.materialButton_miniAnalyze.Depth = 0;
|
||||
this.materialButton_miniAnalyze.HighEmphasis = true;
|
||||
this.materialButton_miniAnalyze.Icon = ((System.Drawing.Image)(resources.GetObject("materialButton_miniAnalyze.Icon")));
|
||||
this.materialButton_miniAnalyze.Location = new System.Drawing.Point(5, 236);
|
||||
this.materialButton_miniAnalyze.Margin = new System.Windows.Forms.Padding(5, 8, 5, 8);
|
||||
this.materialButton_miniAnalyze.Location = new System.Drawing.Point(4, 186);
|
||||
this.materialButton_miniAnalyze.Margin = new System.Windows.Forms.Padding(4, 6, 4, 6);
|
||||
this.materialButton_miniAnalyze.MouseState = MaterialSkin.MouseState.HOVER;
|
||||
this.materialButton_miniAnalyze.Name = "materialButton_miniAnalyze";
|
||||
this.materialButton_miniAnalyze.NoAccentTextColor = System.Drawing.Color.Empty;
|
||||
this.materialButton_miniAnalyze.Size = new System.Drawing.Size(267, 60);
|
||||
this.materialButton_miniAnalyze.Size = new System.Drawing.Size(200, 48);
|
||||
this.materialButton_miniAnalyze.TabIndex = 7;
|
||||
this.materialButton_miniAnalyze.Text = "微孔版分析";
|
||||
this.materialButton_miniAnalyze.Type = MaterialSkin.Controls.MaterialButton.MaterialButtonType.Contained;
|
||||
@ -402,12 +400,12 @@
|
||||
this.materialButton_dotcounts.Depth = 0;
|
||||
this.materialButton_dotcounts.HighEmphasis = true;
|
||||
this.materialButton_dotcounts.Icon = ((System.Drawing.Image)(resources.GetObject("materialButton_dotcounts.Icon")));
|
||||
this.materialButton_dotcounts.Location = new System.Drawing.Point(5, 312);
|
||||
this.materialButton_dotcounts.Margin = new System.Windows.Forms.Padding(5, 8, 5, 8);
|
||||
this.materialButton_dotcounts.Location = new System.Drawing.Point(4, 246);
|
||||
this.materialButton_dotcounts.Margin = new System.Windows.Forms.Padding(4, 6, 4, 6);
|
||||
this.materialButton_dotcounts.MouseState = MaterialSkin.MouseState.HOVER;
|
||||
this.materialButton_dotcounts.Name = "materialButton_dotcounts";
|
||||
this.materialButton_dotcounts.NoAccentTextColor = System.Drawing.Color.Empty;
|
||||
this.materialButton_dotcounts.Size = new System.Drawing.Size(267, 60);
|
||||
this.materialButton_dotcounts.Size = new System.Drawing.Size(200, 48);
|
||||
this.materialButton_dotcounts.TabIndex = 8;
|
||||
this.materialButton_dotcounts.Text = "菌落计数";
|
||||
this.materialButton_dotcounts.Type = MaterialSkin.Controls.MaterialButton.MaterialButtonType.Contained;
|
||||
@ -422,12 +420,12 @@
|
||||
this.materialButton_correction.Depth = 0;
|
||||
this.materialButton_correction.HighEmphasis = true;
|
||||
this.materialButton_correction.Icon = ((System.Drawing.Image)(resources.GetObject("materialButton_correction.Icon")));
|
||||
this.materialButton_correction.Location = new System.Drawing.Point(5, 388);
|
||||
this.materialButton_correction.Margin = new System.Windows.Forms.Padding(5, 8, 5, 8);
|
||||
this.materialButton_correction.Location = new System.Drawing.Point(4, 306);
|
||||
this.materialButton_correction.Margin = new System.Windows.Forms.Padding(4, 6, 4, 6);
|
||||
this.materialButton_correction.MouseState = MaterialSkin.MouseState.HOVER;
|
||||
this.materialButton_correction.Name = "materialButton_correction";
|
||||
this.materialButton_correction.NoAccentTextColor = System.Drawing.Color.Empty;
|
||||
this.materialButton_correction.Size = new System.Drawing.Size(267, 60);
|
||||
this.materialButton_correction.Size = new System.Drawing.Size(200, 48);
|
||||
this.materialButton_correction.TabIndex = 9;
|
||||
this.materialButton_correction.Text = "蛋白归一化";
|
||||
this.materialButton_correction.Type = MaterialSkin.Controls.MaterialButton.MaterialButtonType.Contained;
|
||||
@ -447,10 +445,10 @@
|
||||
this.flowLayoutPanel2.Controls.Add(this.materialButton_forward);
|
||||
this.flowLayoutPanel2.Controls.Add(this.materialButton_return);
|
||||
this.flowLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.flowLayoutPanel2.Location = new System.Drawing.Point(280, 69);
|
||||
this.flowLayoutPanel2.Location = new System.Drawing.Point(210, 55);
|
||||
this.flowLayoutPanel2.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.flowLayoutPanel2.Name = "flowLayoutPanel2";
|
||||
this.flowLayoutPanel2.Size = new System.Drawing.Size(746, 39);
|
||||
this.flowLayoutPanel2.Size = new System.Drawing.Size(639, 31);
|
||||
this.flowLayoutPanel2.TabIndex = 19;
|
||||
//
|
||||
// materialButton_changeFormSize
|
||||
@ -643,12 +641,12 @@
|
||||
this.pl_right.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(39)))), ((int)(((byte)(51)))), ((int)(((byte)(63)))));
|
||||
this.pl_right.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.pl_right.EdgeColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(41)))), ((int)(((byte)(50)))));
|
||||
this.pl_right.Location = new System.Drawing.Point(1029, 71);
|
||||
this.pl_right.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.pl_right.Location = new System.Drawing.Point(851, 57);
|
||||
this.pl_right.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.pl_right.Name = "pl_right";
|
||||
this.pl_right.Padding = new System.Windows.Forms.Padding(5, 5, 5, 5);
|
||||
this.pl_right.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.tableLayoutPanel1.SetRowSpan(this.pl_right, 2);
|
||||
this.pl_right.Size = new System.Drawing.Size(431, 653);
|
||||
this.pl_right.Size = new System.Drawing.Size(244, 522);
|
||||
this.pl_right.SmoothingType = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
|
||||
this.pl_right.TabIndex = 20;
|
||||
this.pl_right.Text = "panel1";
|
||||
@ -657,28 +655,26 @@
|
||||
//
|
||||
this.thunderLabel1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.thunderLabel1.ForeColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.thunderLabel1.Location = new System.Drawing.Point(12, 6);
|
||||
this.thunderLabel1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.thunderLabel1.Location = new System.Drawing.Point(9, 5);
|
||||
this.thunderLabel1.Name = "thunderLabel1";
|
||||
this.thunderLabel1.Size = new System.Drawing.Size(267, 20);
|
||||
this.thunderLabel1.Size = new System.Drawing.Size(200, 16);
|
||||
this.thunderLabel1.TabIndex = 19;
|
||||
this.thunderLabel1.Text = "PBAnaly v0.1.8";
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.AutoValidate = System.Windows.Forms.AutoValidate.EnablePreventFocusChange;
|
||||
this.ClientSize = new System.Drawing.Size(1471, 760);
|
||||
this.ClientSize = new System.Drawing.Size(1103, 608);
|
||||
this.Controls.Add(this.thunderLabel1);
|
||||
this.Controls.Add(this.tableLayoutPanel1);
|
||||
this.DrawerAutoShow = true;
|
||||
this.FormStyle = MaterialSkin.Controls.MaterialForm.FormStyles.ActionBar_None;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.Name = "MainForm";
|
||||
this.Padding = new System.Windows.Forms.Padding(4, 30, 4, 4);
|
||||
this.Padding = new System.Windows.Forms.Padding(3, 24, 3, 3);
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "MainForm";
|
||||
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
|
||||
|
@ -3,6 +3,7 @@ using MaterialSkin;
|
||||
using MaterialSkin.Controls;
|
||||
using OpenCvSharp.Flann;
|
||||
using OpenTK;
|
||||
using PBAnaly.Assist;
|
||||
using PBAnaly.LoginCommon;
|
||||
using PBAnaly.Module;
|
||||
using PBAnaly.Properties;
|
||||
@ -15,6 +16,8 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using System.Xml.Linq;
|
||||
using System.Xml.Serialization;
|
||||
using Resources = PBAnaly.Properties.Resources;
|
||||
|
||||
namespace PBAnaly
|
||||
@ -77,7 +80,7 @@ namespace PBAnaly
|
||||
UserManage.LogionUserChanged += OnLogionUserChanged;
|
||||
|
||||
InitAccessControls();
|
||||
|
||||
LoadAccessFile();
|
||||
OnLogionUser();
|
||||
|
||||
UIInit();
|
||||
@ -115,6 +118,90 @@ namespace PBAnaly
|
||||
};
|
||||
}
|
||||
|
||||
#region LoadAccessFile 加载管理控件访问权限的文件,如果文件不存在,就根据界面的设置的控件创建一个
|
||||
/// <summary>
|
||||
/// 加载管理控件访问权限的文件,如果文件不存在,就根据界面的设置的控件创建一个
|
||||
/// </summary>
|
||||
private void LoadAccessFile()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!File.Exists("AccessControl.xml"))
|
||||
{
|
||||
CreatAccessControlFlie();
|
||||
}
|
||||
else
|
||||
{
|
||||
FileStream fs = new FileStream("AccessControl.xml", FileMode.Open);
|
||||
XmlSerializer xs = new XmlSerializer(typeof(List<AccessItem>));
|
||||
AccessControl.AccessItems = xs.Deserialize(fs) as List<AccessItem>;
|
||||
fs.Close();
|
||||
|
||||
if(AccessControl.AccessItems.Count!= mControls.Length)
|
||||
{
|
||||
string currentDirectory = AppDomain.CurrentDomain.BaseDirectory;
|
||||
string xmlFileName = "AccessControl.xml";
|
||||
// 拼接出完整的文件路径
|
||||
string filePath = Path.Combine(currentDirectory, xmlFileName);
|
||||
// 删除文件
|
||||
File.Delete(filePath);
|
||||
|
||||
CreatAccessControlFlie();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region CreatAccessControlFlie 创建管理控件权限访问的文件夹
|
||||
/// <summary>
|
||||
/// 创建管理控件权限访问的文件夹
|
||||
/// </summary>
|
||||
private void CreatAccessControlFlie()
|
||||
{
|
||||
try
|
||||
{
|
||||
// 创建XML根节点
|
||||
XElement root = new XElement("ArrayOfItem");
|
||||
for (int i = 0; i < mControls.Length; i++)
|
||||
{
|
||||
|
||||
|
||||
XElement item = new XElement("item",
|
||||
new XAttribute("Id", i),
|
||||
new XAttribute("Operator", "false"),
|
||||
new XAttribute("Engineer", "false"),
|
||||
new XAttribute("Administrator", "true"),
|
||||
new XAttribute("SuperAdministrator", "true"),
|
||||
new XAttribute("Disible", mControls[i].Text)
|
||||
);
|
||||
root.Add(item);
|
||||
}
|
||||
|
||||
// 保存XML到文件
|
||||
string filePath = "AccessControl.xml";
|
||||
root.Save(filePath);
|
||||
|
||||
AccessControl.AccessItems = new List<AccessItem>();
|
||||
|
||||
FileStream fs = new FileStream("AccessControl.xml", FileMode.Open);
|
||||
XmlSerializer xs = new XmlSerializer(typeof(List<AccessItem>));
|
||||
AccessControl.AccessItems = xs.Deserialize(fs) as List<AccessItem>;
|
||||
fs.Close();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region OnLogionUserChanged 处理登录用户更改事件
|
||||
/// <summary>
|
||||
/// 处理登录用户更改事件
|
||||
@ -433,6 +520,7 @@ namespace PBAnaly
|
||||
|
||||
private void materialButton_setting_Click(object sender, EventArgs e)
|
||||
{
|
||||
OperatingRecord.CreateRecord("系统设置按钮", "被点击了一下");
|
||||
SystemSettingForm system = new SystemSettingForm();
|
||||
system.ShowDialog();
|
||||
//if (settingForm != null)
|
||||
@ -552,13 +640,16 @@ namespace PBAnaly
|
||||
}
|
||||
private void materialButton_log_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (logForm != null)
|
||||
return;
|
||||
|
||||
logForm = new LogForm(materialSkinManager,InnerUserID);
|
||||
logForm.FormClosed += LogForm_FormClosed;
|
||||
logForm.TopMost = true;
|
||||
UI.LogForm logForm = new UI.LogForm(materialSkinManager);
|
||||
logForm.Show();
|
||||
|
||||
//if (logForm != null)
|
||||
// return;
|
||||
|
||||
//logForm = new LogForm(materialSkinManager,InnerUserID);
|
||||
//logForm.FormClosed += LogForm_FormClosed;
|
||||
//logForm.TopMost = true;
|
||||
//logForm.Show();
|
||||
}
|
||||
|
||||
private void LogForm_FormClosed(object sender, FormClosedEventArgs e)
|
||||
|
@ -57,6 +57,7 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Assist\OperatingRecord.cs" />
|
||||
<Compile Include="DataProcessForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@ -166,6 +167,12 @@
|
||||
<Compile Include="UI\ImagePanelUser.Designer.cs">
|
||||
<DependentUpon>ImagePanelUser.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UI\LogForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UI\LogForm.Designer.cs">
|
||||
<DependentUpon>LogForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UI\RowMergeView.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
@ -252,6 +259,9 @@
|
||||
<EmbeddedResource Include="UI\ImagePanelUser.resx">
|
||||
<DependentUpon>ImagePanelUser.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="UI\LogForm.resx">
|
||||
<DependentUpon>LogForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="UI\RowMergeView.resx">
|
||||
<DependentUpon>RowMergeView.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
@ -450,6 +460,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="GS-Analy.ico" />
|
||||
<None Include="Resources\登录-亮.png" />
|
||||
<None Include="Resources\添加用户.png" />
|
||||
<None Include="Resources\最小化white.png" />
|
||||
<None Include="Resources\最大化white.png" />
|
||||
|
@ -77,7 +77,7 @@ namespace PBAnaly
|
||||
string dbPath = "UserManage.db";
|
||||
string connectionString = $"Data Source={dbPath};Version=3;";
|
||||
UserManage.ConnectDb();
|
||||
AccessControl.LoadConfig();//加载权限
|
||||
//AccessControl.LoadConfig();//加载权限
|
||||
var login = new LoginForm();
|
||||
login.StartPosition = FormStartPosition.CenterScreen;
|
||||
Application.Run(new MainForm());
|
||||
|
10
src/PBAnaly/Properties/Resources.Designer.cs
generated
10
src/PBAnaly/Properties/Resources.Designer.cs
generated
@ -550,6 +550,16 @@ namespace PBAnaly.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap 登录_亮 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("登录-亮", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
|
@ -136,17 +136,14 @@
|
||||
<data name="EtBr_1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\EtBr_1.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="壁纸" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\壁纸.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="保存图片" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\保存图片.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="线段" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\线段.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="YellowHot_1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\YellowHot_1.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="饼干" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\饼干.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="Black_Green_0" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Black_Green_0.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Black_Green_1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Black_Green_1.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
@ -154,6 +151,9 @@
|
||||
<data name="Black_Red_1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Black_Red_1.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="前台" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\前台.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="保存" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\保存.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
@ -172,26 +172,26 @@
|
||||
<data name="波形设置-未选中" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\波形设置-未选中.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Gray" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Gray.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Black_Blue_1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Black_Blue_1.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="zoom-in" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\zoom-in.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="添加用户" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\添加用户.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="数据报告 (1)" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\数据报告 (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="线段 (1)" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\线段 (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="保存1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\保存.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="圖片_20240731174523" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\圖片_20240731174523.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="重置" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\重置.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="圆形" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\圆形.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Black_Red_0" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Black_Red_0.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
@ -199,8 +199,8 @@
|
||||
<data name="京仪科技定稿_画板 1 副本2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\京仪科技定稿_画板 1 副本2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="数据报告" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\数据报告.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="分析" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\分析.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="zoom-out" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\zoom-out.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
@ -211,8 +211,11 @@
|
||||
<data name="风控" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\风控.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="分析" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\分析.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="Black_SDS_1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Black_SDS_1.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="饼干" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\饼干.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="控制窗口" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\控制窗口.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
@ -244,11 +247,14 @@
|
||||
<data name="图片管理" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\图片管理.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="圆形" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\圆形.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="线段 (1)" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\线段 (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="最大化white" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\最大化white.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="執行日誌紀錄" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\執行日誌紀錄.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="圆形1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\圆形.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="主页面-图像编辑-正反片" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\主页面-图像编辑-正反片.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
@ -265,29 +271,26 @@
|
||||
<data name="Pseudo_1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Pseudo_1.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Gray" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Gray.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="线段" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\线段.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="10矩形" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\10矩形.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="放大" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\放大.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="最大化white" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\最大化white.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Black_Green_0" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Black_Green_0.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="執行日誌紀錄" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\執行日誌紀錄.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="YellowHot_1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\YellowHot_1.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="蛋白质-01" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\蛋白质-01.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="壁纸" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\壁纸.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="数据报告" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\数据报告.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="圆形1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\圆形.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="zoom-in" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\zoom-in.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="黑白平衡" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\黑白平衡.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
@ -295,16 +298,16 @@
|
||||
<data name="最小化white" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\最小化white.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Black_SDS_1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Black_SDS_1.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="重置" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\重置.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="前台" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\前台.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="放大" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\放大.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="波形图" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\波形图.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="添加用户" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\添加用户.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="登录-亮" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\登录-亮.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
BIN
src/PBAnaly/Resources/登录-亮.png
Normal file
BIN
src/PBAnaly/Resources/登录-亮.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 884 B |
137
src/PBAnaly/UI/LogForm.Designer.cs
generated
Normal file
137
src/PBAnaly/UI/LogForm.Designer.cs
generated
Normal file
@ -0,0 +1,137 @@
|
||||
namespace PBAnaly.UI
|
||||
{
|
||||
partial class LogForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
this.dataGridView1 = new System.Windows.Forms.DataGridView();
|
||||
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.Column6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// dataGridView1
|
||||
//
|
||||
this.dataGridView1.AllowUserToAddRows = false;
|
||||
this.dataGridView1.AllowUserToDeleteRows = false;
|
||||
this.dataGridView1.AllowUserToResizeColumns = false;
|
||||
this.dataGridView1.AllowUserToResizeRows = false;
|
||||
this.dataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
|
||||
this.dataGridView1.BackgroundColor = System.Drawing.Color.White;
|
||||
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
|
||||
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.Column1,
|
||||
this.Column2,
|
||||
this.Column3,
|
||||
this.Column4,
|
||||
this.Column5,
|
||||
this.Column6});
|
||||
this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.dataGridView1.Location = new System.Drawing.Point(3, 64);
|
||||
this.dataGridView1.MultiSelect = false;
|
||||
this.dataGridView1.Name = "dataGridView1";
|
||||
this.dataGridView1.ReadOnly = true;
|
||||
this.dataGridView1.RowHeadersVisible = false;
|
||||
this.dataGridView1.RowTemplate.Height = 23;
|
||||
this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
|
||||
this.dataGridView1.Size = new System.Drawing.Size(794, 383);
|
||||
this.dataGridView1.TabIndex = 497;
|
||||
//
|
||||
// Column1
|
||||
//
|
||||
this.Column1.HeaderText = "ID";
|
||||
this.Column1.Name = "Column1";
|
||||
this.Column1.ReadOnly = true;
|
||||
//
|
||||
// Column2
|
||||
//
|
||||
this.Column2.HeaderText = "Time";
|
||||
this.Column2.Name = "Column2";
|
||||
this.Column2.ReadOnly = true;
|
||||
//
|
||||
// Column3
|
||||
//
|
||||
this.Column3.HeaderText = "Operator";
|
||||
this.Column3.Name = "Column3";
|
||||
this.Column3.ReadOnly = true;
|
||||
//
|
||||
// Column4
|
||||
//
|
||||
this.Column4.HeaderText = "Role";
|
||||
this.Column4.Name = "Column4";
|
||||
this.Column4.ReadOnly = true;
|
||||
//
|
||||
// Column5
|
||||
//
|
||||
this.Column5.HeaderText = "Description";
|
||||
this.Column5.Name = "Column5";
|
||||
this.Column5.ReadOnly = true;
|
||||
//
|
||||
// Column6
|
||||
//
|
||||
this.Column6.HeaderText = "Action";
|
||||
this.Column6.Name = "Column6";
|
||||
this.Column6.ReadOnly = true;
|
||||
//
|
||||
// LogForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(800, 450);
|
||||
this.Controls.Add(this.dataGridView1);
|
||||
this.Name = "LogForm";
|
||||
this.Text = "LogForm";
|
||||
this.Load += new System.EventHandler(this.LogForm_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.DataGridView dataGridView1;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn Column2;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn Column4;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn Column5;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn Column6;
|
||||
}
|
||||
}
|
100
src/PBAnaly/UI/LogForm.cs
Normal file
100
src/PBAnaly/UI/LogForm.cs
Normal file
@ -0,0 +1,100 @@
|
||||
using MaterialSkin;
|
||||
using MaterialSkin.Controls;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace PBAnaly.UI
|
||||
{
|
||||
public partial class LogForm : MaterialForm
|
||||
{
|
||||
string Inner_UserID;
|
||||
public LogForm(MaterialSkinManager materialSkinManager)
|
||||
{
|
||||
InitializeComponent();
|
||||
UIInit();
|
||||
}
|
||||
|
||||
public MaterialSkinManager Inn_materialSkinManager;
|
||||
|
||||
public void UIInit()
|
||||
{
|
||||
this.Text = string.Format("Current User : {0}", Inner_UserID);
|
||||
//this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw | ControlStyles.AllPaintingInWmPaint, true);
|
||||
Inn_materialSkinManager = MaterialSkinManager.Instance; // 初始化 MaterialSkinManager 实例
|
||||
//Inn_materialSkinManager.AddFormToManage(this); // 将要应用 Material Design 的窗体添加到管理列表中
|
||||
//Inn_materialSkinManager.Theme = MaterialSkinManager.Themes.DARK; // Theme 属性用来设置整体的主题
|
||||
//Inn_materialSkinManager.ColorScheme = new ColorScheme(Primary.BlueGrey800, Primary.BlueGrey900, Primary.BlueGrey500, Accent.Cyan700, TextShade.WHITE); // ColorScheme 属性来设置配色方案
|
||||
|
||||
if (Inn_materialSkinManager.Theme == MaterialSkinManager.Themes.DARK)
|
||||
{
|
||||
dataGridView1.DefaultCellStyle.BackColor = Color.DimGray;
|
||||
}
|
||||
else
|
||||
{
|
||||
dataGridView1.DefaultCellStyle.BackColor = Color.LightGray;
|
||||
}
|
||||
}
|
||||
|
||||
private void LogForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
string filePath = AppDomain.CurrentDomain.BaseDirectory + $"OperatingRecord\\{DateTime.Now.ToString("yyyyMMdd") + ".csv"}";
|
||||
LoadCsvData(filePath);
|
||||
}
|
||||
|
||||
private void LoadCsvData(string filePath)
|
||||
{
|
||||
// 检查文件是否存在
|
||||
if (File.Exists(filePath))
|
||||
{
|
||||
try
|
||||
{
|
||||
// 读取CSV文件的所有行
|
||||
var lines = File.ReadAllLines(filePath);
|
||||
|
||||
// 清空DataGridView之前的数据
|
||||
dataGridView1.Rows.Clear();
|
||||
dataGridView1.Columns.Clear();
|
||||
|
||||
if (lines.Length > 0)
|
||||
{
|
||||
// 使用第一行数据作为列标题
|
||||
var headers = lines[0].Split(',');
|
||||
|
||||
// 添加列到DataGridView
|
||||
foreach (var header in headers)
|
||||
{
|
||||
dataGridView1.Columns.Add(header, header); // 第一个参数是列的Name,第二个是列的HeaderText
|
||||
}
|
||||
|
||||
// 从第二行开始添加数据
|
||||
for (int i = 1; i < lines.Length; i++)
|
||||
{
|
||||
var row = lines[i].Split(',');
|
||||
|
||||
// 将数据添加到DataGridView中
|
||||
dataGridView1.Rows.Add(row);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"读取CSV文件时出错: {ex.Message}", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("文件不存在", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
138
src/PBAnaly/UI/LogForm.resx
Normal file
138
src/PBAnaly/UI/LogForm.resx
Normal file
@ -0,0 +1,138 @@
|
||||
<?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.Runtime.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:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<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" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</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" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Column6.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
30
src/PBAnaly/UI/SystemSettingForm.Designer.cs
generated
30
src/PBAnaly/UI/SystemSettingForm.Designer.cs
generated
@ -33,11 +33,11 @@
|
||||
this.tabMain = new System.Windows.Forms.TabControl();
|
||||
this.tab_UserManage = new System.Windows.Forms.TabPage();
|
||||
this.pnlMainMenu = new System.Windows.Forms.Panel();
|
||||
this.btn_ReadManage = new System.Windows.Forms.Button();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.btn_Min = new System.Windows.Forms.Button();
|
||||
this.btn_Max = new System.Windows.Forms.Button();
|
||||
this.btn_Close = new System.Windows.Forms.Button();
|
||||
this.btn_ReadManage = new System.Windows.Forms.Button();
|
||||
this.panel1.SuspendLayout();
|
||||
this.panel_mode.SuspendLayout();
|
||||
this.tabMain.SuspendLayout();
|
||||
@ -64,7 +64,7 @@
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.panel_mode.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.panel_mode.Controls.Add(this.tabMain);
|
||||
this.panel_mode.Location = new System.Drawing.Point(58, 0);
|
||||
this.panel_mode.Location = new System.Drawing.Point(59, 0);
|
||||
this.panel_mode.Name = "panel_mode";
|
||||
this.panel_mode.Size = new System.Drawing.Size(1098, 639);
|
||||
this.panel_mode.TabIndex = 444;
|
||||
@ -103,19 +103,6 @@
|
||||
this.pnlMainMenu.Size = new System.Drawing.Size(77, 642);
|
||||
this.pnlMainMenu.TabIndex = 443;
|
||||
//
|
||||
// btn_ReadManage
|
||||
//
|
||||
this.btn_ReadManage.BackColor = System.Drawing.Color.White;
|
||||
this.btn_ReadManage.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.btn_ReadManage.Font = new System.Drawing.Font("宋体", 9F);
|
||||
this.btn_ReadManage.Image = global::PBAnaly.Properties.Resources.添加用户;
|
||||
this.btn_ReadManage.Location = new System.Drawing.Point(3, 3);
|
||||
this.btn_ReadManage.Name = "btn_ReadManage";
|
||||
this.btn_ReadManage.Size = new System.Drawing.Size(76, 86);
|
||||
this.btn_ReadManage.TabIndex = 3;
|
||||
this.btn_ReadManage.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||
this.btn_ReadManage.UseVisualStyleBackColor = false;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
@ -172,6 +159,19 @@
|
||||
this.btn_Close.UseVisualStyleBackColor = false;
|
||||
this.btn_Close.Click += new System.EventHandler(this.btn_Close_Click);
|
||||
//
|
||||
// btn_ReadManage
|
||||
//
|
||||
this.btn_ReadManage.BackColor = System.Drawing.Color.White;
|
||||
this.btn_ReadManage.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.btn_ReadManage.Font = new System.Drawing.Font("宋体", 9F);
|
||||
this.btn_ReadManage.Image = global::PBAnaly.Properties.Resources.登录_亮;
|
||||
this.btn_ReadManage.Location = new System.Drawing.Point(2, 3);
|
||||
this.btn_ReadManage.Name = "btn_ReadManage";
|
||||
this.btn_ReadManage.Size = new System.Drawing.Size(75, 86);
|
||||
this.btn_ReadManage.TabIndex = 3;
|
||||
this.btn_ReadManage.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||
this.btn_ReadManage.UseVisualStyleBackColor = false;
|
||||
//
|
||||
// SystemSettingForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
|
Loading…
Reference in New Issue
Block a user