### 2023-01-21更新

------
#### SuperDesign    V2.0.2301.2101
- *.[新增]新增API编辑器,自动保存和快速插入修改参数。
- *.[改进]使用新款高亮编辑器。
This commit is contained in:
鑫Intel committed 2023-01-21 23:28:09 +08:00
1 parent dca2bd3d1c
commit c7b33920bd
49 files changed
+4529 -1658

No files matched your search

@@ -1,42 +0,0 @@
namespace ryProcessManager.hezuo
{
partial class ContextMenuStripHighlightText
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.SuspendLayout();
//
// ContextMenuStripRichText
//
this.Opening += new System.ComponentModel.CancelEventHandler(this.ContextMenuStripRichText_Opening);
this.ResumeLayout(false);
}
#endregion
}
}
@@ -1,137 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows.Forms;
namespace ryProcessManager.hezuo
{
public partial class ContextMenuStripHighlightText : ContextMenuStrip
{
public ContextMenuStripHighlightText()
{
InitializeComponent();
AddMenu("撤销", "undo").Click += Undo_Click;
AddMenu("重做", "redo").Click += Redo_Click;
AddSeparatorMenu();
AddMenu("剪切", "cut").Click += Cut_Click;
AddMenu("复制", "copy").Click += Copy_Click;
AddMenu("粘贴", "paste").Click += Paste_Click;
AddMenu("删除", "del").Click += Del_Click;
AddMenu("全选", "selectall").Click += SelectAll_Click;
AddMenu("查找", "find").Click += Find_Click;
}
private void Find_Click(object sender, EventArgs e)
{
if (!(base.SourceControl is FastColoredTextBoxNS.FastColoredTextBox)) { return; }
var rich_txt = (FastColoredTextBoxNS.FastColoredTextBox)base.SourceControl;
rich_txt.ShowFindDialog();
}
private void SelectAll_Click(object sender, EventArgs e)
{
if (!(base.SourceControl is FastColoredTextBoxNS.FastColoredTextBox)) { return; }
var rich_txt = (FastColoredTextBoxNS.FastColoredTextBox)base.SourceControl;
rich_txt.SelectAll();
//Thread th = new Thread(sendkey);
//th.Start();
//void sendkey()
//{
// Thread.Sleep(100);
// this.Invoke(new Action(() =>
// {
// SendKeys.SendWait("^a");
// }));
//}
}
private void Undo_Click(object sender, EventArgs e)
{
if(!(base.SourceControl is FastColoredTextBoxNS.FastColoredTextBox)) { return; }
var rich_txt = (FastColoredTextBoxNS.FastColoredTextBox)base.SourceControl;
rich_txt.Undo();
}
private void Redo_Click(object sender, EventArgs e)
{
if (!(base.SourceControl is FastColoredTextBoxNS.FastColoredTextBox)) { return; }
var rich_txt = (FastColoredTextBoxNS.FastColoredTextBox)base.SourceControl;
rich_txt.Redo();
}
private void Cut_Click(object sender, EventArgs e)
{
if (!(base.SourceControl is FastColoredTextBoxNS.FastColoredTextBox)) { return; }
var rich_txt = (FastColoredTextBoxNS.FastColoredTextBox)base.SourceControl;
rich_txt.Cut();
}
private void Copy_Click(object sender, EventArgs e)
{
if (!(base.SourceControl is FastColoredTextBoxNS.FastColoredTextBox)) { return; }
var rich_txt = (FastColoredTextBoxNS.FastColoredTextBox)base.SourceControl;
var ss = rich_txt.SelectedText;
rich_txt.Copy();
}
private void Paste_Click(object sender, EventArgs e)
{
if (!(base.SourceControl is FastColoredTextBoxNS.FastColoredTextBox)) { return; }
var rich_txt = (FastColoredTextBoxNS.FastColoredTextBox)base.SourceControl;
rich_txt.Paste();
}
private void Del_Click(object sender, EventArgs e)
{
if (!(base.SourceControl is FastColoredTextBoxNS.FastColoredTextBox)) { return; }
var rich_txt = (FastColoredTextBoxNS.FastColoredTextBox)base.SourceControl;
rich_txt.SelectedText="";
}
public ToolStripSeparator AddSeparatorMenu()
{
ToolStripSeparator item = new ToolStripSeparator();
base.Items.Add(item);
return item;
}
public ToolStripMenuItem AddMenu(string name, string tag)
{
ToolStripMenuItem item = new ToolStripMenuItem(name)
{
Tag = tag
};
base.Items.Add(item);
return item;
}
private void ContextMenuStripRichText_Opening(object sender, CancelEventArgs e)
{
if (!(base.SourceControl is FastColoredTextBoxNS.FastColoredTextBox)) { return; }
var rich_txt = (FastColoredTextBoxNS.FastColoredTextBox)base.SourceControl;
for (int i = 0; i < base.Items.Count; i++)
{
var item = base.Items[i];
if (item.Tag == null) { continue; }
switch(item.Tag.ToString())
{
case "undo":
item.Enabled = rich_txt.UndoEnabled && !rich_txt.ReadOnly;
break;
case "redo":
item.Enabled = rich_txt.RedoEnabled && !rich_txt.ReadOnly;
break;
case "cut":
item.Enabled = (rich_txt.SelectedText != "" && !rich_txt.ReadOnly) ? true : false;
break;
case "copy":
item.Enabled = rich_txt.SelectedText != "" ? true : false;
break;
case "paste":
item.Enabled = !rich_txt.ReadOnly;
break;
case "del":
item.Enabled =(rich_txt.SelectedText != "" && !rich_txt.ReadOnly) ? true : false;
break;
case "selectall":
item.Enabled = rich_txt.SelectedText != rich_txt.Text ? true : false;
break;
}
}
}
}
}
@@ -1,123 +0,0 @@
<?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="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
</root>
+39 -39
View File
@@ -1,33 +1,33 @@
namespace 开发辅助工具.Controls
{
partial class FrmText
{
/// <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()
{
namespace 开发辅助工具.Controls
{
partial class FrmText
{
/// <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.panelEx1 = new ryControls.PanelEx();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.contextMenuStripRichText1 = new ryProcessManager.hezuo.ContextMenuStripRichText();
@@ -92,13 +92,13 @@
this.panelEx1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private ryControls.PanelEx panelEx1;
private ryControls.ButtonEx BtnSave;
private ryProcessManager.hezuo.ContextMenuStripRichText contextMenuStripRichText1;
public System.Windows.Forms.RichTextBox richTextBox1;
}
}
#endregion
private ryControls.PanelEx panelEx1;
private ryControls.ButtonEx BtnSave;
private ryProcessManager.hezuo.ContextMenuStripRichText contextMenuStripRichText1;
public System.Windows.Forms.RichTextBox richTextBox1;
}
}
@@ -31,12 +31,12 @@ namespace ryPaiban.Model
{
if (_SourceContent != null)
{
_SourceContent.FormClosing -= _SourceContent_FormClosing;
_SourceContent.FormClosing -= SourceContent_FormClosing;
}
_SourceContent = value;
if (value != null)
{
_SourceContent.FormClosing += _SourceContent_FormClosing;
_SourceContent.FormClosing += SourceContent_FormClosing;
_SourceContent.TabPageContextMenuStrip = this;
}
}
@@ -44,7 +44,7 @@ namespace ryPaiban.Model
}
private void _SourceContent_FormClosing(object sender, FormClosingEventArgs e)
private void SourceContent_FormClosing(object sender, FormClosingEventArgs e)
{
if (Itrycn_Db.IsCloseConfirm)
{