Commit 99d81638 authored by keyongyu's avatar keyongyu

2.4.2.5

link
win32
parent ad2c0d18
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -266,9 +266,9 @@ public void InitControl(DataConfig datacfg)
InitComboBox(cb_cardlevel, datacfg.dicCardLevels);
//卡片类型
InitCheckPanel(pl_cardtype, datacfg.dicCardTypes);
//连接标记
InitCheckPanel(pl_markers, datacfg.dicLinkMarkers);
SetEnabled(pl_markers, false);
//连接标记
InitCheckPanel(pl_markers, datacfg.dicLinkMarkers);
SetEnabled(pl_markers, false);
//效果类型
InitCheckPanel(pl_category, datacfg.dicCardcategorys);
//系列名
......@@ -287,35 +287,51 @@ void InitCheckPanel(FlowLayoutPanel fpanel, Dictionary<long, string> dic)
fpanel.Controls.Clear();
foreach (long key in dic.Keys)
{
CheckBox _cbox = new CheckBox();
//_cbox.Name = fpanel.Name + key.ToString("x");
_cbox.Tag = key;//绑定值
_cbox.Text = dic[key];
_cbox.AutoSize = true;
_cbox.Margin = fpanel.Margin;
_cbox.CheckedChanged += _cbox_CheckedChanged;
//_cbox.Click += PanelOnCheckClick;
fpanel.Controls.Add(_cbox);
string value = dic[key];
if(value != null && value.StartsWith("NULL"))
{
Label lab=new Label();
string[] sizes = value.Split(',');
if(sizes.Length>=3){
lab.Size=new Size(int.Parse(sizes[1]),int.Parse(sizes[2]));
}
lab.AutoSize = false;
lab.Margin = fpanel.Margin;
fpanel.Controls.Add(lab);
}else{
CheckBox _cbox = new CheckBox();
//_cbox.Name = fpanel.Name + key.ToString("x");
_cbox.Tag = key;//绑定值
_cbox.Text = value;
_cbox.AutoSize = true;
_cbox.Margin = fpanel.Margin;
_cbox.CheckedChanged += _cbox_CheckedChanged;
//_cbox.Click += PanelOnCheckClick;
fpanel.Controls.Add(_cbox);
}
}
fpanel.ResumeLayout(false);
fpanel.PerformLayout();
}
private void _cbox_CheckedChanged(object sender, EventArgs e)
{
CheckBox cbox = (CheckBox)sender;
if(cbox.Parent== pl_cardtype)
{
if ((long)cbox.Tag == (long)Core.Info.CardType.TYPE_LINK)
{
SetEnabled(pl_markers, cbox.Checked);
tb_def.ReadOnly = cbox.Checked;
}
}
}
private void _cbox_CheckedChanged(object sender, EventArgs e)
{
CheckBox cbox = (CheckBox)sender;
if(cbox.Parent== pl_cardtype)
{
if ((long)cbox.Tag == (long)Core.Info.CardType.TYPE_LINK)
{
SetEnabled(pl_markers, cbox.Checked);
tb_def.ReadOnly = cbox.Checked;
tb_link.ReadOnly = !cbox.Checked;
}
}else if(cbox.Parent == pl_markers){
setLinkMarks(GetCheck(pl_markers));
}
}
//初始化ComboBox
void InitComboBox(ComboBox cb, Dictionary<long, string> tempdic)
//初始化ComboBox
void InitComboBox(ComboBox cb, Dictionary<long, string> tempdic)
{
InitComboBox(cb, DataManager.GetKeys(tempdic),
DataManager.GetValues(tempdic));
......@@ -375,14 +391,17 @@ void SetCheck(FlowLayoutPanel fpl, long number)
}
//return strType;
}
void SetEnabled(FlowLayoutPanel fpl, bool set)
{
foreach (Control c in fpl.Controls)
{
CheckBox cbox=(CheckBox)c;
cbox.Enabled = set;
}
}
void SetEnabled(FlowLayoutPanel fpl, bool set)
{
foreach (Control c in fpl.Controls)
{
CheckBox cbox= c as CheckBox;
if(cbox != null)
{
cbox.Enabled = set;
}
}
}
//设置combobox
void SetSelect(ComboBox cb, long k)
{
......@@ -483,6 +502,16 @@ public Card GetOldCard()
{
return oldCard;
}
private void setLinkMarks(long mark,bool setCheck=false)
{
if(setCheck)
{
SetCheck(pl_markers, mark);
}
tb_link.Text= Convert.ToString(mark, 2).PadLeft(9,'0');
}
public void SetCard(Card c)
{
oldCard = c;
......@@ -508,20 +537,23 @@ public void SetCard(Card c)
tb_setcode4.Text = setcodes[3].ToString("x");
//type,category
SetCheck(pl_cardtype, c.type);
if (c.IsType(Core.Info.CardType.TYPE_LINK))
SetCheck(pl_markers, c.def);
else
SetCheck(pl_markers, 0);
SetCheck(pl_category, c.category);
if (c.IsType(Core.Info.CardType.TYPE_LINK)){
setLinkMarks(c.def, true);
}
else{
tb_link.Text="";
SetCheck(pl_markers, 0);
}
SetCheck(pl_category, c.category);
//Pendulum
tb_pleft.Text = ((c.level >> 24) & 0xff).ToString();
tb_pright.Text = ((c.level >> 16) & 0xff).ToString();
//atk,def
tb_atk.Text = (c.atk < 0) ? "?" : c.atk.ToString();
if (c.IsType(Core.Info.CardType.TYPE_LINK))
tb_def.Text = "0";
else
tb_def.Text = (c.def < 0) ? "?" : c.def.ToString();
if (c.IsType(Core.Info.CardType.TYPE_LINK))
tb_def.Text = "0";
else
tb_def.Text = (c.def < 0) ? "?" : c.def.ToString();
tb_cardcode.Text = c.id.ToString();
tb_cardalias.Text = c.alias.ToString();
SetImage(c.id.ToString());
......@@ -562,19 +594,19 @@ public Card GetCard()
c.atk = -1;
else
int.TryParse(tb_atk.Text, out c.atk);
if (c.IsType(Core.Info.CardType.TYPE_LINK))
{
c.def = (int)GetCheck(pl_markers);
}
else
{
if (tb_def.Text == "?" || tb_def.Text == "?")
c.def = -2;
else if (tb_def.Text == ".")
c.def = -1;
else
int.TryParse(tb_def.Text, out c.def);
}
if (c.IsType(Core.Info.CardType.TYPE_LINK))
{
c.def = (int)GetCheck(pl_markers);
}
else
{
if (tb_def.Text == "?" || tb_def.Text == "?")
c.def = -2;
else if (tb_def.Text == ".")
c.def = -1;
else
int.TryParse(tb_def.Text, out c.def);
}
long.TryParse(tb_cardcode.Text, out c.id);
long.TryParse(tb_cardalias.Text, out c.alias);
......@@ -1339,7 +1371,7 @@ void Menuitem_exportdataClick(object sender, EventArgs e)
{
tasker.SetTask(MyTask.ExportData,
GetCardList(false),
ygopath.gamepath,
ygopath.gamepath,
dlg.FileName,
GetOpenFile());
Run(LanguageHelper.GetMsg(LMSG.ExportData));
......@@ -1713,5 +1745,30 @@ void Menuitem_autoreturnClick(object sender, EventArgs e)
}
}
private void text2LinkMarks(string text)
{
try{
long mark=Convert.ToInt64(text, 2);
setLinkMarks(mark, true);
}catch{
//
}
}
void Tb_linkTextChanged(object sender, EventArgs e)
{
text2LinkMarks(tb_link.Text);
}
void Tb_linkKeyPress(object sender, KeyPressEventArgs e)
{
if(e.KeyChar != '0' && e.KeyChar != '1' && e.KeyChar != 1 && e.KeyChar!=22 && e.KeyChar!=3 && e.KeyChar != 8){
// MessageBox.Show("key="+(int)e.KeyChar);
e.Handled = true;
}else{
text2LinkMarks(tb_link.Text);
}
}
}
}
This diff is collapsed.
......@@ -117,10 +117,13 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="dockPanel1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="mainMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>135, 17</value>
<value>237, 17</value>
</metadata>
<metadata name="bgWorker1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
<value>130, 17</value>
</metadata>
</root>
\ No newline at end of file
......@@ -28,4 +28,4 @@
//
// You can specify all the values or you can use the default the Revision and
// Build Numbers by using the '*' as shown below:
[assembly: AssemblyVersion("2.4.2.4")]
[assembly: AssemblyVersion("2.4.2.5")]
★更新历史
2.4.2.5
link的箭头控件
2.4.2.4
导出数据,中文名字乱码
2.4.2.3
......
......@@ -30,14 +30,15 @@
0xc 12★
0xd 13★
##link marker
0x1 ↙
0x2 ↓
0x4 ↘
0x8 ←
0x20 →
0x40 ↖
0x80 ↑
0x100 ↗
0x40
0x80
0x100
0x8
0x10 NULL,15,15
0x20
0x1
0x2
0x4
##category
0x1 魔陷破坏
0x2 怪兽破坏
......
......@@ -30,14 +30,15 @@
0xc 12★
0xd 13★
##link marker
0x1 ↙
0x2 ↓
0x4 ↘
0x8 ←
0x20 →
0x40 ↖
0x80 ↑
0x100 ↗
0x40
0x80
0x100
0x8
0x10 NULL,15,15
0x20
0x1
0x2
0x4
##category
0x1 S/T Destroy
0x2 Destroy Monster
......
[DataEditorX]2.4.2.4[DataEditorX]
[DataEditorX]2.4.2.5[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★运行环境(Environment)
......
/*.dll
/*.exe
/data
/Magic Set Editor 2
/Newtonsoft.Json.xml
/*.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<connectionStrings>
<!-- Example connection to a SQL Server Database on localhost. -->
<!-- <add name="ExampleConnectionString"
connectionString="Data Source=.;Initial Catalog=DBName;Integrated Security=True"
providerName="System.Data.SqlClient" /> -->
</connectionStrings>
<appSettings>
<!-- access these values via the property:
System.Configuration.ConfigurationManager.AppSettings[key]
-->
<!-- MSE language data/mse_xxx.txt -->
<add key="mse" value="Chinese-Simplified" />
<!-- Language data/cardinfo_xxxx.txt data/language_xxx.txt -->
<add key="language" value="Chinese" />
<!-- Check system language when running program first time -->
<add key="check_system_language" value="false" />
<!-- async load data -->
<add key="async" value="false" />
<!-- DataEditorX source code -->
<add key="sourceURL" value="https://github.com/247321453/DataEditorX" />
<!-- DataEditorX update url-->
<add key="updateURL" value="https://github.com/247321453/DataEditorX/tree/master/win32/readme.txt" />
<!-- delete,modify with card's files image script -->
<add key="opera_with_cards_file" value="true" />
<!-- open file in this.such as lua -->
<add key="open_file_in_this" value="true" />
<!-- check update when opening application automatically -->
<add key="auto_check_update" value="true" />
<!-- Cut Images Setting -->
<add key="image_quilty" value="100" />
<add key="image" value="44,64,177,254" />
<add key="image_other" value="25,54,128,128" />
<add key="image_xyz" value="24,51,128,128" />
<add key="image_pendulum" value="16,50,147,109" />
<!-- CodeEdiotr Setting
IME = true 使用輸入法,正常顯示文字,反應變慢
IME = false English
-->
<add key="IME" value="false" />
<add key="wordwrap" value="true" />
<add key="tabisspace" value="false" />
<add key="fontname" value="Consolas" />
<add key="fontsize" value="14.5" />
<!-- MSE path-->
<add key="mse_path" value="./MagicSetEditor2/mse.exe" />
<add key="mse_exprotpath" value="./exprot" />
<add key="mse_auto_rarity" value="true" />
<add key="pack_db" value="./pack.db" />
<!-- 1024 : 40-->
<add key="autolength" value="37" />
</appSettings>
</configuration>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<connectionStrings>
<!-- Example connection to a SQL Server Database on localhost. -->
<!-- <add name="ExampleConnectionString"
connectionString="Data Source=.;Initial Catalog=DBName;Integrated Security=True"
providerName="System.Data.SqlClient" /> -->
</connectionStrings>
<appSettings>
<!-- access these values via the property:
System.Configuration.ConfigurationManager.AppSettings[key]
-->
<!-- MSE language data/mse_xxx.txt -->
<add key="mse" value="Chinese-Simplified" />
<!-- Language data/cardinfo_xxxx.txt data/language_xxx.txt -->
<add key="language" value="Chinese" />
<!-- Check system language when running program first time -->
<add key="check_system_language" value="false" />
<!-- async load data -->
<add key="async" value="false" />
<!-- DataEditorX source code -->
<add key="sourceURL" value="https://github.com/247321453/DataEditorX" />
<!-- DataEditorX update url-->
<add key="updateURL" value="https://github.com/247321453/DataEditorX/tree/master/win32/readme.txt" />
<!-- delete,modify with card's files image script -->
<add key="opera_with_cards_file" value="true" />
<!-- open file in this.such as lua -->
<add key="open_file_in_this" value="true" />
<!-- check update when opening application automatically -->
<add key="auto_check_update" value="true" />
<!-- Cut Images Setting -->
<add key="image_quilty" value="100" />
<add key="image" value="44,64,177,254" />
<add key="image_other" value="25,54,128,128" />
<add key="image_xyz" value="24,51,128,128" />
<add key="image_pendulum" value="16,50,147,109" />
<!-- CodeEdiotr Setting
IME = true 使用輸入法,正常顯示文字,反應變慢
IME = false English
-->
<add key="IME" value="false" />
<add key="wordwrap" value="true" />
<add key="tabisspace" value="false" />
<add key="fontname" value="Consolas" />
<add key="fontsize" value="14.5" />
<!-- MSE path-->
<add key="mse_path" value="./MagicSetEditor2/mse.exe" />
<add key="mse_exprotpath" value="./exprot" />
<add key="mse_auto_rarity" value="true" />
<add key="pack_db" value="./pack.db" />
<!-- 1024 : 40-->
<add key="autolength" value="37" />
</appSettings>
</configuration>
\ No newline at end of file
@echo off
cd /d "%~dp0/update"
if exist update_new.exe move /y update_new.exe update.exe
start update.exe -d "%~dp0" "https://github.com/247321453/MagicSetEditor2/raw/master/"
exit
\ No newline at end of file
客户端使用:
注意:
1、更新的时候,请不要打开游戏目录。
2、知道显示更新完成,才能关闭本程序。
3、客户端改名:
例如:
自动更新.exe
自动更新.exe.bat
自动更新.exe.config
设置:
保存的文件夹
key="path" value="D:\ygopro"
如果文件已经存在,则跳过,不存在则下载。
key="ignore1" value="textrue/*"
key="ignore上面的数字+1" value="忽略文件的相对路径,允许通配符*"
下载的地址(最后必须为/)
key="url" value="https://github.com/247321453/ygocore-update/raw/master/"
代理设置(可无视)
useproxy的value为true(小写),则通过代理下载文件
key="useproxy" value="false"
key="proxy" value="127.0.0.1:8080"
服务端使用:
运行update.exe.bat,即可生成对应的文件列表
update.exe -m "【需要更新的文件夹】"
【需要更新的文件夹】后最后不能为\
例如:
错误 update.exe -m "D:\pro files\"
正确 update.exe -m "D:\pro files"
注意:
【需要更新的文件夹】为D:\game
update.exe在D:\game\update 【需要更新的文件夹】的子目录
则可以直接使用update.exe -m
结果保存在 【需要更新的文件夹】\update
然后再修改rename和delete文件的内容
注意:delete先执行
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!-- <startup>
<supportedRuntime version="vv2.0.50727" sku=".NETFramework,Version=vv2.0.50727" />
</startup> -->
<appSettings>
<!-- access these values via the property:
System.Configuration.ConfigurationManager.AppSettings[key]
-->
<add key="url" value="https://github.com/247321453/MagicSetEditor2/raw/master/" />
<!-- game save path -->
<add key="path" value="..\" />
<!-- use proxy -->
<add key="useproxy" value="false" />
<add key="proxy" value="127.0.0.1:8080" />
<!-- if file exitis then no download -->
<add key="ignore1" value="update/update.exe" />
</appSettings>
</configuration>
\ No newline at end of file
This diff is collapsed.
★更新历史
2.4.2.5
link的箭头控件
2.4.2.4
导出数据,中文名字乱码
2.4.2.3
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
--created by DataEditorX
Debug.SetAIName("AI Name")
Debug.ReloadFieldBegin(DUEL_ATTACK_FIRST_TURN+DUEL_SIMPLE_AI)
Debug.SetPlayerInfo(0,8000,0,0) --player
Debug.SetPlayerInfo(1,15000,0,0) --AI
--Debug.AddCard(int code,int owner,int playerid,int location,int sequence,int position)
--Debug.AddCard(int code,int owner,int playerid,int location,int sequence,int position,bool revive_limit)
--Debug.PreAddCounter(Card card,int counter,int ccount)
--Debug.PreEquip(Card equip_card, Card target)
--Debug.PreSetTarget(Card card, Card target)
--end
Debug.ReloadFieldEnd()
Debug.ShowHint("Message")
aux.BeginPuzzle()
This diff is collapsed.
[DataEditorX]2.4.2.4[DataEditorX]
[DataEditorX]2.4.2.5[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★运行环境(Environment)
......
No preview for this file type
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