diff --git a/CrazyCoder/CrazyCoder.csproj b/CrazyCoder/CrazyCoder.csproj
index 328372f..b6fe319 100644
--- a/CrazyCoder/CrazyCoder.csproj
+++ b/CrazyCoder/CrazyCoder.csproj
@@ -117,13 +117,13 @@
<Version>5.4.1.1</Version>
</PackageReference>
<PackageReference Include="NewLife.Core">
- <Version>8.10.2021.505</Version>
+ <Version>8.10.2021.519-beta5</Version>
</PackageReference>
<PackageReference Include="NewLife.Stardust">
<Version>1.5.2021.505</Version>
</PackageReference>
<PackageReference Include="NewLife.XCode">
- <Version>10.1.2021.505</Version>
+ <Version>10.1.2021.519-beta5</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
diff --git a/XCoder/Common/ControlConfig.cs b/XCoder/Common/ControlConfig.cs
index c563543..e2d127b 100644
--- a/XCoder/Common/ControlConfig.cs
+++ b/XCoder/Common/ControlConfig.cs
@@ -15,6 +15,8 @@ namespace XCoder.Common
public String FileName { get; set; }
+ public IDictionary<String, Object> Items { get; set; }
+
public void Load()
{
var dataPath = Setting.Current.DataPath;
@@ -23,6 +25,8 @@ namespace XCoder.Common
{
var dic = JsonParser.Decode(File.ReadAllText(file));
LoadConfig(dic, Control);
+
+ Items = dic;
}
}
@@ -56,7 +60,8 @@ namespace XCoder.Common
public void Save()
{
- var dic = new Dictionary<String, Object>();
+ //var dic = new Dictionary<String, Object>();
+ var dic = Items;
SaveConfig(dic, Control);
var dataPath = Setting.Current.DataPath;
diff --git a/XCoder/Data/FrmRedis.cs b/XCoder/Data/FrmRedis.cs
new file mode 100644
index 0000000..9a2f885
--- /dev/null
+++ b/XCoder/Data/FrmRedis.cs
@@ -0,0 +1,241 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Text;
+using System.Windows.Forms;
+using NewLife;
+using NewLife.Caching;
+using NewLife.Serialization;
+using XCoder.Common;
+
+namespace XCoder.Data
+{
+ [Category("数据工具")]
+ [DisplayName("Redis管理")]
+ public partial class FrmRedis : Form, IXForm
+ {
+ private ControlConfig _config;
+ private IList<RedisConfig> _rdsConfigs;
+
+ #region 窗体初始化
+ public FrmRedis()
+ {
+ InitializeComponent();
+
+ // 动态调节宽度高度,兼容高DPI
+ this.FixDpi();
+ }
+
+ private void FrmRedis_Load(Object sender, EventArgs e)
+ {
+ _config = new ControlConfig { Control = this, FileName = "Redis.json" };
+ _config.Load();
+
+ var nodes = _config.Items?["Nodes"];
+ if (nodes != null) _rdsConfigs = JsonHelper.Convert<IList<RedisConfig>>(nodes);
+ if (_rdsConfigs == null) _rdsConfigs = new List<RedisConfig>();
+ }
+ #endregion
+
+ #region 辅助
+ /// <summary>从字符串中获取字节数组</summary>
+ /// <param name="str"></param>
+ /// <returns></returns>
+ private Byte[] GetBytes(String str)
+ {
+ if (str.IsNullOrEmpty()) return new Byte[0];
+
+ try
+ {
+ if (str.Contains("-")) return str.ToHex();
+ }
+ catch { }
+
+ try
+ {
+ return str.ToBase64();
+ }
+ catch { }
+
+ return str.GetBytes();
+ }
+
+ /// <summary>从原文中获取字节数组</summary>
+ /// <returns></returns>
+ private Byte[] GetSource()
+ {
+ var v = rtSource.Text;
+
+ if (rbString.Checked) return v.GetBytes();
+ if (rbHex.Checked) return v.ToHex();
+ if (rbBase64.Checked) return v.ToBase64();
+
+ return null;
+ }
+
+ private void rtSource_TextChanged(Object sender, EventArgs e)
+ {
+ var v = rtSource.Text;
+ if (v.IsNullOrEmpty()) return;
+
+ // 单字节
+ var enc = Encoding.UTF8;
+ if (enc.GetByteCount(v) != v.Length)
+ {
+ rbHex.Enabled = false;
+ rbBase64.Enabled = false;
+ return;
+ }
+
+ try
+ {
+ rbHex.Enabled = v.ToHex().Length > 0;
+ }
+ catch
+ {
+ rbHex.Enabled = false;
+ }
+
+ try
+ {
+ rbBase64.Enabled = v.ToBase64().Length > 0;
+ }
+ catch
+ {
+ rbBase64.Enabled = false;
+ }
+ }
+
+ private Byte[] GetPass()
+ {
+ var v = rtPass.Text;
+
+ if (rbString2.Checked) return v.GetBytes();
+ if (rbHex2.Checked) return v.ToHex();
+ if (rbBase642.Checked) return v.ToBase64();
+
+ return null;
+ }
+
+ private void SetResult(params String[] rs)
+ {
+ var sb = new StringBuilder();
+ foreach (var item in rs)
+ {
+ if (sb.Length > 0) sb.AppendLine();
+ sb.Append(item);
+ }
+ rtResult.Text = sb.ToString();
+
+ _config.Save();
+ }
+
+ private void SetResult(Byte[] data)
+ {
+ //SetResult("/*HEX编码、Base64编码、Url改进Base64编码*/", data.ToHex("-"), data.ToBase64(), data.ToUrlBase64());
+
+ var list = new List<String>();
+ if (cbString.Checked) list.Add(data.ToStr());
+ if (cbHex.Checked)
+ {
+ list.Add(data.ToHex().ToUpper());
+ list.Add(data.ToHex().ToLower());
+ list.Add(data.ToHex("-"));
+ list.Add(data.ToHex(" "));
+ }
+ if (cbBase64.Checked)
+ {
+ list.Add(data.ToBase64());
+ list.Add(data.ToUrlBase64());
+ }
+
+ SetResult(list.ToArray());
+ }
+
+ private void ShowTree()
+ {
+ var tv = treeNodes;
+ tv.SuspendLayout();
+ foreach (var cfg in _rdsConfigs)
+ {
+ if (!tv.Nodes.ContainsKey(cfg.Name))
+ {
+ var node = tv.Nodes.Add(cfg.Name);
+ node.Tag = cfg;
+ }
+ }
+ tv.ResumeLayout();
+ }
+ #endregion
+
+ #region 功能
+ private void btnExchange_Click(Object sender, EventArgs e)
+ {
+ var v = rtSource.Text;
+ var v2 = rtResult.Text;
+ // 结果区只要第一行
+ if (!v2.IsNullOrEmpty())
+ {
+ var ss = v2.Split("\n");
+ var n = 0;
+ if (ss.Length > n + 1 && ss[n].StartsWith("/*") && ss[n].EndsWith("*/")) n++;
+ v2 = ss[n];
+ }
+ rtSource.Text = v2;
+ rtResult.Text = v;
+ }
+ #endregion
+
+ private void menuEditNode_Click(Object sender, EventArgs e)
+ {
+ var frm = new FrmRedisConfig();
+
+ if (frm.ShowDialog() == DialogResult.OK)
+ {
+ var cfg = frm.Config;
+ if (!cfg.Name.IsNullOrEmpty() && !_rdsConfigs.Contains(cfg)) _rdsConfigs.Add(cfg);
+
+ ShowTree();
+ }
+ }
+
+ private void menuNodes_Opening(Object sender, CancelEventArgs e)
+ {
+
+ }
+
+ private void treeNodes_MouseDoubleClick(Object sender, MouseEventArgs e)
+ {
+ var node = treeNodes.SelectedNode;
+ var cfg = node?.Tag as RedisConfig;
+ if (cfg == null) return;
+
+ var rds = new FullRedis
+ {
+ Name = cfg.Name,
+ Server = $"{cfg.Server}:{cfg.Port}",
+ Password = cfg.Password,
+ UserName = cfg.Username
+ };
+
+ var list = new List<FullRedis>
+ {
+ rds
+ };
+ for (var i = 1; i < 16; i++)
+ {
+ var r = rds.CreateSub(i);
+ list.Add(r as FullRedis);
+ }
+
+ node.Nodes.Clear();
+ for (var i = 0; i < list.Count; i++)
+ {
+ var r = list[i];
+ var count = r.Count;
+ node.Nodes.Add($"db{i}({count})");
+ }
+ node.Expand();
+ }
+ }
+}
\ No newline at end of file
diff --git a/XCoder/Data/FrmRedis.Designer.cs b/XCoder/Data/FrmRedis.Designer.cs
new file mode 100644
index 0000000..289dfe2
--- /dev/null
+++ b/XCoder/Data/FrmRedis.Designer.cs
@@ -0,0 +1,360 @@
+namespace XCoder.Data
+{
+ partial class FrmRedis
+ {
+ /// <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()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.gbFunc = new System.Windows.Forms.GroupBox();
+ this.treeNodes = new System.Windows.Forms.TreeView();
+ this.menuNodes = new System.Windows.Forms.ContextMenuStrip(this.components);
+ this.menuEditNode = new System.Windows.Forms.ToolStripMenuItem();
+ this.gbSource = new System.Windows.Forms.GroupBox();
+ this.btnExchange = new System.Windows.Forms.Button();
+ this.rbBase64 = new System.Windows.Forms.RadioButton();
+ this.rbHex = new System.Windows.Forms.RadioButton();
+ this.rbString = new System.Windows.Forms.RadioButton();
+ this.rtSource = new System.Windows.Forms.RichTextBox();
+ this.gbResult = new System.Windows.Forms.GroupBox();
+ this.cbBase64 = new System.Windows.Forms.CheckBox();
+ this.cbHex = new System.Windows.Forms.CheckBox();
+ this.cbString = new System.Windows.Forms.CheckBox();
+ this.rtResult = new System.Windows.Forms.RichTextBox();
+ this.gbPass = new System.Windows.Forms.GroupBox();
+ this.rbBase642 = new System.Windows.Forms.RadioButton();
+ this.rbHex2 = new System.Windows.Forms.RadioButton();
+ this.rbString2 = new System.Windows.Forms.RadioButton();
+ this.rtPass = new System.Windows.Forms.RichTextBox();
+ this.gbFunc.SuspendLayout();
+ this.menuNodes.SuspendLayout();
+ this.gbSource.SuspendLayout();
+ this.gbResult.SuspendLayout();
+ this.gbPass.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // gbFunc
+ //
+ this.gbFunc.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)));
+ this.gbFunc.Controls.Add(this.treeNodes);
+ this.gbFunc.Location = new System.Drawing.Point(18, 18);
+ this.gbFunc.Margin = new System.Windows.Forms.Padding(4);
+ this.gbFunc.Name = "gbFunc";
+ this.gbFunc.Padding = new System.Windows.Forms.Padding(4);
+ this.gbFunc.Size = new System.Drawing.Size(258, 908);
+ this.gbFunc.TabIndex = 0;
+ this.gbFunc.TabStop = false;
+ //
+ // treeNodes
+ //
+ this.treeNodes.ContextMenuStrip = this.menuNodes;
+ this.treeNodes.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.treeNodes.Location = new System.Drawing.Point(4, 25);
+ this.treeNodes.Name = "treeNodes";
+ this.treeNodes.Size = new System.Drawing.Size(250, 879);
+ this.treeNodes.TabIndex = 0;
+ this.treeNodes.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.treeNodes_MouseDoubleClick);
+ //
+ // menuNodes
+ //
+ this.menuNodes.ImageScalingSize = new System.Drawing.Size(24, 24);
+ this.menuNodes.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.menuEditNode});
+ this.menuNodes.Name = "menuNodes";
+ this.menuNodes.Size = new System.Drawing.Size(171, 34);
+ this.menuNodes.Opening += new System.ComponentModel.CancelEventHandler(this.menuNodes_Opening);
+ //
+ // menuEditNode
+ //
+ this.menuEditNode.Name = "menuEditNode";
+ this.menuEditNode.Size = new System.Drawing.Size(170, 30);
+ this.menuEditNode.Text = "添加服务器";
+ this.menuEditNode.Click += new System.EventHandler(this.menuEditNode_Click);
+ //
+ // gbSource
+ //
+ this.gbSource.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.gbSource.Controls.Add(this.btnExchange);
+ this.gbSource.Controls.Add(this.rbBase64);
+ this.gbSource.Controls.Add(this.rbHex);
+ this.gbSource.Controls.Add(this.rbString);
+ this.gbSource.Controls.Add(this.rtSource);
+ this.gbSource.Location = new System.Drawing.Point(285, 18);
+ this.gbSource.Margin = new System.Windows.Forms.Padding(4);
+ this.gbSource.Name = "gbSource";
+ this.gbSource.Padding = new System.Windows.Forms.Padding(4);
+ this.gbSource.Size = new System.Drawing.Size(1006, 375);
+ this.gbSource.TabIndex = 3;
+ this.gbSource.TabStop = false;
+ this.gbSource.Text = "原文";
+ //
+ // btnExchange
+ //
+ this.btnExchange.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.btnExchange.Location = new System.Drawing.Point(894, 13);
+ this.btnExchange.Margin = new System.Windows.Forms.Padding(4);
+ this.btnExchange.Name = "btnExchange";
+ this.btnExchange.Size = new System.Drawing.Size(104, 51);
+ this.btnExchange.TabIndex = 6;
+ this.btnExchange.Text = "上下互换";
+ this.btnExchange.UseVisualStyleBackColor = true;
+ this.btnExchange.Click += new System.EventHandler(this.btnExchange_Click);
+ //
+ // rbBase64
+ //
+ this.rbBase64.AutoSize = true;
+ this.rbBase64.Location = new System.Drawing.Point(299, 28);
+ this.rbBase64.Margin = new System.Windows.Forms.Padding(2);
+ this.rbBase64.Name = "rbBase64";
+ this.rbBase64.Size = new System.Drawing.Size(123, 22);
+ this.rbBase64.TabIndex = 5;
+ this.rbBase64.Text = "BASE64编码";
+ this.rbBase64.UseVisualStyleBackColor = true;
+ //
+ // rbHex
+ //
+ this.rbHex.AutoSize = true;
+ this.rbHex.Location = new System.Drawing.Point(154, 28);
+ this.rbHex.Margin = new System.Windows.Forms.Padding(2);
+ this.rbHex.Name = "rbHex";
+ this.rbHex.Size = new System.Drawing.Size(96, 22);
+ this.rbHex.TabIndex = 4;
+ this.rbHex.Text = "HEX编码";
+ this.rbHex.UseVisualStyleBackColor = true;
+ //
+ // rbString
+ //
+ this.rbString.AutoSize = true;
+ this.rbString.Checked = true;
+ this.rbString.Location = new System.Drawing.Point(19, 28);
+ this.rbString.Margin = new System.Windows.Forms.Padding(2);
+ this.rbString.Name = "rbString";
+ this.rbString.Size = new System.Drawing.Size(87, 22);
+ this.rbString.TabIndex = 3;
+ this.rbString.TabStop = true;
+ this.rbString.Text = "字符串";
+ this.rbString.UseVisualStyleBackColor = true;
+ //
+ // rtSource
+ //
+ this.rtSource.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.rtSource.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.rtSource.Location = new System.Drawing.Point(4, 65);
+ this.rtSource.Margin = new System.Windows.Forms.Padding(4);
+ this.rtSource.Name = "rtSource";
+ this.rtSource.Size = new System.Drawing.Size(998, 306);
+ this.rtSource.TabIndex = 2;
+ this.rtSource.Text = "学无先后达者为师";
+ this.rtSource.TextChanged += new System.EventHandler(this.rtSource_TextChanged);
+ //
+ // gbResult
+ //
+ this.gbResult.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.gbResult.Controls.Add(this.cbBase64);
+ this.gbResult.Controls.Add(this.cbHex);
+ this.gbResult.Controls.Add(this.cbString);
+ this.gbResult.Controls.Add(this.rtResult);
+ this.gbResult.Location = new System.Drawing.Point(285, 552);
+ this.gbResult.Margin = new System.Windows.Forms.Padding(4);
+ this.gbResult.Name = "gbResult";
+ this.gbResult.Padding = new System.Windows.Forms.Padding(4);
+ this.gbResult.Size = new System.Drawing.Size(1006, 375);
+ this.gbResult.TabIndex = 4;
+ this.gbResult.TabStop = false;
+ this.gbResult.Text = "结果";
+ //
+ // cbBase64
+ //
+ this.cbBase64.AutoSize = true;
+ this.cbBase64.Checked = true;
+ this.cbBase64.CheckState = System.Windows.Forms.CheckState.Checked;
+ this.cbBase64.Location = new System.Drawing.Point(299, 28);
+ this.cbBase64.Margin = new System.Windows.Forms.Padding(2);
+ this.cbBase64.Name = "cbBase64";
+ this.cbBase64.Size = new System.Drawing.Size(124, 22);
+ this.cbBase64.TabIndex = 8;
+ this.cbBase64.Text = "BASE64编码";
+ this.cbBase64.UseVisualStyleBackColor = true;
+ //
+ // cbHex
+ //
+ this.cbHex.AutoSize = true;
+ this.cbHex.Checked = true;
+ this.cbHex.CheckState = System.Windows.Forms.CheckState.Checked;
+ this.cbHex.Location = new System.Drawing.Point(154, 28);
+ this.cbHex.Margin = new System.Windows.Forms.Padding(2);
+ this.cbHex.Name = "cbHex";
+ this.cbHex.Size = new System.Drawing.Size(97, 22);
+ this.cbHex.TabIndex = 7;
+ this.cbHex.Text = "HEX编码";
+ this.cbHex.UseVisualStyleBackColor = true;
+ //
+ // cbString
+ //
+ this.cbString.AutoSize = true;
+ this.cbString.Checked = true;
+ this.cbString.CheckState = System.Windows.Forms.CheckState.Checked;
+ this.cbString.Location = new System.Drawing.Point(19, 28);
+ this.cbString.Margin = new System.Windows.Forms.Padding(2);
+ this.cbString.Name = "cbString";
+ this.cbString.Size = new System.Drawing.Size(88, 22);
+ this.cbString.TabIndex = 6;
+ this.cbString.Text = "字符串";
+ this.cbString.UseVisualStyleBackColor = true;
+ //
+ // rtResult
+ //
+ this.rtResult.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.rtResult.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.rtResult.Location = new System.Drawing.Point(4, 57);
+ this.rtResult.Margin = new System.Windows.Forms.Padding(4);
+ this.rtResult.Name = "rtResult";
+ this.rtResult.Size = new System.Drawing.Size(998, 314);
+ this.rtResult.TabIndex = 2;
+ this.rtResult.Text = "";
+ //
+ // gbPass
+ //
+ this.gbPass.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.gbPass.Controls.Add(this.rbBase642);
+ this.gbPass.Controls.Add(this.rbHex2);
+ this.gbPass.Controls.Add(this.rbString2);
+ this.gbPass.Controls.Add(this.rtPass);
+ this.gbPass.Location = new System.Drawing.Point(285, 398);
+ this.gbPass.Margin = new System.Windows.Forms.Padding(4);
+ this.gbPass.Name = "gbPass";
+ this.gbPass.Padding = new System.Windows.Forms.Padding(4);
+ this.gbPass.Size = new System.Drawing.Size(1006, 150);
+ this.gbPass.TabIndex = 5;
+ this.gbPass.TabStop = false;
+ this.gbPass.Text = "密码";
+ //
+ // rbBase642
+ //
+ this.rbBase642.AutoSize = true;
+ this.rbBase642.Location = new System.Drawing.Point(299, 30);
+ this.rbBase642.Margin = new System.Windows.Forms.Padding(2);
+ this.rbBase642.Name = "rbBase642";
+ this.rbBase642.Size = new System.Drawing.Size(123, 22);
+ this.rbBase642.TabIndex = 8;
+ this.rbBase642.Text = "BASE64编码";
+ this.rbBase642.UseVisualStyleBackColor = true;
+ //
+ // rbHex2
+ //
+ this.rbHex2.AutoSize = true;
+ this.rbHex2.Location = new System.Drawing.Point(155, 30);
+ this.rbHex2.Margin = new System.Windows.Forms.Padding(2);
+ this.rbHex2.Name = "rbHex2";
+ this.rbHex2.Size = new System.Drawing.Size(96, 22);
+ this.rbHex2.TabIndex = 7;
+ this.rbHex2.Text = "HEX编码";
+ this.rbHex2.UseVisualStyleBackColor = true;
+ //
+ // rbString2
+ //
+ this.rbString2.AutoSize = true;
+ this.rbString2.Checked = true;
+ this.rbString2.Location = new System.Drawing.Point(19, 30);
+ this.rbString2.Margin = new System.Windows.Forms.Padding(2);
+ this.rbString2.Name = "rbString2";
+ this.rbString2.Size = new System.Drawing.Size(87, 22);
+ this.rbString2.TabIndex = 6;
+ this.rbString2.TabStop = true;
+ this.rbString2.Text = "字符串";
+ this.rbString2.UseVisualStyleBackColor = true;
+ //
+ // rtPass
+ //
+ this.rtPass.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.rtPass.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.rtPass.Location = new System.Drawing.Point(4, 64);
+ this.rtPass.Margin = new System.Windows.Forms.Padding(4);
+ this.rtPass.Name = "rtPass";
+ this.rtPass.Size = new System.Drawing.Size(998, 82);
+ this.rtPass.TabIndex = 2;
+ this.rtPass.Text = "NewLife";
+ //
+ // FrmRedis
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(1304, 944);
+ this.Controls.Add(this.gbPass);
+ this.Controls.Add(this.gbResult);
+ this.Controls.Add(this.gbSource);
+ this.Controls.Add(this.gbFunc);
+ this.Margin = new System.Windows.Forms.Padding(4);
+ this.Name = "FrmRedis";
+ this.Text = "Redis管理";
+ this.Load += new System.EventHandler(this.FrmRedis_Load);
+ this.gbFunc.ResumeLayout(false);
+ this.menuNodes.ResumeLayout(false);
+ this.gbSource.ResumeLayout(false);
+ this.gbSource.PerformLayout();
+ this.gbResult.ResumeLayout(false);
+ this.gbResult.PerformLayout();
+ this.gbPass.ResumeLayout(false);
+ this.gbPass.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.GroupBox gbFunc;
+ private System.Windows.Forms.GroupBox gbSource;
+ private System.Windows.Forms.RichTextBox rtSource;
+ private System.Windows.Forms.GroupBox gbResult;
+ private System.Windows.Forms.RichTextBox rtResult;
+ private System.Windows.Forms.GroupBox gbPass;
+ private System.Windows.Forms.RichTextBox rtPass;
+ private System.Windows.Forms.Button btnExchange;
+ private System.Windows.Forms.CheckBox cbBase64;
+ private System.Windows.Forms.CheckBox cbHex;
+ private System.Windows.Forms.CheckBox cbString;
+ private System.Windows.Forms.RadioButton rbBase64;
+ private System.Windows.Forms.RadioButton rbHex;
+ private System.Windows.Forms.RadioButton rbString;
+ private System.Windows.Forms.RadioButton rbBase642;
+ private System.Windows.Forms.RadioButton rbHex2;
+ private System.Windows.Forms.RadioButton rbString2;
+ private System.Windows.Forms.TreeView treeNodes;
+ private System.Windows.Forms.ContextMenuStrip menuNodes;
+ private System.Windows.Forms.ToolStripMenuItem menuEditNode;
+ }
+}
\ No newline at end of file
diff --git a/XCoder/Data/FrmRedis.resx b/XCoder/Data/FrmRedis.resx
new file mode 100644
index 0000000..103ad16
--- /dev/null
+++ b/XCoder/Data/FrmRedis.resx
@@ -0,0 +1,123 @@
+<?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="menuNodes.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>17, 17</value>
+ </metadata>
+</root>
\ No newline at end of file
diff --git a/XCoder/Data/FrmRedisConfig.cs b/XCoder/Data/FrmRedisConfig.cs
new file mode 100644
index 0000000..4ad43f2
--- /dev/null
+++ b/XCoder/Data/FrmRedisConfig.cs
@@ -0,0 +1,54 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using NewLife;
+
+namespace XCoder.Data
+{
+ public partial class FrmRedisConfig : Form
+ {
+ public RedisConfig Config { get; set; }
+
+ public FrmRedisConfig()
+ {
+ InitializeComponent();
+ }
+
+ private void FrmRedisConfig_Load(Object sender, EventArgs e)
+ {
+ var cfg = Config;
+ Text = cfg == null ? "添加Redis节点" : "编辑Redis节点";
+
+ if (cfg == null)
+ cfg = Config = new RedisConfig();
+ else
+ {
+ txtName.Text = cfg.Name;
+ txtServer.Text = cfg.Server;
+ txtPort.Text = cfg.Port + "";
+ txtUsername.Text = cfg.Username;
+ txtPassword.Text = cfg.Password;
+ }
+ }
+
+ private void btnOK_Click(Object sender, EventArgs e)
+ {
+ var cfg = Config;
+ cfg.Name = txtName.Text?.Trim();
+ cfg.Server = txtServer.Text?.Trim();
+ cfg.Port = txtPort.Text.ToInt();
+ cfg.Username = txtUsername.Text?.Trim();
+ cfg.Password = txtPassword.Text?.Trim();
+
+ if (cfg.Name.IsNullOrEmpty()) cfg.Name = cfg.Server;
+
+ Close();
+ }
+ }
+}
\ No newline at end of file
diff --git a/XCoder/Data/FrmRedisConfig.Designer.cs b/XCoder/Data/FrmRedisConfig.Designer.cs
new file mode 100644
index 0000000..15f51d0
--- /dev/null
+++ b/XCoder/Data/FrmRedisConfig.Designer.cs
@@ -0,0 +1,179 @@
+
+namespace XCoder.Data
+{
+ partial class FrmRedisConfig
+ {
+ /// <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()
+ {
+ this.label1 = new System.Windows.Forms.Label();
+ this.txtName = new System.Windows.Forms.TextBox();
+ this.label2 = new System.Windows.Forms.Label();
+ this.txtServer = new System.Windows.Forms.TextBox();
+ this.txtPort = new System.Windows.Forms.TextBox();
+ this.txtPassword = new System.Windows.Forms.TextBox();
+ this.txtUsername = new System.Windows.Forms.TextBox();
+ this.label3 = new System.Windows.Forms.Label();
+ this.label4 = new System.Windows.Forms.Label();
+ this.label5 = new System.Windows.Forms.Label();
+ this.btnOK = new System.Windows.Forms.Button();
+ this.SuspendLayout();
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(69, 31);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(62, 18);
+ this.label1.TabIndex = 0;
+ this.label1.Text = "名称:";
+ //
+ // txtName
+ //
+ this.txtName.Location = new System.Drawing.Point(160, 26);
+ this.txtName.Name = "txtName";
+ this.txtName.Size = new System.Drawing.Size(179, 28);
+ this.txtName.TabIndex = 1;
+ this.txtName.Text = "127.0.0.1";
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.Location = new System.Drawing.Point(51, 76);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(80, 18);
+ this.label2.TabIndex = 2;
+ this.label2.Text = "服务器:";
+ //
+ // txtServer
+ //
+ this.txtServer.Location = new System.Drawing.Point(160, 71);
+ this.txtServer.Name = "txtServer";
+ this.txtServer.Size = new System.Drawing.Size(179, 28);
+ this.txtServer.TabIndex = 3;
+ this.txtServer.Text = "127.0.0.1";
+ //
+ // txtPort
+ //
+ this.txtPort.Location = new System.Drawing.Point(451, 71);
+ this.txtPort.Name = "txtPort";
+ this.txtPort.Size = new System.Drawing.Size(100, 28);
+ this.txtPort.TabIndex = 4;
+ this.txtPort.Text = "6379";
+ this.txtPort.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+ //
+ // txtPassword
+ //
+ this.txtPassword.Location = new System.Drawing.Point(160, 116);
+ this.txtPassword.Name = "txtPassword";
+ this.txtPassword.Size = new System.Drawing.Size(179, 28);
+ this.txtPassword.TabIndex = 5;
+ //
+ // txtUsername
+ //
+ this.txtUsername.Location = new System.Drawing.Point(160, 171);
+ this.txtUsername.Name = "txtUsername";
+ this.txtUsername.Size = new System.Drawing.Size(179, 28);
+ this.txtUsername.TabIndex = 6;
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(383, 76);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(62, 18);
+ this.label3.TabIndex = 7;
+ this.label3.Text = "端口:";
+ //
+ // label4
+ //
+ this.label4.AutoSize = true;
+ this.label4.Location = new System.Drawing.Point(69, 121);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(62, 18);
+ this.label4.TabIndex = 8;
+ this.label4.Text = "密码:";
+ //
+ // label5
+ //
+ this.label5.AutoSize = true;
+ this.label5.Location = new System.Drawing.Point(51, 171);
+ this.label5.Name = "label5";
+ this.label5.Size = new System.Drawing.Size(80, 18);
+ this.label5.TabIndex = 9;
+ this.label5.Text = "用户名:";
+ //
+ // btnOK
+ //
+ this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
+ this.btnOK.Location = new System.Drawing.Point(438, 154);
+ this.btnOK.Name = "btnOK";
+ this.btnOK.Size = new System.Drawing.Size(113, 52);
+ this.btnOK.TabIndex = 10;
+ this.btnOK.Text = "确认";
+ this.btnOK.UseVisualStyleBackColor = true;
+ this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
+ //
+ // FrmRedisConfig
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(585, 237);
+ this.Controls.Add(this.btnOK);
+ this.Controls.Add(this.label5);
+ this.Controls.Add(this.label4);
+ this.Controls.Add(this.label3);
+ this.Controls.Add(this.txtUsername);
+ this.Controls.Add(this.txtPassword);
+ this.Controls.Add(this.txtPort);
+ this.Controls.Add(this.txtServer);
+ this.Controls.Add(this.label2);
+ this.Controls.Add(this.txtName);
+ this.Controls.Add(this.label1);
+ this.Name = "FrmRedisConfig";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+ this.Text = "FrmRedisConfig";
+ this.Load += new System.EventHandler(this.FrmRedisConfig_Load);
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.TextBox txtName;
+ private System.Windows.Forms.Label label2;
+ private System.Windows.Forms.TextBox txtServer;
+ private System.Windows.Forms.TextBox txtPort;
+ private System.Windows.Forms.TextBox txtPassword;
+ private System.Windows.Forms.TextBox txtUsername;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.Label label4;
+ private System.Windows.Forms.Label label5;
+ private System.Windows.Forms.Button btnOK;
+ }
+}
\ No newline at end of file
diff --git a/XCoder/Data/FrmRedisConfig.resx b/XCoder/Data/FrmRedisConfig.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/XCoder/Data/FrmRedisConfig.resx
@@ -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>
\ No newline at end of file
diff --git a/XCoder/Data/RedisConfig.cs b/XCoder/Data/RedisConfig.cs
new file mode 100644
index 0000000..dba05f2
--- /dev/null
+++ b/XCoder/Data/RedisConfig.cs
@@ -0,0 +1,17 @@
+using System;
+
+namespace XCoder.Data
+{
+ public class RedisConfig
+ {
+ public String Name { get; set; }
+
+ public String Server { get; set; }
+
+ public Int32 Port { get; set; }
+
+ public String Username { get; set; }
+
+ public String Password { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/XCoder/FrmMDI.cs b/XCoder/FrmMDI.cs
index b7d7a50..9413e16 100644
--- a/XCoder/FrmMDI.cs
+++ b/XCoder/FrmMDI.cs
@@ -73,6 +73,7 @@ namespace XCoder
var name2 = item.Text.Substring(null, "(");
ms[name2] = item;
}
+ var idx = 1;
foreach (var item in ts)
{
var att = item.GetCustomAttribute<CategoryAttribute>();
@@ -81,7 +82,9 @@ namespace XCoder
if (!ms.TryGetValue(cat, out var root))
{
- root = menuStrip.Items.Add(cat) as ToolStripMenuItem;
+ //root = menuStrip.Items.Add(cat) as ToolStripMenuItem;
+ root = new ToolStripMenuItem(cat);
+ menuStrip.Items.Insert(idx++, root);
ms[cat] = root;
}
diff --git a/XCoder/Tools/FrmGPS.cs b/XCoder/Tools/FrmGPS.cs
index fcad159..93582a1 100644
--- a/XCoder/Tools/FrmGPS.cs
+++ b/XCoder/Tools/FrmGPS.cs
@@ -13,7 +13,7 @@ namespace XCoder.Tools
{
[Category("地理信息")]
[DisplayName("GPS辅助")]
- public partial class FrmGPS : Form
+ public partial class FrmGPS : Form, IXForm
{
public FrmGPS()
{
diff --git a/XCoder/Tools/FrmMain.cs b/XCoder/Tools/FrmMain.cs
index 09ea038..4a145fd 100644
--- a/XCoder/Tools/FrmMain.cs
+++ b/XCoder/Tools/FrmMain.cs
@@ -5,7 +5,8 @@ using NewLife;
namespace XCoder.Tools
{
- [DisplayName("小工具")]
+ [Category("地理信息")]
+ [DisplayName("坐标转换")]
public partial class FrmMain : Form, IXForm
{
public FrmMain()
diff --git a/XCoder/XCoder.csproj b/XCoder/XCoder.csproj
index 99b8f4d..8ef1fc5 100644
--- a/XCoder/XCoder.csproj
+++ b/XCoder/XCoder.csproj
@@ -56,6 +56,19 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Common\ControlConfig.cs" />
+ <Compile Include="Data\FrmRedis.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="Data\FrmRedis.Designer.cs">
+ <DependentUpon>FrmRedis.cs</DependentUpon>
+ </Compile>
+ <Compile Include="Data\FrmRedisConfig.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="Data\FrmRedisConfig.Designer.cs">
+ <DependentUpon>FrmRedisConfig.cs</DependentUpon>
+ </Compile>
+ <Compile Include="Data\RedisConfig.cs" />
<Compile Include="Engine\IcoHelper.cs" />
<Compile Include="Engine\ModelConfig.cs" />
<Compile Include="FileEncoding\FrmMain.cs">
@@ -196,6 +209,12 @@
<DependentUpon>FrmMain.cs</DependentUpon>
</Compile>
<Compile Include="Yun\MapSetting.cs" />
+ <EmbeddedResource Include="Data\FrmRedis.resx">
+ <DependentUpon>FrmRedis.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Data\FrmRedisConfig.resx">
+ <DependentUpon>FrmRedisConfig.cs</DependentUpon>
+ </EmbeddedResource>
<EmbeddedResource Include="FileEncoding\FrmMain.resx">
<DependentUpon>FrmMain.cs</DependentUpon>
</EmbeddedResource>
@@ -338,16 +357,19 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="NewLife.Core">
- <Version>8.10.2021.505</Version>
+ <Version>8.10.2021.519-beta5</Version>
</PackageReference>
<PackageReference Include="NewLife.Net">
<Version>3.6.2020.1002</Version>
</PackageReference>
+ <PackageReference Include="NewLife.Redis">
+ <Version>3.9.2021.505</Version>
+ </PackageReference>
<PackageReference Include="NewLife.Stardust">
<Version>1.5.2021.505</Version>
</PackageReference>
<PackageReference Include="NewLife.XCode">
- <Version>10.1.2021.505</Version>
+ <Version>10.1.2021.519-beta5</Version>
</PackageReference>
<PackageReference Include="SSH.NET">
<Version>2020.0.1</Version>
diff --git a/XCoder40/XCoder40.csproj b/XCoder40/XCoder40.csproj
index ab94e85..31655ae 100644
--- a/XCoder40/XCoder40.csproj
+++ b/XCoder40/XCoder40.csproj
@@ -391,13 +391,13 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="NewLife.Core">
- <Version>8.10.2021.505</Version>
+ <Version>8.10.2021.519-beta5</Version>
</PackageReference>
<PackageReference Include="NewLife.Net">
<Version>3.6.2020.1002</Version>
</PackageReference>
<PackageReference Include="NewLife.XCode">
- <Version>10.1.2021.505</Version>
+ <Version>10.1.2021.519-beta5</Version>
</PackageReference>
<PackageReference Include="SSH.NET">
<Version>2020.0.1</Version>
diff --git a/XCoderLinux/XCoderLinux.csproj b/XCoderLinux/XCoderLinux.csproj
index 953315e..9114328 100644
--- a/XCoderLinux/XCoderLinux.csproj
+++ b/XCoderLinux/XCoderLinux.csproj
@@ -48,8 +48,8 @@
<ItemGroup>
<PackageReference Include="GtkSharp" Version="3.24.24.34" />
- <PackageReference Include="NewLife.Core" Version="8.10.2021.505" />
- <PackageReference Include="NewLife.XCode" Version="10.1.2021.505" />
+ <PackageReference Include="NewLife.Core" Version="8.10.2021.519-beta5" />
+ <PackageReference Include="NewLife.XCode" Version="10.1.2021.519-beta5" />
<PackageReference Include="System.IO.Ports" Version="5.0.1" />
<PackageReference Include="System.Management" Version="5.0.0" />
</ItemGroup>
diff --git a/XCoderWpf/XCoderWpf.csproj b/XCoderWpf/XCoderWpf.csproj
index f09fa3a..ef5aed0 100644
--- a/XCoderWpf/XCoderWpf.csproj
+++ b/XCoderWpf/XCoderWpf.csproj
@@ -31,7 +31,7 @@
<ItemGroup>
<PackageReference Include="HandyControls" Version="3.3.5" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="2.1.2" />
- <PackageReference Include="NewLife.XCode" Version="10.1.2021.505" />
+ <PackageReference Include="NewLife.XCode" Version="10.1.2021.519-beta5" />
<PackageReference Include="Prism.DryIoc" Version="8.0.0.1909" />
</ItemGroup>