提交rbac

提交设置右键错位的bug
This commit is contained in:
2025-04-08 15:15:02 +08:00
parent ab38ee029a
commit 9f7c6206ca
139 changed files with 27868 additions and 117 deletions

View File

@ -0,0 +1,121 @@

using DH.RBAC;
using DH.RBAC.Utility.Other;
using Sunny.UI;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace DH.RBAC.UserControls.Menus
{
public class UserMenuPanel : UIPanel
{
public UserMenuPanel()
{
UISymbolLabel lblAccountManage = new UISymbolLabel();
lblAccountManage.ForeColor = Color.FromArgb(153, 153, 153);
lblAccountManage.Location = new Point(7, 7);
lblAccountManage.MinimumSize = new Size(1, 1);
lblAccountManage.Padding = new System.Windows.Forms.Padding(32, 0, 0, 0);
lblAccountManage.Size = new Size(122, 44);
lblAccountManage.Style = UIStyle.Custom;
lblAccountManage.StyleCustomMode = true;
lblAccountManage.Symbol = 61508;
lblAccountManage.SymbolColor = Color.FromArgb(153, 153, 153);
lblAccountManage.SymbolSize = 28;
lblAccountManage.Text = "账户管理";
lblAccountManage.Click += new EventHandler(this.lblAccountManage_Click);
lblAccountManage.MouseEnter += new EventHandler(this.uiSymbolLabel1_MouseEnter);
lblAccountManage.MouseLeave += new EventHandler(this.uiSymbolLabel1_MouseLeave);
UISymbolLabel lblExit = new UISymbolLabel();
lblExit.ForeColor = Color.FromArgb(153, 153, 153);
lblExit.Location = new Point(6, 62);
lblExit.Padding = new System.Windows.Forms.Padding(32, 0, 0, 0);
lblExit.Size = new Size(122, 44);
lblExit.Style = UIStyle.Custom;
lblExit.StyleCustomMode = true;
lblExit.Symbol = 61584;
lblExit.SymbolColor = Color.FromArgb(153, 153, 153);
lblExit.SymbolSize = 28;
lblExit.TabIndex = 15;
lblExit.Text = "安全退出";
lblExit.Click += new EventHandler(this.lblExit_Click);
lblExit.MouseEnter += new EventHandler(this.uiSymbolLabel1_MouseEnter);
lblExit.MouseLeave += new EventHandler(this.uiSymbolLabel1_MouseLeave);
this.Style = UIStyle.Custom;
this.StyleCustomMode = true;
this.Size = new Size(134, 114);
this.BackColor = Color.White;
this.FillColor = Color.White;
this.RectColor = Color.Silver;
this.Controls.Add(lblExit);
this.Controls.Add(lblAccountManage);
}
/// <summary>
/// 账户管理点击事件处理
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void lblAccountManage_Click(object sender, EventArgs e)
{
FormHelper.ShowSubForm(new AccountForm());
}
/// <summary>
/// 鼠标进入按钮后,改变颜色
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void uiSymbolLabel1_MouseEnter(object sender, EventArgs e)
{
UISymbolLabel label = sender as UISymbolLabel;
label.BackColor = Color.FromArgb(244, 244, 244);
label.ForeColor = Color.FromArgb(181, 181, 181);
label.SymbolColor = Color.FromArgb(181, 181, 181);
}
/// <summary>
/// 鼠标离开按钮后,颜色改回来
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void uiSymbolLabel1_MouseLeave(object sender, EventArgs e)
{
UISymbolLabel label = sender as UISymbolLabel;
label.BackColor = Color.Transparent;
label.ForeColor = Color.FromArgb(153, 153, 153);
label.SymbolColor = Color.FromArgb(153, 153, 153);
}
/// <summary>
/// 安全退出
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void lblExit_Click(object sender, EventArgs e)
{
//自己关闭,重新打开自己
new Thread(() =>
{
string fileName = Process.GetCurrentProcess().MainModule.FileName;
ProcessStartInfo processStartInfo = new ProcessStartInfo(fileName);
new Process { StartInfo = processStartInfo }.Start();
}).Start();
Thread.Sleep(100);
Environment.Exit(0);
}
}
}

View File

@ -0,0 +1,120 @@
<?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>
</root>