Commit f538459d authored by JoyJ's avatar JoyJ

working on effect creator; set highlight selected word range from visible to all

parent 908e7b58
......@@ -202,7 +202,7 @@ private void InitializeComponent()
//
this.menuitem_testlua.Name = "menuitem_testlua";
this.menuitem_testlua.ShortcutKeys = System.Windows.Forms.Keys.F5;
this.menuitem_testlua.Size = new System.Drawing.Size(177, 22);
this.menuitem_testlua.Size = new System.Drawing.Size(180, 22);
this.menuitem_testlua.Text = "Syntax Check";
this.menuitem_testlua.Click += new System.EventHandler(this.menuitem_testlua_Click);
//
......@@ -210,8 +210,9 @@ private void InitializeComponent()
//
this.menuitem_effectcreator.Name = "menuitem_effectcreator";
this.menuitem_effectcreator.ShortcutKeys = System.Windows.Forms.Keys.F3;
this.menuitem_effectcreator.Size = new System.Drawing.Size(177, 22);
this.menuitem_effectcreator.Size = new System.Drawing.Size(180, 22);
this.menuitem_effectcreator.Text = "Effect Creator";
this.menuitem_effectcreator.Visible = false;
this.menuitem_effectcreator.Click += new System.EventHandler(this.effectCreatorToolStripMenuItem_Click);
//
// tb_input
......
......@@ -573,7 +573,7 @@ void FctbSelectionChangedDelayed(object sender, EventArgs e)
return;
}
//highlight same words
var ranges = this.fctb.VisibleRange.GetRanges("\\b" + text + "\\b");
var ranges = this.fctb.Range.GetRanges("\\b" + text + "\\b");
foreach (var r in ranges)
{
r.SetStyle(this.sameWordsStyle);
......
......@@ -172,6 +172,12 @@
<Compile Include="EffectCreatorForm.Designer.cs">
<DependentUpon>EffectCreatorForm.cs</DependentUpon>
</Compile>
<Compile Include="PositionForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="PositionForm.Designer.cs">
<DependentUpon>PositionForm.cs</DependentUpon>
</Compile>
<Compile Include="ResetForm.cs">
<SubType>Form</SubType>
</Compile>
......@@ -269,6 +275,9 @@
<EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="PositionForm.resx">
<DependentUpon>PositionForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="ResetForm.resx">
<DependentUpon>ResetForm.cs</DependentUpon>
</EmbeddedResource>
......
namespace DataEditorX
{
partial class LocationForm
{
/// <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.btnOK = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.checkLocationDeck0x1 = new System.Windows.Forms.CheckBox();
this.checkLocationHand0x2 = new System.Windows.Forms.CheckBox();
this.checkLocationMZone0x4 = new System.Windows.Forms.CheckBox();
this.checkLocationSZone0x8 = new System.Windows.Forms.CheckBox();
this.checkLocationGrave0x10 = new System.Windows.Forms.CheckBox();
this.checkLocationRemoved0x20 = new System.Windows.Forms.CheckBox();
this.checkLocationExtra0x40 = new System.Windows.Forms.CheckBox();
this.checkLocationOverlay0x80 = new System.Windows.Forms.CheckBox();
this.checkMZoneAndSZone = new System.Windows.Forms.CheckBox();
this.checkLocationDeckbot0x10000 = new System.Windows.Forms.CheckBox();
this.checkLocationDeckShf0x20000 = new System.Windows.Forms.CheckBox();
this.checkLocationFZone0x100 = new System.Windows.Forms.CheckBox();
this.checkLocationPendulum0x200 = new System.Windows.Forms.CheckBox();
this.SuspendLayout();
//
// btnOK
//
this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnOK.Location = new System.Drawing.Point(271, 67);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(75, 23);
this.btnOK.TabIndex = 0;
this.btnOK.Text = "确定";
this.btnOK.UseVisualStyleBackColor = true;
//
// btnCancel
//
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Location = new System.Drawing.Point(271, 96);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(75, 23);
this.btnCancel.TabIndex = 1;
this.btnCancel.Text = "取消";
this.btnCancel.UseVisualStyleBackColor = true;
//
// checkLocationDeck0x1
//
this.checkLocationDeck0x1.AutoSize = true;
this.checkLocationDeck0x1.Location = new System.Drawing.Point(12, 12);
this.checkLocationDeck0x1.Name = "checkLocationDeck0x1";
this.checkLocationDeck0x1.Size = new System.Drawing.Size(48, 16);
this.checkLocationDeck0x1.TabIndex = 2;
this.checkLocationDeck0x1.Text = "卡组";
this.checkLocationDeck0x1.UseVisualStyleBackColor = true;
//
// checkLocationHand0x2
//
this.checkLocationHand0x2.AutoSize = true;
this.checkLocationHand0x2.Location = new System.Drawing.Point(66, 12);
this.checkLocationHand0x2.Name = "checkLocationHand0x2";
this.checkLocationHand0x2.Size = new System.Drawing.Size(48, 16);
this.checkLocationHand0x2.TabIndex = 3;
this.checkLocationHand0x2.Text = "手卡";
this.checkLocationHand0x2.UseVisualStyleBackColor = true;
//
// checkLocationMZone0x4
//
this.checkLocationMZone0x4.AutoSize = true;
this.checkLocationMZone0x4.Location = new System.Drawing.Point(120, 12);
this.checkLocationMZone0x4.Name = "checkLocationMZone0x4";
this.checkLocationMZone0x4.Size = new System.Drawing.Size(72, 16);
this.checkLocationMZone0x4.TabIndex = 4;
this.checkLocationMZone0x4.Text = "怪兽区域";
this.checkLocationMZone0x4.UseVisualStyleBackColor = true;
this.checkLocationMZone0x4.CheckedChanged += new System.EventHandler(this.checkLocationMZone0x4_CheckedChanged);
//
// checkLocationSZone0x8
//
this.checkLocationSZone0x8.AutoSize = true;
this.checkLocationSZone0x8.Location = new System.Drawing.Point(198, 12);
this.checkLocationSZone0x8.Name = "checkLocationSZone0x8";
this.checkLocationSZone0x8.Size = new System.Drawing.Size(156, 16);
this.checkLocationSZone0x8.TabIndex = 5;
this.checkLocationSZone0x8.Text = "魔法陷阱区域(含场地区)";
this.checkLocationSZone0x8.UseVisualStyleBackColor = true;
this.checkLocationSZone0x8.CheckedChanged += new System.EventHandler(this.checkLocationSZone0x8_CheckedChanged);
//
// checkLocationGrave0x10
//
this.checkLocationGrave0x10.AutoSize = true;
this.checkLocationGrave0x10.Location = new System.Drawing.Point(12, 34);
this.checkLocationGrave0x10.Name = "checkLocationGrave0x10";
this.checkLocationGrave0x10.Size = new System.Drawing.Size(48, 16);
this.checkLocationGrave0x10.TabIndex = 6;
this.checkLocationGrave0x10.Text = "墓地";
this.checkLocationGrave0x10.UseVisualStyleBackColor = true;
//
// checkLocationRemoved0x20
//
this.checkLocationRemoved0x20.AutoSize = true;
this.checkLocationRemoved0x20.Location = new System.Drawing.Point(66, 34);
this.checkLocationRemoved0x20.Name = "checkLocationRemoved0x20";
this.checkLocationRemoved0x20.Size = new System.Drawing.Size(60, 16);
this.checkLocationRemoved0x20.TabIndex = 7;
this.checkLocationRemoved0x20.Text = "除外区";
this.checkLocationRemoved0x20.UseVisualStyleBackColor = true;
//
// checkLocationExtra0x40
//
this.checkLocationExtra0x40.AutoSize = true;
this.checkLocationExtra0x40.Location = new System.Drawing.Point(132, 34);
this.checkLocationExtra0x40.Name = "checkLocationExtra0x40";
this.checkLocationExtra0x40.Size = new System.Drawing.Size(60, 16);
this.checkLocationExtra0x40.TabIndex = 8;
this.checkLocationExtra0x40.Text = "除外区";
this.checkLocationExtra0x40.UseVisualStyleBackColor = true;
//
// checkLocationOverlay0x80
//
this.checkLocationOverlay0x80.AutoSize = true;
this.checkLocationOverlay0x80.Location = new System.Drawing.Point(198, 34);
this.checkLocationOverlay0x80.Name = "checkLocationOverlay0x80";
this.checkLocationOverlay0x80.Size = new System.Drawing.Size(66, 16);
this.checkLocationOverlay0x80.TabIndex = 9;
this.checkLocationOverlay0x80.Text = "XYZ素材";
this.checkLocationOverlay0x80.UseVisualStyleBackColor = true;
//
// checkMZoneAndSZone
//
this.checkMZoneAndSZone.AutoSize = true;
this.checkMZoneAndSZone.Location = new System.Drawing.Point(12, 56);
this.checkMZoneAndSZone.Name = "checkMZoneAndSZone";
this.checkMZoneAndSZone.Size = new System.Drawing.Size(48, 16);
this.checkMZoneAndSZone.TabIndex = 10;
this.checkMZoneAndSZone.Text = "场上";
this.checkMZoneAndSZone.UseVisualStyleBackColor = true;
this.checkMZoneAndSZone.CheckedChanged += new System.EventHandler(this.checkMZoneAndSZone_CheckedChanged);
//
// checkLocationDeckbot0x10000
//
this.checkLocationDeckbot0x10000.AutoSize = true;
this.checkLocationDeckbot0x10000.Location = new System.Drawing.Point(12, 78);
this.checkLocationDeckbot0x10000.Name = "checkLocationDeckbot0x10000";
this.checkLocationDeckbot0x10000.Size = new System.Drawing.Size(192, 16);
this.checkLocationDeckbot0x10000.TabIndex = 11;
this.checkLocationDeckbot0x10000.Text = "卡组底部(仅用于重定向类效果)";
this.checkLocationDeckbot0x10000.UseVisualStyleBackColor = true;
//
// checkLocationDeckShf0x20000
//
this.checkLocationDeckShf0x20000.AutoSize = true;
this.checkLocationDeckShf0x20000.Location = new System.Drawing.Point(12, 100);
this.checkLocationDeckShf0x20000.Name = "checkLocationDeckShf0x20000";
this.checkLocationDeckShf0x20000.Size = new System.Drawing.Size(198, 16);
this.checkLocationDeckShf0x20000.TabIndex = 12;
this.checkLocationDeckShf0x20000.Text = "卡组-洗牌(仅用于重定向类效果)";
this.checkLocationDeckShf0x20000.UseVisualStyleBackColor = true;
//
// checkLocationFZone0x100
//
this.checkLocationFZone0x100.AutoSize = true;
this.checkLocationFZone0x100.Location = new System.Drawing.Point(66, 56);
this.checkLocationFZone0x100.Name = "checkLocationFZone0x100";
this.checkLocationFZone0x100.Size = new System.Drawing.Size(72, 16);
this.checkLocationFZone0x100.TabIndex = 13;
this.checkLocationFZone0x100.Text = "场地区域";
this.checkLocationFZone0x100.UseVisualStyleBackColor = true;
//
// checkLocationPendulum0x200
//
this.checkLocationPendulum0x200.AutoSize = true;
this.checkLocationPendulum0x200.Location = new System.Drawing.Point(144, 56);
this.checkLocationPendulum0x200.Name = "checkLocationPendulum0x200";
this.checkLocationPendulum0x200.Size = new System.Drawing.Size(72, 16);
this.checkLocationPendulum0x200.TabIndex = 14;
this.checkLocationPendulum0x200.Text = "灵摆区域";
this.checkLocationPendulum0x200.UseVisualStyleBackColor = true;
//
// PositionForm
//
this.AcceptButton = this.btnOK;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnCancel;
this.ClientSize = new System.Drawing.Size(358, 131);
this.Controls.Add(this.checkLocationPendulum0x200);
this.Controls.Add(this.checkLocationFZone0x100);
this.Controls.Add(this.checkLocationDeckShf0x20000);
this.Controls.Add(this.checkLocationDeckbot0x10000);
this.Controls.Add(this.checkMZoneAndSZone);
this.Controls.Add(this.checkLocationOverlay0x80);
this.Controls.Add(this.checkLocationExtra0x40);
this.Controls.Add(this.checkLocationRemoved0x20);
this.Controls.Add(this.checkLocationGrave0x10);
this.Controls.Add(this.checkLocationSZone0x8);
this.Controls.Add(this.checkLocationMZone0x4);
this.Controls.Add(this.checkLocationHand0x2);
this.Controls.Add(this.checkLocationDeck0x1);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnOK);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "PositionForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "位置设定";
this.TopMost = true;
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.CheckBox checkLocationDeck0x1;
private System.Windows.Forms.CheckBox checkLocationHand0x2;
private System.Windows.Forms.CheckBox checkLocationMZone0x4;
private System.Windows.Forms.CheckBox checkLocationSZone0x8;
private System.Windows.Forms.CheckBox checkLocationGrave0x10;
private System.Windows.Forms.CheckBox checkLocationRemoved0x20;
private System.Windows.Forms.CheckBox checkLocationExtra0x40;
private System.Windows.Forms.CheckBox checkLocationOverlay0x80;
private System.Windows.Forms.CheckBox checkMZoneAndSZone;
private System.Windows.Forms.CheckBox checkLocationDeckbot0x10000;
private System.Windows.Forms.CheckBox checkLocationDeckShf0x20000;
private System.Windows.Forms.CheckBox checkLocationFZone0x100;
private System.Windows.Forms.CheckBox checkLocationPendulum0x200;
}
}
\ No newline at end of file
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;
namespace DataEditorX
{
public partial class LocationForm : Form
{
public LocationForm()
{
this.InitializeComponent();
}
private void checkLocationMZone0x4_CheckedChanged(object sender, EventArgs e)
{
if (!noCheck)
{
this.CheckOnField();
}
}
private void CheckOnField()
{
this.checkMZoneAndSZone.Checked = this.checkLocationMZone0x4.Checked && this.checkLocationSZone0x8.Checked;
}
private void checkLocationSZone0x8_CheckedChanged(object sender, EventArgs e)
{
if (!noCheck)
{
this.CheckOnField();
}
}
bool noCheck = false;
private void checkMZoneAndSZone_CheckedChanged(object sender, EventArgs e)
{
if (checkMZoneAndSZone.Checked)
{
noCheck = true;
checkLocationMZone0x4.Checked = true;
checkLocationSZone0x8.Checked = true;
noCheck = false;
}
}
}
public class Location
{
public int LocationInt;
enum LocationStrings
{
LOCATION_DECK =0x01,
LOCATION_HAND =0x02,
LOCATION_MZONE =0x04,
LOCATION_SZONE =0x08,
LOCATION_GRAVE =0x10,
LOCATION_REMOVED =0x20,
LOCATION_EXTRA =0x40,
LOCATION_OVERLAY =0x80,
LOCATION_ONFIELD =0x0c,
LOCATION_DECKBOT =0x10001,
LOCATION_DECKSHF =0x20001
}
public override string ToString()
{
return base.ToString();
}
}
}
<?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
......@@ -4,11 +4,7 @@ namespace DataEditorX
{
public partial class ResetForm : Form
{
class Position
{
}
class Reset
public class Reset
{
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment