Commit d0658333 刘韬

1

1 个父辈 a383feea
正在显示 32 个修改的文件 包含 525 行增加145 行删除
using HZH_Controls.Controls;
using HZH_Controls.Forms;
using log4net;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace HZH_Controls
{
public class CodeResourceControl
{
public static readonly ILog LOG = LogManager.GetLogger("LngResource");
//public delegate string GetStrDelegate(string id, string defaultStr);
//public static event GetStrDelegate GetStrEvent;
//public delegate string GetStringDelegate(string id, string defaultStr, params object[] param);
//public static event GetStringDelegate GetStringEvent;
public static bool OpenResourceLog = false;
public static string China = "zh-CN";
public static string English = "en-US";
//private static Dictionary<string, string> chineseMap = new Dictionary<string, string>();
//private static Dictionary<string, string> englishMap = new Dictionary<string, string>();
private static Dictionary<string,Dictionary<string, string>> LangMap = new Dictionary<string, Dictionary<string, string>>();
public delegate string GetLanguageDelegate();
public static event GetLanguageDelegate GetLanguageEvent;
public delegate void RefreshLanguageDelegate();
public static event RefreshLanguageDelegate RefreshLanguageEvent;
public static string GetLanguage()
{
if (GetLanguageEvent == null)
{
return China;
}
string result = GetLanguageEvent?.Invoke();
if (result == null)
{
return "";
}
return result;
}
private static string spiltStr = "_";
private static string Text = "Text";
public static string GetTextIdStr(string className, string controlName)
{
return className + spiltStr + controlName + spiltStr + Text;
}
public static string GetTextIdStr(string className)
{
return className + spiltStr + Text;
}
public static string GetString(string id, string defaultStr)
{
string strCurLanguage = defaultStr;
var haslang = getLangRes(CurrLanguage);
if (!haslang) {
return strCurLanguage;
}
try
{
LangMap[CurrLanguage].TryGetValue(id, out strCurLanguage);
if ((strCurLanguage == null || strCurLanguage.Equals("")) && (!defaultStr.Equals("")))
{
strCurLanguage = defaultStr;
NoIdLog(id, defaultStr);
}
}
catch (Exception ex)
{
if (defaultStr.Equals(""))
{
}
else
{
strCurLanguage = "No id:[" + id + "], please add.";
strCurLanguage = defaultStr;
NoIdLog(id, defaultStr);
}
}
if (strCurLanguage == null)
{
strCurLanguage = "";
}
return strCurLanguage;
}
public static string GetString(string id, string defaultStr, params object[] param)
{
string strCurLanguage = GetString(id, defaultStr);
return String.Format(strCurLanguage, param);
}
private static void NoIdLog(string id, string defaultStr)
{
if (OpenResourceLog)
{
if (!LangMap["zh-CN"].ContainsKey(id) && checkInterid(id))
LOG.Info("No Res id:" + id + "#" + defaultStr);
}
}
private static bool checkInterid(string id) {
string[] interstring = new string[] { "_txt", "_lbl" };
var x = from a in interstring
where id.IndexOf(a) > -1
select a;
return x.Count() == 0;
}
static CodeResourceControl()
{
}
private static bool getLangRes(string lang) {
if (!LangMap.ContainsKey(lang)) {
string path = Application.StartupPath + @"\resources\"+lang+".txt";
if (!File.Exists(path))
{
return false;
}
string[] lines = File.ReadAllLines(path);
var map = new Dictionary<string, string>();
foreach (string line in lines)
{
string[] array = line.Split('#');
if (array.Length >= 3)
{
string key = array[0];
string chinese = array[1];
string english = array[2];
if (map.ContainsKey(key))
{
map.Remove(key);
}
map.Add(key, english);
}
}
LangMap.Add(lang, map);
return true;
}
return true;
}
public static string CurrLanguage = "";
public static void LanguageProcess(ContainerControl cc, string className)
{
if (CurrLanguage.Equals(CodeResourceControl.GetLanguage()))
{
return;
}
//string className = cc.ClassName;
CurrLanguage = CodeResourceControl.GetLanguage();
string name = CodeResourceControl.GetString(CodeResourceControl.GetTextIdStr(className), cc.Text);
if (!name.Equals("")) { cc.Text = name; }
PreControlLanaguage(cc, className);
RefreshLanguageEvent?.Invoke();
}
private static void PreControlLanaguage(Control partentControl, string className)
{
//string className = this.ClassName;
Con_GetTxt(partentControl, out string title);
string newStr = CodeResourceControl.GetString(CodeResourceControl.GetTextIdStr(className, partentControl.Name), title);
if (!newStr.Equals(""))
{
Con_SetTxt(partentControl, newStr.Replace("\\n", "\n"));
}
foreach (Control con in partentControl.Controls)
{
string txt = "";
bool haslang = false;
if (Con_GetTxt(con, out txt))
{
newStr = CodeResourceControl.GetString(CodeResourceControl.GetTextIdStr(className, con.Name), txt);
if (!newStr.Equals(""))
{
Con_SetTxt(con, newStr.Replace("\\n", "\n"));
//haslang = true;
}
}
if (con is UCCheckBox)
continue;
if (con.Controls.Count > 0 && !haslang)
{
PreControlLanaguage(con, className);
}
}
}
static bool Con_GetTxt(Control con, out string txt)
{
txt = "";
if (con is Label || con is Button || con is RadioButton || con is CheckBox)
{
txt = con.Text;
return true;
}
string methodname = getMethodname(con);
var t = con.GetType();
var p = t.GetProperty(methodname);
if (p != null)
{
txt = p.GetValue(con, null).ToString();
return true;
}
return false;
}
static void Con_SetTxt(Control con, string txt)
{
if (con is Label || con is Button || con is RadioButton || con is CheckBox)
{
con.Text = txt;
return;
}
string methodname = getMethodname(con);
var t = con.GetType();
var p = t.GetProperty(methodname);
if (p == null)
return;
else
p.SetValue(con, txt,null);
}
static string getMethodname(Control con) {
string methodname = "Text";
if (con is UCBtnExt) methodname = "BtnText";
if (con is UCTextBoxEx) methodname = "InputText";
if (con is UCCheckBox) methodname = "TextValue";
if (con is UCPanelTitle || con is FrmWithTitle) methodname = "Title";
if (con is Form) methodname = "Title";
return methodname;
}
}
}
......@@ -79,7 +79,7 @@ namespace HZH_Controls.Controls
/// <summary>
/// The BTN back color
/// </summary>
private Color _btnBackColor = Color.White;
private Color _btnBackColor = Color.Transparent;
/// <summary>
/// 按钮背景色
/// </summary>
......@@ -248,7 +248,8 @@ namespace HZH_Controls.Controls
/// <param name="e">The <see cref="MouseEventArgs" /> instance containing the event data.</param>
private void lbl_MouseDown(object sender, MouseEventArgs e)
{
if (this.BtnClick != null)
Console.WriteLine("b:"+this.Enabled.ToString());
if (this.BtnClick != null && this.Enabled)
BtnClick(this, e);
}
}
......
......@@ -36,7 +36,7 @@ namespace HZH_Controls.Controls
/// <summary>
/// The fore color
/// </summary>
Color _ForeColor = Color.FromArgb(64, 64, 64);
private Color _ForeColor = Color.FromArgb(64, 64, 64);
/// <summary>
/// 文字颜色
/// </summary>
......
......@@ -99,7 +99,7 @@ namespace HZH_Controls.Controls
this.txtMinute.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.txtMinute.DecLength = 2;
this.txtMinute.Dock = System.Windows.Forms.DockStyle.Left;
this.txtMinute.Font = new System.Drawing.Font("Arial Unicode MS", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.txtMinute.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.txtMinute.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60)))));
this.txtMinute.InputType = HZH_Controls.TextInputType.Integer;
this.txtMinute.Location = new System.Drawing.Point(272, 0);
......@@ -120,7 +120,7 @@ namespace HZH_Controls.Controls
this.txtMinute.PromptFont = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.txtMinute.PromptText = "";
this.txtMinute.RegexPattern = "";
this.txtMinute.Size = new System.Drawing.Size(29, 27);
this.txtMinute.Size = new System.Drawing.Size(29, 23);
this.txtMinute.TabIndex = 5;
this.txtMinute.Text = "59";
this.txtMinute.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
......@@ -145,7 +145,7 @@ namespace HZH_Controls.Controls
this.txtHour.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.txtHour.DecLength = 2;
this.txtHour.Dock = System.Windows.Forms.DockStyle.Left;
this.txtHour.Font = new System.Drawing.Font("Arial Unicode MS", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.txtHour.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.txtHour.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60)))));
this.txtHour.InputType = HZH_Controls.TextInputType.Integer;
this.txtHour.Location = new System.Drawing.Point(211, 0);
......@@ -166,7 +166,7 @@ namespace HZH_Controls.Controls
this.txtHour.PromptFont = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.txtHour.PromptText = "";
this.txtHour.RegexPattern = "";
this.txtHour.Size = new System.Drawing.Size(29, 27);
this.txtHour.Size = new System.Drawing.Size(29, 23);
this.txtHour.TabIndex = 4;
this.txtHour.Text = "23";
this.txtHour.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
......@@ -192,7 +192,7 @@ namespace HZH_Controls.Controls
this.txtDay.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.txtDay.DecLength = 2;
this.txtDay.Dock = System.Windows.Forms.DockStyle.Left;
this.txtDay.Font = new System.Drawing.Font("Arial Unicode MS", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.txtDay.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.txtDay.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60)))));
this.txtDay.InputType = HZH_Controls.TextInputType.Integer;
this.txtDay.Location = new System.Drawing.Point(144, 0);
......@@ -213,7 +213,7 @@ namespace HZH_Controls.Controls
this.txtDay.PromptFont = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.txtDay.PromptText = "";
this.txtDay.RegexPattern = "";
this.txtDay.Size = new System.Drawing.Size(29, 27);
this.txtDay.Size = new System.Drawing.Size(29, 23);
this.txtDay.TabIndex = 3;
this.txtDay.Text = "12";
this.txtDay.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
......@@ -239,7 +239,7 @@ namespace HZH_Controls.Controls
this.txtMonth.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.txtMonth.DecLength = 2;
this.txtMonth.Dock = System.Windows.Forms.DockStyle.Left;
this.txtMonth.Font = new System.Drawing.Font("Arial Unicode MS", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.txtMonth.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.txtMonth.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60)))));
this.txtMonth.InputType = HZH_Controls.TextInputType.Integer;
this.txtMonth.Location = new System.Drawing.Point(83, 0);
......@@ -260,7 +260,7 @@ namespace HZH_Controls.Controls
this.txtMonth.PromptFont = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.txtMonth.PromptText = "";
this.txtMonth.RegexPattern = "";
this.txtMonth.Size = new System.Drawing.Size(29, 27);
this.txtMonth.Size = new System.Drawing.Size(29, 23);
this.txtMonth.TabIndex = 2;
this.txtMonth.Text = "12";
this.txtMonth.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
......@@ -287,7 +287,7 @@ namespace HZH_Controls.Controls
this.txtYear.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.txtYear.DecLength = 2;
this.txtYear.Dock = System.Windows.Forms.DockStyle.Left;
this.txtYear.Font = new System.Drawing.Font("Arial Unicode MS", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.txtYear.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.txtYear.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60)))));
this.txtYear.InputType = HZH_Controls.TextInputType.Integer;
this.txtYear.Location = new System.Drawing.Point(0, 0);
......@@ -308,7 +308,7 @@ namespace HZH_Controls.Controls
this.txtYear.PromptFont = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.txtYear.PromptText = "";
this.txtYear.RegexPattern = "";
this.txtYear.Size = new System.Drawing.Size(51, 27);
this.txtYear.Size = new System.Drawing.Size(51, 23);
this.txtYear.TabIndex = 1;
this.txtYear.Text = "2019";
this.txtYear.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
......
......@@ -220,6 +220,7 @@ namespace HZH_Controls.Controls
m_selectPan.TimeType = m_type;
m_frmAnchor = new Forms.FrmAnchor(this, m_selectPan);
m_frmAnchor.Show(this.FindForm());
m_frmAnchor.LanguageProcess();
}
/// <summary>
......
......@@ -25,6 +25,7 @@ using System.Windows.Forms;
namespace HZH_Controls.Controls
{
using crc = CodeResourceControl;
/// <summary>
/// Class UCDateTimeSelectPan.
/// Implements the <see cref="System.Windows.Forms.UserControl" />
......@@ -208,16 +209,18 @@ namespace HZH_Controls.Controls
/// </summary>
private void SetTimeToControl()
{
btnOk.BtnText = crc.GetString("clcpicker_ok", "确 定");
btnCancel.BtnText = crc.GetString("clcpicker_Cancel", "取 消");
btnYear.Tag = m_dt.Year;
btnYear.BtnText = m_dt.Year + "年";
btnYear.BtnText = m_dt.Year + crc.GetString("year","年");
btnMonth.Tag = m_dt.Month;
btnMonth.BtnText = m_dt.Month.ToString().PadLeft(2, '0') + "月";
btnMonth.BtnText = m_dt.Month.ToString().PadLeft(2, '0') + crc.GetString("month", "月");
btnDay.Tag = m_dt.Day;
btnDay.BtnText = m_dt.Day.ToString().PadLeft(2, '0') + "日";
btnDay.BtnText = m_dt.Day.ToString().PadLeft(2, '0') + crc.GetString("day","日");
btnHour.Tag = m_dt.Hour;
btnHour.BtnText = m_dt.Hour.ToString().PadLeft(2, '0') + "时";
btnHour.BtnText = m_dt.Hour.ToString().PadLeft(2, '0') + crc.GetString("hour","时");
btnMinute.Tag = m_dt.Minute;
btnMinute.BtnText = m_dt.Minute.ToString().PadLeft(2, '0') + "分";
btnMinute.BtnText = m_dt.Minute.ToString().PadLeft(2, '0') + crc.GetString("minutes", "分");
}
/// <summary>
......@@ -270,7 +273,7 @@ namespace HZH_Controls.Controls
panTime.Column = 4;
for (int i = 1; i <= 12; i++)
{
lstSource.Add(new KeyValuePair<string, string>(i.ToString(), i.ToString().PadLeft(2, '0') + "月\r\n" + (("2019-" + i + "-01").ToDate().ToString("MMM", System.Globalization.CultureInfo.CreateSpecificCulture("en-GB")))));
lstSource.Add(new KeyValuePair<string, string>(i.ToString(), i.ToString().PadLeft(2, '0') + crc.GetString("month", "月")+"\r\n" + (("2019-" + i + "-01").ToDate().ToString("MMM", System.Globalization.CultureInfo.CreateSpecificCulture("en-GB")))));
}
}
else if (btn == btnDay)
......@@ -294,7 +297,7 @@ namespace HZH_Controls.Controls
panTime.Column = 6;
for (int i = 0; i <= 24; i++)
{
lstSource.Add(new KeyValuePair<string, string>(i.ToString(), i.ToString() + "时"));
lstSource.Add(new KeyValuePair<string, string>(i.ToString(), i.ToString() + crc.GetString("hour", "时")));
}
}
else if (btn == btnMinute)
......
......@@ -250,6 +250,7 @@ namespace HZH_Controls.Controls
this.Controls.Clear();
this.SuspendLayout();
UCListItemExt _first = null;
_current = null;
for (int i = lst.Count - 1; i >= 0; i--)
{
var item = lst[i];
......@@ -269,7 +270,7 @@ namespace HZH_Controls.Controls
}
if (_autoSelectFirst)
SelectLabel(_first);
this.ResumeLayout(false);
this.ResumeLayout(true);
Timer timer = new Timer();
timer.Interval = 10;
......@@ -287,7 +288,24 @@ namespace HZH_Controls.Controls
ControlHelper.FreezeControl(this, false);
}
}
public void ClearSelect() {
try
{
HZH_Controls.ControlHelper.FreezeControl(this, true);
this.FindForm().ActiveControl = this;
if (_current != null)
{
_current.ItemBackColor = _itemBackColor;
_current.ItemForeColor = _itemForeColor;
_current.ItemForeColor2 = _itemForeColor2;
}
_current = null;
}
finally
{
HZH_Controls.ControlHelper.FreezeControl(this, false);
}
}
/// <summary>
/// Selects the label.
/// </summary>
......
......@@ -48,37 +48,37 @@ namespace HZH_Controls.Controls
/// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.listlabel1 = new System.Windows.Forms.Label();
this.listlabel3 = new System.Windows.Forms.Label();
this.splitLine_H1 = new HZH_Controls.Controls.UCSplitLine_H();
this.label2 = new System.Windows.Forms.Label();
this.listlabel2 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// label1
//
this.label1.Dock = System.Windows.Forms.DockStyle.Fill;
this.label1.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.Location = new System.Drawing.Point(0, 0);
this.label1.Name = "label1";
this.label1.Padding = new System.Windows.Forms.Padding(15, 0, 0, 0);
this.label1.Size = new System.Drawing.Size(173, 48);
this.label1.TabIndex = 0;
this.label1.Text = "label1";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.label1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.item_MouseDown);
this.listlabel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.listlabel1.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.listlabel1.Location = new System.Drawing.Point(0, 0);
this.listlabel1.Name = "label1";
this.listlabel1.Padding = new System.Windows.Forms.Padding(15, 0, 0, 0);
this.listlabel1.Size = new System.Drawing.Size(173, 48);
this.listlabel1.TabIndex = 0;
this.listlabel1.Text = "label1";
this.listlabel1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.listlabel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.item_MouseDown);
//
// label3
//
this.label3.Dock = System.Windows.Forms.DockStyle.Right;
this.label3.Font = new System.Drawing.Font("微软雅黑", 14F);
this.label3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(73)))), ((int)(((byte)(119)))), ((int)(((byte)(232)))));
this.label3.Location = new System.Drawing.Point(173, 0);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(139, 48);
this.label3.TabIndex = 2;
this.label3.Text = "label3";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label3.MouseDown += new System.Windows.Forms.MouseEventHandler(this.item_MouseDown);
this.listlabel3.Dock = System.Windows.Forms.DockStyle.Right;
this.listlabel3.Font = new System.Drawing.Font("微软雅黑", 14F);
this.listlabel3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(73)))), ((int)(((byte)(119)))), ((int)(((byte)(232)))));
this.listlabel3.Location = new System.Drawing.Point(173, 0);
this.listlabel3.Name = "label3";
this.listlabel3.Size = new System.Drawing.Size(139, 48);
this.listlabel3.TabIndex = 2;
this.listlabel3.Text = "label3";
this.listlabel3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.listlabel3.MouseDown += new System.Windows.Forms.MouseEventHandler(this.item_MouseDown);
//
// splitLine_H1
//
......@@ -93,22 +93,22 @@ namespace HZH_Controls.Controls
//
// label2
//
this.label2.Dock = System.Windows.Forms.DockStyle.Right;
this.label2.Image = global::HZH_Controls.Properties.Resources.more1;
this.label2.Location = new System.Drawing.Point(312, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(43, 48);
this.label2.TabIndex = 1;
this.label2.Visible = false;
this.label2.MouseDown += new System.Windows.Forms.MouseEventHandler(this.item_MouseDown);
this.listlabel2.Dock = System.Windows.Forms.DockStyle.Right;
this.listlabel2.Image = global::HZH_Controls.Properties.Resources.more1;
this.listlabel2.Location = new System.Drawing.Point(312, 0);
this.listlabel2.Name = "label2";
this.listlabel2.Size = new System.Drawing.Size(43, 48);
this.listlabel2.TabIndex = 1;
this.listlabel2.Visible = false;
this.listlabel2.MouseDown += new System.Windows.Forms.MouseEventHandler(this.item_MouseDown);
//
// UCListItemExt
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.White;
this.Controls.Add(this.label1);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.listlabel1);
this.Controls.Add(this.listlabel3);
this.Controls.Add(this.listlabel2);
this.Controls.Add(this.splitLine_H1);
this.Name = "UCListItemExt";
this.Size = new System.Drawing.Size(355, 49);
......@@ -121,15 +121,15 @@ namespace HZH_Controls.Controls
/// <summary>
/// The label1
/// </summary>
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label listlabel1;
/// <summary>
/// The label2
/// </summary>
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label listlabel2;
/// <summary>
/// The label3
/// </summary>
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label listlabel3;
/// <summary>
/// The split line h1
/// </summary>
......
......@@ -39,8 +39,8 @@ namespace HZH_Controls.Controls
[Description("标题"), Category("自定义")]
public string Title
{
get { return label1.Text; }
set { label1.Text = value; }
get { return listlabel1.Text; }
set { listlabel1.Text = value; }
}
/// <summary>
/// Gets or sets the title2.
......@@ -49,14 +49,14 @@ namespace HZH_Controls.Controls
[Description("副标题"), Category("自定义")]
public string Title2
{
get { return label3.Text; }
get { return listlabel3.Text; }
set
{
label3.Text = value;
label3.Visible = !string.IsNullOrEmpty(value);
var g = label3.CreateGraphics();
var size = g.MeasureString(value, label3.Font);
label3.Width = (int)size.Width + 10;
listlabel3.Text = value;
listlabel3.Visible = !string.IsNullOrEmpty(value);
var g = listlabel3.CreateGraphics();
var size = g.MeasureString(value, listlabel3.Font);
listlabel3.Width = (int)size.Width + 10;
}
}
......@@ -67,10 +67,10 @@ namespace HZH_Controls.Controls
[Description("标题字体"), Category("自定义")]
public Font TitleFont
{
get { return label1.Font; }
get { return listlabel1.Font; }
set
{
label1.Font = value;
listlabel1.Font = value;
}
}
......@@ -81,10 +81,10 @@ namespace HZH_Controls.Controls
[Description("副标题字体"), Category("自定义")]
public Font Title2Font
{
get { return label3.Font; }
get { return listlabel3.Font; }
set
{
label3.Font = value;
listlabel3.Font = value;
}
}
......@@ -109,8 +109,8 @@ namespace HZH_Controls.Controls
[Description("标题文本色"), Category("自定义")]
public Color ItemForeColor
{
get { return label1.ForeColor; }
set { label1.ForeColor = value; }
get { return listlabel1.ForeColor; }
set { listlabel1.ForeColor = value; }
}
/// <summary>
......@@ -120,8 +120,8 @@ namespace HZH_Controls.Controls
[Description("副标题文本色"), Category("自定义")]
public Color ItemForeColor2
{
get { return label3.ForeColor; }
set { label3.ForeColor = value; }
get { return listlabel3.ForeColor; }
set { listlabel3.ForeColor = value; }
}
/// <summary>
......@@ -131,8 +131,8 @@ namespace HZH_Controls.Controls
[Description("是否显示右侧更多箭头"), Category("自定义")]
public bool ShowMoreBtn
{
get { return label2.Visible; }
set { label2.Visible = value; ; }
get { return listlabel2.Visible; }
set { listlabel2.Visible = value; ; }
}
/// <summary>
......
......@@ -132,6 +132,40 @@ namespace HZH_Controls.Controls
set { _headSelectedBackColor = value; }
}
/// <summary>
/// The head Txt color
/// </summary>
private Color _headTxtColor = Color.FromArgb(0, 0, 0);
/// <summary>
/// Gets or sets the color of the head txt.
/// </summary>
/// <value>The color of the head txt.</value>
[DefaultValue(typeof(Color), "0, 0, 0")]
[Description("TabPage字颜色")]
public Color HeadTxtColor
{
get { return _headTxtColor; }
set { _headTxtColor = value; }
}
/// <summary>
/// The head disabled color
/// </summary>
private Color _headTxtDisabledColor = Color.FromArgb(0, 0, 0);
/// <summary>
/// Gets or sets the color of the head txt Disabled.
/// </summary>
/// <value>The color of the head txt Disabled.</value>
[DefaultValue(typeof(Color), "0, 0, 0")]
[Description("TabPage页禁用字颜色")]
public Color HeadTxtDisabledColor
{
get { return _headTxtDisabledColor; }
set { _headTxtDisabledColor = value; }
}
/// <summary>
/// The head selected border color
/// </summary>
......@@ -357,11 +391,12 @@ namespace HZH_Controls.Controls
if (this.TabPages[index].Enabled == false)
{
forebrush = SystemBrushes.ControlDark;
forebrush = new SolidBrush(_headTxtDisabledColor);
}
else
{
forebrush = SystemBrushes.ControlText;
//forebrush = SystemBrushes.ControlText;
forebrush = new SolidBrush(_headTxtColor);
}
Font tabFont = this.Font;
......@@ -495,15 +530,21 @@ namespace HZH_Controls.Controls
/// <param name="m">一个 Windows 消息对象。</param>
protected override void WndProc(ref Message m)
{
base.WndProc(ref m);
if (m.Msg == 0x0201) // WM_LBUTTONDOWN
{
if (!DesignMode)
{
var mouseLocation = this.PointToClient(Control.MousePosition);
int index = GetMouseDownTabHead(mouseLocation);
if (index == -1)
return;
if (!this.TabPages[index].Enabled)
return;
else
base.WndProc(ref m);
if (IsShowCloseBtn)
{
var mouseLocation = this.PointToClient(Control.MousePosition);
int index = GetMouseDownTabHead(mouseLocation);
if (index >= 0)
{
if (UncloseTabIndexs != null)
......@@ -521,9 +562,13 @@ namespace HZH_Controls.Controls
}
}
}
else
base.WndProc(ref m);
}
else
base.WndProc(ref m);
}
/// <summary>
/// 在调度键盘或输入消息之前,在消息循环内对它们进行预处理。
......
......@@ -75,6 +75,7 @@ namespace HZH_Controls.Forms
this.Size = childControl.Size;
this.HandleCreated += FrmDownBoard_HandleCreated;
this.HandleDestroyed += FrmDownBoard_HandleDestroyed;
this.Shown += FrmAnchor_Shown;
this.Controls.Add(childControl);
childControl.Dock = DockStyle.Fill;
......@@ -90,8 +91,33 @@ namespace HZH_Controls.Forms
}
}
parentControl.LocationChanged += frmP_LocationChanged;
CodeResourceControl.RefreshLanguageEvent += CodeResourceControl_RefreshLanguageEvent;
//CodeResourceControl.OpenResourceLog = true;
//CodeResourceControl.GetLanguageEvent += CodeResourceControl_GetLanguageEvent;
}
private void CodeResourceControl_RefreshLanguageEvent()
{
LanguageProcess();
}
//public string CurrLang="zh-CN";
private string CodeResourceControl_GetLanguageEvent()
{
///return "en-US";
if (m_parentControl.TopLevelControl.Tag == null)
return null;
return m_parentControl.TopLevelControl.Tag.ToString();
}
private void FrmAnchor_Shown(object sender, EventArgs e)
{
LanguageProcess();
}
public void LanguageProcess()
{
CodeResourceControl.LanguageProcess(this, this.GetType().Name);
}
/// <summary>
/// Initializes a new instance of the <see cref="FrmAnchor" /> class.
......
......@@ -120,10 +120,10 @@
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="btnBack1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAA4AAAAYCAYAAADKx8xXAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsEAAA7BAbiRa+0AAABnSURBVDhPYyAV/IcCKJc48Pz5tf//AwLAGCpEGPw/cwau
iWiN6Jr+p6UR1jjYNc2cSQVNQD5UCjcY5JpAgCxNIICiEYRJScSDRzMoK0GlCINRzUAMzHJQKcIAlLWQ
NUOFiQMIzQH/AUt/OaDjNm1jAAAAAElFTkSuQmCC
iVBORw0KGgoAAAANSUhEUgAAAA4AAAAYCAYAAADKx8xXAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wQAADsEBuJFr7QAAAGdJREFUOE9jIBX8hwIolzjw/Pm1//8DAsAYKkQY/D9zBq6JaI3omv6npRHWONg1
zZxJBU1APlQKNxjkmkCALE0ggKIRhElJxINHMygrQaUIg1HNQAzMclApwgCUtZA1Q4WJAwjNAf8BS385
oOM2bWMAAAAASUVORK5CYII=
</value>
</data>
<metadata name="imageList1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
......@@ -134,7 +134,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAE
CgAAAk1TRnQBSQFMAwEBAAHQAQAB0AEAAR4BAAEeAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA
CgAAAk1TRnQBSQFMAwEBAAHwAQAB8AEAAR4BAAEeAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA
AXgDAAEeAwABAQEAAQgFAAEQAQ4YAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
......
......@@ -261,8 +261,21 @@ namespace HZH_Controls.Forms
//base.HandleDestroyed += new EventHandler(this.FrmBase_HandleDestroyed);
this.KeyDown += FrmBase_KeyDown;
this.FormClosing += FrmBase_FormClosing;
}
this.Shown += FrmBase_Shown;
//CodeResourceControl.OpenResourceLog = true;
}
//public CodeResourceControl crcc = new CodeResourceControl();
private void FrmBase_Shown(object sender, EventArgs e)
{
LanguageProcess();
}
public void LanguageProcess()
{
CodeResourceControl.LanguageProcess(this, this.GetType().Name);
}
/// <summary>
/// Handles the FormClosing event of the FrmBase control.
/// </summary>
......
......@@ -125,7 +125,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAs
7QAAAk1TRnQBSQFMAgEBFAEAAaABAAGgAQABxgEAAcYBAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
7QAAAk1TRnQBSQFMAgEBFAEAAbABAAGwAQABxgEAAcYBAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABGAEDAgABpAEEAgABAQEAAQgFAAFgAVsBDhcAAYACAAGAAwACgAEAAYADAAGAAQABgAEAAoACAAPA
AQABwAHcAcABAAHwAcoBpgEAATMFAAEzAQABMwEAATMBAAIzAgADFgEAAxwBAAMiAQADKQEAA1UBAANN
AQADQgEAAzkBAAGAAXwB/wEAAlAB/wEAAZMBAAHWAQAB/wHsAcwBAAHGAdYB7wEAAdYC5wEAAZABqQGt
......
......@@ -79,6 +79,7 @@ namespace HZH_Controls.Forms
// btnClose
//
this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnClose.BackColor = System.Drawing.Color.Transparent;
this.btnClose.BackgroundImage = global::HZH_Controls.Properties.Resources.dialog_close;
this.btnClose.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.btnClose.Location = new System.Drawing.Point(399, 0);
......
......@@ -31,6 +31,9 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net">
<HintPath>..\..\..\AutoCountMachine-Single\AutoCountMachine-Single\bin\Debug\log4net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Design" />
......@@ -46,6 +49,7 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="CodeResourceControl.cs" />
<Compile Include="Colors\BasisColors.cs" />
<Compile Include="Colors\ColorEnums.cs" />
<Compile Include="Colors\BorderColors.cs" />
......
......@@ -19,7 +19,7 @@ namespace HZH_Controls.Properties {
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
......@@ -47,7 +47,7 @@ namespace HZH_Controls.Properties {
}
/// <summary>
/// 使用此强类型资源类,为所有资源查找
/// 重写当前线程的 CurrentUICulture 属性
/// 重写当前线程的 CurrentUICulture 属性。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
......
......@@ -151,9 +151,6 @@
<data name="datetLeft" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\datetLeft.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="dialog_close" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\dialog_close.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="help" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\help.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
......@@ -238,4 +235,7 @@
<data name="more1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\more1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="dialog_close" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\dialog_close.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
\ No newline at end of file

450 字节 | 宽: | 高:

526 字节 | 宽: | 高:

HZH_Controls/HZH_Controls/Resources/input_clear.png
HZH_Controls/HZH_Controls/Resources/input_clear.png
HZH_Controls/HZH_Controls/Resources/input_clear.png
HZH_Controls/HZH_Controls/Resources/input_clear.png
  • 两方对比
  • 交换覆盖
  • 透明覆盖
......@@ -67,9 +67,9 @@
this.tvMenu.ShowLines = false;
this.tvMenu.ShowPlusMinus = false;
this.tvMenu.ShowRootLines = false;
this.tvMenu.Size = new System.Drawing.Size(208, 707);
this.tvMenu.Size = new System.Drawing.Size(267, 1039);
this.tvMenu.TabIndex = 7;
this.tvMenu.TipFont = new System.Drawing.Font("Arial Unicode MS", 12F);
this.tvMenu.TipFont = new System.Drawing.Font("Microsoft Sans Serif", 12F);
this.tvMenu.TipImage = ((System.Drawing.Image)(resources.GetObject("tvMenu.TipImage")));
this.scrollbarComponent1.SetUserCustomScrollbar(this.tvMenu, true);
this.tvMenu.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.tvMenu_AfterSelect);
......@@ -78,9 +78,9 @@
//
this.ucSplitLine_V1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(232)))), ((int)(((byte)(232)))));
this.ucSplitLine_V1.Dock = System.Windows.Forms.DockStyle.Left;
this.ucSplitLine_V1.Location = new System.Drawing.Point(208, 61);
this.ucSplitLine_V1.Location = new System.Drawing.Point(267, 61);
this.ucSplitLine_V1.Name = "ucSplitLine_V1";
this.ucSplitLine_V1.Size = new System.Drawing.Size(1, 707);
this.ucSplitLine_V1.Size = new System.Drawing.Size(1, 1039);
this.ucSplitLine_V1.TabIndex = 8;
this.ucSplitLine_V1.TabStop = false;
//
......@@ -88,9 +88,9 @@
//
this.panControl.AutoScroll = true;
this.panControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.panControl.Location = new System.Drawing.Point(209, 61);
this.panControl.Location = new System.Drawing.Point(268, 61);
this.panControl.Name = "panControl";
this.panControl.Size = new System.Drawing.Size(815, 669);
this.panControl.Size = new System.Drawing.Size(1268, 1022);
this.panControl.TabIndex = 9;
this.scrollbarComponent1.SetUserCustomScrollbar(this.panControl, true);
//
......@@ -98,16 +98,16 @@
//
this.panel1.Controls.Add(this.linkLabel1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel1.Location = new System.Drawing.Point(209, 730);
this.panel1.Location = new System.Drawing.Point(268, 1083);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(815, 38);
this.panel1.Size = new System.Drawing.Size(1268, 17);
this.panel1.TabIndex = 0;
//
// linkLabel1
//
this.linkLabel1.Anchor = System.Windows.Forms.AnchorStyles.None;
this.linkLabel1.AutoSize = true;
this.linkLabel1.Location = new System.Drawing.Point(252, 11);
this.linkLabel1.Location = new System.Drawing.Point(479, 0);
this.linkLabel1.Name = "linkLabel1";
this.linkLabel1.Size = new System.Drawing.Size(311, 17);
this.linkLabel1.TabIndex = 0;
......@@ -119,7 +119,7 @@
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1024, 768);
this.ClientSize = new System.Drawing.Size(1536, 1100);
this.Controls.Add(this.panControl);
this.Controls.Add(this.panel1);
this.Controls.Add(this.ucSplitLine_V1);
......
......@@ -136,30 +136,30 @@
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="tvMenu.NodeDownPic" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAACuSURBVDhP7ZJhDYMwEIUrAQlIqBSkTAIScABK2jlgDiaBOWDfJW9kYzS9n1vCl7y0vHtXKG04
+WFyzhGtKMuqklK6qifK+oRCr8BFVhHLKNvLOqb6VrCaZSwrqwzBluCDcUaN7A3z0F2Zr/ohBDtkXznK
2sCbVOtk+aBh2DfaXN4gyw9NDdu6MS6olRZ5vq3uoTG+/c9Z8+JhuWCB1/UwVa+TCxayg5j0ePJfhPAE
qDCkpCB9CTIAAAAASUVORK5CYII=
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABGdBTUEAALGPC/xhBQAAAK5JREFUOE/t
kmENgzAQhSsBCUioFKRMAhJwAEraOWAOJoE5YN8lb2RjNL2fW8KXvLS8e1cobTj5YXLOEa0oy6qSUrqq
J8r6hEKvwEVWEcso28s6pvpWsJplLCurDMGW4INxRo3sDfPQXZmv+iEEO2RfOcrawJtU62T5oGHYN9pc
3iDLD00N27oxLqiVFnm+re6hMb79z1nz4mG5YIHX9TBVr5MLFrKDmPR48l+E8ASoMKSkIH0JMgAAAABJ
RU5ErkJggg==
</value>
</data>
<data name="tvMenu.NodeUpPic" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAC2SURBVDhP7ZLhDYIwFIQZwREcwVEYhREYwQ1kExmgTR3BDXCD+p05TDQIVX8YE77kQrl3r+U1
VCt/SgihizEe/PodbNSgbDW2PyOltGOTAZ2sQZ7L70HjhlETurDeSlrLU82xcviaPcpsUNvSXdbyVLNV
xtjIs7N1R97zQbNoNBpu9zY1mjxqZ2WKRifYo0z45eWrpgxfebQ1DaFWQbT4eyjjbGvrkfFU1NtaRFn1
zE2z8nOq6go4iq5z08HGTQAAAABJRU5ErkJggg==
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABGdBTUEAALGPC/xhBQAAALZJREFUOE/t
kuENgjAUhBnBERzBURiFERjBDWQTGaBNHcENcIP6nTlMNAhVfxgTvuRCuXev5TVUK39KCKGLMR78+h1s
1KBsNbY/I6W0Y5MBnaxBnsvvQeOGURO6sN5KWstTzbFy+Jo9ymxQ29Jd1vJUs1XG2Mizs3VH3vNBs2g0
Gm73NjWaPGpnZYpGJ9ijTPjl5aumDF95tDUNoVZBtPh7KONsa+uR8VTU21pEWfXMTbPyc6rqCjiKrnPT
wcZNAAAAAElFTkSuQmCC
</value>
</data>
<data name="tvMenu.TipImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAADmSURBVDhPrZRNDoIwEIXH2+gNpEBI1OgCqufTJRdxyRE0Ue5gjBvcjI/amogDUuUlXyDz81KG
tiSJtZqBLevwBCoL3hHL4rktaxfrYIyGPeAvoCYY27Z3sY4TFFwbDV2gNk5s+1NmJVl4EYq7MT12ZUw0
QrD4KOpPUXsQb6KFkPQDHsTraCcmfYAH4TvPYtIHeGDQZo/IBf2paiOfX96GMTo2gr9QwkjlQsITlROn
wUpOepCp5XAb0uzuf45IOp0YE6dBDq2TvUb6fCZqWq4RJzMzDM8enRLLv+N5AwcTq3NuJi8RPQApRqhG
KfUq3QAAAABJRU5ErkJggg==
iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAABGdBTUEAALGPC/xhBQAAAOZJREFUOE+t
lE0OgjAQhcfb6A2kQEjU6AKq59MlF3HJETRR7mCMG9yMj9qaiANS5SVfIPPzUoa2JIm1moEt6/AEKgve
EcviuS1rF+tgjIY94C+gJhjbtnexjhMUXBsNXaA2Tmz7U2YlWXgRirsxPXZlTDRCsPgo6k9RexBvooWQ
9AMexOtoJyZ9gAfhO89i0gd4YNBmj8gF/alqI59f3oYxOjaCv1DCSOVCwhOVE6fBSk56kKnlcBvS7O5/
jkg6nRgTp0EOrZO9Rvp8JmparhEnMzMMzx6dEsu/43kDBxOrc24mLxE9AClGqEYp9SrdAAAAAElFTkSu
QmCC
</value>
</data>
<metadata name="scrollbarComponent1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
......
using System;
using HZH_Controls;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
......@@ -11,8 +12,10 @@ namespace Test
{
public partial class FrmWithTitleTest : HZH_Controls.Forms.FrmWithTitle
{
public FrmWithTitleTest()
{
LanguageProcess();
InitializeComponent();
}
}
......
......@@ -20,6 +20,11 @@ namespace Test.UC
private void UCForms_Load(object sender, EventArgs e)
{
var n = DateTime.Now;
ucDatePickerExt1.CurrentTime= new DateTime(n.Year, n.Month, n.Day, 23, 59, 59);
ucComboBox2.ForeColor = Color.White;
List<KeyValuePair<string, string>> lstCom = new List<KeyValuePair<string, string>>();
for (int i = 0; i < 5; i++)
{
......
......@@ -33,6 +33,7 @@ namespace Test.UC
});
}
this.ucListExt1.SetList(lst);
this.ucListExt1.SetList(lst);
List<ListEntity> lst2 = new List<ListEntity>();
for (int i = 0; i < 5; i++)
......
......@@ -68,7 +68,7 @@
//
this.ucProcessEllipse3.BackEllipseColor = System.Drawing.Color.FromArgb(((int)(((byte)(228)))), ((int)(((byte)(231)))), ((int)(((byte)(237)))));
this.ucProcessEllipse3.CoreEllipseColor = System.Drawing.Color.FromArgb(((int)(((byte)(16)))), ((int)(((byte)(157)))), ((int)(((byte)(144)))));
this.ucProcessEllipse3.Font = new System.Drawing.Font("Arial Unicode MS", 23F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.ucProcessEllipse3.Font = new System.Drawing.Font("Microsoft Sans Serif", 23F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.ucProcessEllipse3.ForeColor = System.Drawing.Color.White;
this.ucProcessEllipse3.IsShowCoreEllipseBorder = false;
this.ucProcessEllipse3.Location = new System.Drawing.Point(544, 19);
......@@ -87,10 +87,10 @@
//
this.ucProcessEllipse4.BackEllipseColor = System.Drawing.Color.FromArgb(((int)(((byte)(228)))), ((int)(((byte)(231)))), ((int)(((byte)(237)))));
this.ucProcessEllipse4.CoreEllipseColor = System.Drawing.Color.FromArgb(((int)(((byte)(228)))), ((int)(((byte)(231)))), ((int)(((byte)(237)))));
this.ucProcessEllipse4.Font = new System.Drawing.Font("Arial Unicode MS", 23F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.ucProcessEllipse4.Font = new System.Drawing.Font("Microsoft Sans Serif", 23F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.ucProcessEllipse4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(16)))), ((int)(((byte)(157)))), ((int)(((byte)(144)))));
this.ucProcessEllipse4.IsShowCoreEllipseBorder = true;
this.ucProcessEllipse4.Location = new System.Drawing.Point(204, 19);
this.ucProcessEllipse4.Location = new System.Drawing.Point(164, 95);
this.ucProcessEllipse4.MaxValue = 100;
this.ucProcessEllipse4.Name = "ucProcessEllipse4";
this.ucProcessEllipse4.ShowType = HZH_Controls.Controls.ShowType.Ring;
......@@ -106,7 +106,7 @@
//
this.ucProcessEllipse1.BackEllipseColor = System.Drawing.Color.FromArgb(((int)(((byte)(228)))), ((int)(((byte)(231)))), ((int)(((byte)(237)))));
this.ucProcessEllipse1.CoreEllipseColor = System.Drawing.Color.FromArgb(((int)(((byte)(228)))), ((int)(((byte)(231)))), ((int)(((byte)(237)))));
this.ucProcessEllipse1.Font = new System.Drawing.Font("Arial Unicode MS", 23F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.ucProcessEllipse1.Font = new System.Drawing.Font("Microsoft Sans Serif", 23F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.ucProcessEllipse1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(16)))), ((int)(((byte)(157)))), ((int)(((byte)(144)))));
this.ucProcessEllipse1.IsShowCoreEllipseBorder = true;
this.ucProcessEllipse1.Location = new System.Drawing.Point(34, 19);
......@@ -125,7 +125,7 @@
//
this.ucProcessEllipse2.BackEllipseColor = System.Drawing.Color.FromArgb(((int)(((byte)(228)))), ((int)(((byte)(231)))), ((int)(((byte)(237)))));
this.ucProcessEllipse2.CoreEllipseColor = System.Drawing.Color.FromArgb(((int)(((byte)(228)))), ((int)(((byte)(231)))), ((int)(((byte)(237)))));
this.ucProcessEllipse2.Font = new System.Drawing.Font("Arial Unicode MS", 20F);
this.ucProcessEllipse2.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F);
this.ucProcessEllipse2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(16)))), ((int)(((byte)(157)))), ((int)(((byte)(144)))));
this.ucProcessEllipse2.IsShowCoreEllipseBorder = true;
this.ucProcessEllipse2.Location = new System.Drawing.Point(374, 19);
......@@ -297,7 +297,7 @@
// ucProcessLine2
//
this.ucProcessLine2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(228)))), ((int)(((byte)(231)))), ((int)(((byte)(237)))));
this.ucProcessLine2.Font = new System.Drawing.Font("Arial Unicode MS", 10F);
this.ucProcessLine2.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
this.ucProcessLine2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(178)))), ((int)(((byte)(255)))));
this.ucProcessLine2.Location = new System.Drawing.Point(363, 202);
this.ucProcessLine2.MaxValue = 150;
......@@ -313,7 +313,7 @@
// ucProcessLine1
//
this.ucProcessLine1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(228)))), ((int)(((byte)(231)))), ((int)(((byte)(237)))));
this.ucProcessLine1.Font = new System.Drawing.Font("Arial Unicode MS", 10F);
this.ucProcessLine1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
this.ucProcessLine1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(178)))), ((int)(((byte)(255)))));
this.ucProcessLine1.Location = new System.Drawing.Point(70, 202);
this.ucProcessLine1.MaxValue = 150;
......
......@@ -78,7 +78,7 @@
//
this.ucSampling5.Alpha = 50;
this.ucSampling5.ColorThreshold = 12;
this.ucSampling5.Location = new System.Drawing.Point(271, 130);
this.ucSampling5.Location = new System.Drawing.Point(156, 92);
this.ucSampling5.Name = "ucSampling5";
this.ucSampling5.SamplingImag = ((System.Drawing.Bitmap)(resources.GetObject("ucSampling5.SamplingImag")));
this.ucSampling5.Size = new System.Drawing.Size(350, 179);
......@@ -178,7 +178,7 @@
//
this.ucSampling11.Alpha = 0;
this.ucSampling11.ColorThreshold = 10;
this.ucSampling11.Location = new System.Drawing.Point(518, 394);
this.ucSampling11.Location = new System.Drawing.Point(464, 414);
this.ucSampling11.Name = "ucSampling11";
this.ucSampling11.SamplingImag = ((System.Drawing.Bitmap)(resources.GetObject("ucSampling11.SamplingImag")));
this.ucSampling11.Size = new System.Drawing.Size(250, 189);
......@@ -192,6 +192,7 @@
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.White;
this.Controls.Add(this.ucSampling5);
this.Controls.Add(this.ucSampling11);
this.Controls.Add(this.ucSampling10);
this.Controls.Add(this.ucSampling9);
......@@ -202,10 +203,10 @@
this.Controls.Add(this.ucSampling3);
this.Controls.Add(this.ucSampling2);
this.Controls.Add(this.ucSampling1);
this.Controls.Add(this.ucSampling5);
this.Controls.Add(this.ucSampling4);
this.Name = "UCTestSampling";
this.Size = new System.Drawing.Size(1010, 821);
this.Load += new System.EventHandler(this.UCTestSampling_Load);
this.ResumeLayout(false);
this.PerformLayout();
......
......@@ -40,5 +40,10 @@ namespace Test.UC
e.Graphics.FillPath(new SolidBrush(Color.FromArgb(50, Color.White)), uc.BorderPath);
}
}
private void UCTestSampling_Load(object sender, EventArgs e)
{
}
}
}
此文件的差异太大,无法显示。
......@@ -44,6 +44,8 @@
//
// tabControlExt1
//
this.tabControlExt1.BackColor = System.Drawing.Color.Black;
this.tabControlExt1.CloseBtnColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(85)))), ((int)(((byte)(51)))));
this.tabControlExt1.Controls.Add(this.tabPage1);
this.tabControlExt1.Controls.Add(this.tabPage2);
this.tabControlExt1.Controls.Add(this.tabPage3);
......@@ -55,6 +57,11 @@
this.tabControlExt1.Controls.Add(this.tabPage9);
this.tabControlExt1.Controls.Add(this.tabPage10);
this.tabControlExt1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControlExt1.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.tabControlExt1.HeaderBackColor = System.Drawing.Color.Black;
this.tabControlExt1.HeadSelectedBackColor = System.Drawing.Color.White;
this.tabControlExt1.HeadTxtColor = System.Drawing.Color.Silver;
this.tabControlExt1.HeadTxtDisabledColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.tabControlExt1.IsShowCloseBtn = true;
this.tabControlExt1.ItemSize = new System.Drawing.Size(142, 50);
this.tabControlExt1.Location = new System.Drawing.Point(0, 0);
......@@ -70,42 +77,43 @@
//
// tabPage1
//
this.tabPage1.Location = new System.Drawing.Point(4, 104);
this.tabPage1.BackColor = System.Drawing.Color.Black;
this.tabPage1.ForeColor = System.Drawing.Color.White;
this.tabPage1.Location = new System.Drawing.Point(4, 154);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Size = new System.Drawing.Size(565, 313);
this.tabPage1.Size = new System.Drawing.Size(565, 263);
this.tabPage1.TabIndex = 16;
this.tabPage1.Text = "tabPage1";
this.tabPage1.UseVisualStyleBackColor = true;
this.tabPage1.Text = "IO中文标题标题标题标题";
//
// tabPage2
//
this.tabPage2.Location = new System.Drawing.Point(4, 104);
this.tabPage2.Location = new System.Drawing.Point(4, 54);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(565, 313);
this.tabPage2.Size = new System.Drawing.Size(565, 363);
this.tabPage2.TabIndex = 11;
this.tabPage2.Text = "tabPage2";
this.tabPage2.UseVisualStyleBackColor = true;
//
// tabPage3
//
this.tabPage3.Location = new System.Drawing.Point(4, 104);
this.tabPage3.Location = new System.Drawing.Point(4, 54);
this.tabPage3.Name = "tabPage3";
this.tabPage3.Padding = new System.Windows.Forms.Padding(3);
this.tabPage3.Size = new System.Drawing.Size(565, 313);
this.tabPage3.Size = new System.Drawing.Size(565, 363);
this.tabPage3.TabIndex = 12;
this.tabPage3.Text = "tabPage3";
this.tabPage3.UseVisualStyleBackColor = true;
//
// tabPage4
//
this.tabPage4.Location = new System.Drawing.Point(4, 104);
this.tabPage4.BackColor = System.Drawing.Color.Black;
this.tabPage4.Location = new System.Drawing.Point(4, 54);
this.tabPage4.Name = "tabPage4";
this.tabPage4.Padding = new System.Windows.Forms.Padding(3);
this.tabPage4.Size = new System.Drawing.Size(565, 313);
this.tabPage4.Size = new System.Drawing.Size(565, 363);
this.tabPage4.TabIndex = 13;
this.tabPage4.Text = "tabPage4";
this.tabPage4.UseVisualStyleBackColor = true;
//
// tabPage5
//
......@@ -159,10 +167,10 @@
//
// tabPage10
//
this.tabPage10.Location = new System.Drawing.Point(4, 104);
this.tabPage10.Location = new System.Drawing.Point(4, 154);
this.tabPage10.Name = "tabPage10";
this.tabPage10.Padding = new System.Windows.Forms.Padding(3);
this.tabPage10.Size = new System.Drawing.Size(565, 313);
this.tabPage10.Size = new System.Drawing.Size(565, 263);
this.tabPage10.TabIndex = 9;
this.tabPage10.Text = "tabPage10";
this.tabPage10.UseVisualStyleBackColor = true;
......
......@@ -6,6 +6,7 @@ using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using HZH_Controls;
namespace Test.UC
{
......@@ -15,6 +16,8 @@ namespace Test.UC
public UCTestTab()
{
InitializeComponent();
//tabControlExt1
tabPage2.Enabled = false;
}
}
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!