Add InterlaceColoring option

This commit is contained in:
YFdyh000 2020-04-17 14:47:05 +08:00
parent c837ba5482
commit f48468029e
6 changed files with 1656 additions and 2243 deletions

View file

@ -256,14 +256,14 @@ namespace v2rayN.Forms
_addSubItem(lvItem, EServerColName.totalUp.ToString(), totalUp); _addSubItem(lvItem, EServerColName.totalUp.ToString(), totalUp);
} }
if (k % 2 == 1) // 隔行着色 if (config.interlaceColoring && k % 2 == 1) // 隔行着色
{ {
lvItem.BackColor = Color.WhiteSmoke; lvItem.BackColor = SystemColors.Control;
} }
if (config.index.Equals(k)) if (config.index.Equals(k))
{ {
//lvItem.Checked = true; //lvItem.Checked = true;
lvItem.ForeColor = Color.DodgerBlue; lvItem.ForeColor = SystemColors.MenuHighlight;
lvItem.Font = new Font(lvItem.Font, FontStyle.Bold); lvItem.Font = new Font(lvItem.Font, FontStyle.Bold);
} }

View file

@ -99,6 +99,7 @@
this.panel2 = new System.Windows.Forms.Panel(); this.panel2 = new System.Windows.Forms.Panel();
this.btnOK = new System.Windows.Forms.Button(); this.btnOK = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
this.chkInterlaceColoring = new System.Windows.Forms.CheckBox();
this.tabControl1.SuspendLayout(); this.tabControl1.SuspendLayout();
this.tabBasic.SuspendLayout(); this.tabBasic.SuspendLayout();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
@ -512,6 +513,7 @@
// //
// tabGUI // tabGUI
// //
this.tabGUI.Controls.Add(this.chkInterlaceColoring);
this.tabGUI.Controls.Add(this.chkKeepOlderDedupl); this.tabGUI.Controls.Add(this.chkKeepOlderDedupl);
this.tabGUI.Controls.Add(this.cbFreshrate); this.tabGUI.Controls.Add(this.cbFreshrate);
this.tabGUI.Controls.Add(this.lbFreshrate); this.tabGUI.Controls.Add(this.lbFreshrate);
@ -614,6 +616,12 @@
resources.ApplyResources(this.panel1, "panel1"); resources.ApplyResources(this.panel1, "panel1");
this.panel1.Name = "panel1"; this.panel1.Name = "panel1";
// //
// chkInterlaceColoring
//
resources.ApplyResources(this.chkInterlaceColoring, "chkInterlaceColoring");
this.chkInterlaceColoring.Name = "chkInterlaceColoring";
this.chkInterlaceColoring.UseVisualStyleBackColor = true;
//
// OptionSettingForm // OptionSettingForm
// //
resources.ApplyResources(this, "$this"); resources.ApplyResources(this, "$this");
@ -725,5 +733,6 @@
private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label4;
private System.Windows.Forms.CheckBox chkKeepOlderDedupl; private System.Windows.Forms.CheckBox chkKeepOlderDedupl;
private System.Windows.Forms.LinkLabel linkLabelRoutingDoc; private System.Windows.Forms.LinkLabel linkLabelRoutingDoc;
private System.Windows.Forms.CheckBox chkInterlaceColoring;
} }
} }

View file

@ -127,9 +127,7 @@ namespace v2rayN.Forms
chkAllowLANConn.Checked = config.allowLANConn; chkAllowLANConn.Checked = config.allowLANConn;
chkEnableStatistics.Checked = config.enableStatistics; chkEnableStatistics.Checked = config.enableStatistics;
chkKeepOlderDedupl.Checked = config.keepOlderDedupl; chkKeepOlderDedupl.Checked = config.keepOlderDedupl;
chkInterlaceColoring.Checked = config.interlaceColoring;
ComboItem[] cbSource = new ComboItem[] ComboItem[] cbSource = new ComboItem[]
{ {
@ -358,6 +356,7 @@ namespace v2rayN.Forms
config.enableStatistics = chkEnableStatistics.Checked; config.enableStatistics = chkEnableStatistics.Checked;
config.statisticsFreshRate = (int)cbFreshrate.SelectedValue; config.statisticsFreshRate = (int)cbFreshrate.SelectedValue;
config.keepOlderDedupl = chkKeepOlderDedupl.Checked; config.keepOlderDedupl = chkKeepOlderDedupl.Checked;
config.interlaceColoring = chkInterlaceColoring.Checked;
//if(lastEnableStatistics != config.enableStatistics) //if(lastEnableStatistics != config.enableStatistics)
//{ //{

File diff suppressed because it is too large Load diff

View file

@ -164,6 +164,9 @@
<data name="chkEnableStatistics.Text" xml:space="preserve"> <data name="chkEnableStatistics.Text" xml:space="preserve">
<value>启用统计(实时网速显示和使用流量显示需要重启v2rayN客户端)</value> <value>启用统计(实时网速显示和使用流量显示需要重启v2rayN客户端)</value>
</data> </data>
<data name="chkInterlaceColoring.Text" xml:space="preserve">
<value>隔行着色</value>
</data>
<data name="chkKeepOlderDedupl.Text" xml:space="preserve"> <data name="chkKeepOlderDedupl.Text" xml:space="preserve">
<value>去重时保留序号较小的项</value> <value>去重时保留序号较小的项</value>
</data> </data>

View file

@ -162,6 +162,14 @@ namespace v2rayN.Mode
get; set; get; set;
} }
/// <summary>
/// 服务器列表隔行着色
/// </summary>
public bool interlaceColoring
{
get; set;
}
/// <summary> /// <summary>
/// 视图刷新率 /// 视图刷新率
/// </summary> /// </summary>