Commit 2c961859 authored by 247321453's avatar 247321453

fix

parent aed623a0
...@@ -71,7 +71,7 @@ void DataEditFormLoad(object sender, EventArgs e) ...@@ -71,7 +71,7 @@ void DataEditFormLoad(object sender, EventArgs e)
GAMEPATH=Application.StartupPath; GAMEPATH=Application.StartupPath;
if(File.Exists(Path.Combine(GAMEPATH,"DataEditorX.txt"))) if(File.Exists(Path.Combine(GAMEPATH,"DataEditorX.txt")))
{ {
string[] lines=File.ReadAllLines(Path.Combine(GAMEPATH,"DataEditorX.txt"),Encoding.Default); string[] lines=File.ReadAllLines(Path.Combine(GAMEPATH,"DataEditorX.txt"),Encoding.UTF8);
GAMEPATH=(lines.Length>0)?lines[0]:Application.StartupPath; GAMEPATH=(lines.Length>0)?lines[0]:Application.StartupPath;
UPDATEURL=(lines.Length>1)?lines[1]:"http://247321453@ys168.com"; UPDATEURL=(lines.Length>1)?lines[1]:"http://247321453@ys168.com";
GITURL=(lines.Length>2)?lines[2]:"https://github.com/247321453/DataEditorX"; GITURL=(lines.Length>2)?lines[2]:"https://github.com/247321453/DataEditorX";
......
...@@ -78,6 +78,9 @@ ...@@ -78,6 +78,9 @@
<Folder Include="Core" /> <Folder Include="Core" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="DataEditorX.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Data\card-attribute.txt"> <None Include="Data\card-attribute.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
...@@ -102,6 +105,9 @@ ...@@ -102,6 +105,9 @@
<None Include="Data\cover.jpg"> <None Include="Data\cover.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Include="readme.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>
\ No newline at end of file
F:\game\YGOPRO
http://247321453.ys168.com
https://github.com/247321453/DataEditorX
\ No newline at end of file
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing; using System.Drawing;
using System.IO;
using System.Windows.Forms; using System.Windows.Forms;
namespace DataEditorX namespace DataEditorX
...@@ -18,7 +19,7 @@ namespace DataEditorX ...@@ -18,7 +19,7 @@ namespace DataEditorX
public partial class MainForm : Form public partial class MainForm : Form
{ {
DataEditForm editForm; DataEditForm editForm;
string datadir=".\\data\\"; string datadir="";
public MainForm(string filename) public MainForm(string filename)
{ {
Init(filename); Init(filename);
...@@ -37,6 +38,7 @@ void Init(string filename) ...@@ -37,6 +38,7 @@ void Init(string filename)
InitializeComponent(); InitializeComponent();
timer1.Interval=2000; timer1.Interval=2000;
timer1.Enabled=true; timer1.Enabled=true;
datadir=Path.Combine(Application.StartupPath,"data");
editForm.InitForm(datadir); editForm.InitForm(datadir);
} }
......
配置文件
DataEditorX.txt
1.游戏目录
2.更新网址
3.源码网址
F:\game\YGOPRO
http://247321453.ys168.com
https://github.com/247321453/DataEditorX
\ No newline at end of file
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