Skip to content

Commit

Permalink
update 1.7.0
Browse files Browse the repository at this point in the history
* change tab index
* set init select file location in frmDeckExtractor, frmDeckList
* add save deck list to text file feature.
  • Loading branch information
ekaomk committed Aug 9, 2015
1 parent 995c7f6 commit d47edde
Show file tree
Hide file tree
Showing 8 changed files with 80 additions and 47 deletions.
4 changes: 2 additions & 2 deletions YGOPro Tweaker/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.6.0.0")]
[assembly: AssemblyFileVersion("1.6.0.0")]
[assembly: AssemblyVersion("1.7.0.0")]
[assembly: AssemblyFileVersion("1.7.0.0")]
44 changes: 22 additions & 22 deletions YGOPro Tweaker/frmConfig.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions YGOPro Tweaker/frmConfig.resx
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,12 @@
<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>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.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>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAkAAAAAAAEAIACYfwEAlgAAAICAAAABACAAKAgBAC6AAQBgYAAAAQAgAKiUAABWiAIASEgAAAEA
Expand Down
11 changes: 5 additions & 6 deletions YGOPro Tweaker/frmDeckExtractor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ static string GetString(byte[] bytes)
private void btnLoadDeck_Click(object sender, EventArgs e)
{
OpenFileDialog OFD = new OpenFileDialog();
OFD.InitialDirectory = Application.StartupPath;
OFD.InitialDirectory = Application.StartupPath + "\\replay";
OFD.Filter = "YGOPro Replay Files (*.yrp)|*.yrp|All files (*.*)|*.*";
OFD.FilterIndex = 1;
OFD.RestoreDirectory = true;
Expand Down Expand Up @@ -508,13 +508,13 @@ private void btnSaveDeckListPlayerOne_Click(object sender, EventArgs e)
{
// Configure save file dialog box
SaveFileDialog dlg = new SaveFileDialog();
dlg.InitialDirectory = Application.StartupPath + "\\deck";
dlg.FileName = "deck.ydk"; // Default file name
dlg.DefaultExt = ".ydk"; // Default file extension
dlg.Filter = "YGOPro Deck Files (.ydk)|*.ydk"; // Filter files by extension

if (dlg.ShowDialog() == DialogResult.OK)
{
StringBuilder strb = new StringBuilder();
System.IO.File.WriteAllBytes(dlg.FileName, System.Text.Encoding.UTF8.GetBytes(PlayerOneDeck.ToString()));
}
}
Expand All @@ -526,13 +526,13 @@ private void btnSaveDeckListPlayerTwo_Click(object sender, EventArgs e)
{
// Configure save file dialog box
SaveFileDialog dlg = new SaveFileDialog();
dlg.InitialDirectory = Application.StartupPath + "\\deck";
dlg.FileName = "deck.ydk"; // Default file name
dlg.DefaultExt = ".ydk"; // Default file extension
dlg.Filter = "YGOPro Deck Files (.ydk)|*.ydk"; // Filter files by extension

if (dlg.ShowDialog() == DialogResult.OK)
{
StringBuilder strb = new StringBuilder();
System.IO.File.WriteAllBytes(dlg.FileName, System.Text.Encoding.UTF8.GetBytes(PlayerTwoDeck.ToString()));
}
}
Expand All @@ -544,13 +544,13 @@ private void btnSaveDeckListPlayerThree_Click(object sender, EventArgs e)
{
// Configure save file dialog box
SaveFileDialog dlg = new SaveFileDialog();
dlg.InitialDirectory = Application.StartupPath + "\\deck";
dlg.FileName = "deck.ydk"; // Default file name
dlg.DefaultExt = ".ydk"; // Default file extension
dlg.Filter = "YGOPro Deck Files (.ydk)|*.ydk"; // Filter files by extension

if (dlg.ShowDialog() == DialogResult.OK)
{
StringBuilder strb = new StringBuilder();
System.IO.File.WriteAllBytes(dlg.FileName, System.Text.Encoding.UTF8.GetBytes(PlayerThreeDeck.ToString()));
}
}
Expand All @@ -562,14 +562,13 @@ private void btnSaveDeckListPlayerFour_Click(object sender, EventArgs e)
{
// Configure save file dialog box
SaveFileDialog dlg = new SaveFileDialog();
dlg.InitialDirectory = Application.StartupPath + "\\deck";
dlg.FileName = "deck.ydk"; // Default file name
dlg.DefaultExt = ".ydk"; // Default file extension
dlg.Filter = "YGOPro Deck Files (.ydk)|*.ydk"; // Filter files by extension

if (dlg.ShowDialog() == DialogResult.OK)
{
StringBuilder strb = new StringBuilder();

System.IO.File.WriteAllBytes(dlg.FileName, System.Text.Encoding.UTF8.GetBytes(PlayerFourDeck.ToString()));
}
}
Expand Down
15 changes: 14 additions & 1 deletion YGOPro Tweaker/frmDeckList.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 27 additions & 6 deletions YGOPro Tweaker/frmDeckList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ private void getCardText(List<int> Deck, List<string> DeckText, List<cardData> C
private bool getCardID()
{
OpenFileDialog OFD = new OpenFileDialog();
OFD.InitialDirectory = Application.StartupPath;
OFD.InitialDirectory = Application.StartupPath + "\\deck";
OFD.Filter = "YGOPro Deck Files (*.ydk)|*.ydk|All files (*.*)|*.*";
OFD.FilterIndex = 1;
OFD.RestoreDirectory = true;
Expand Down Expand Up @@ -269,14 +269,35 @@ private void btnCopyToClipboard_Click(object sender, EventArgs e)
{
if (allCard.Count > 0)
{
StringBuilder sbdTemp = new StringBuilder();
foreach (cardData cards in allCard)
Clipboard.SetText(getListString());
MessageBox.Show(Copied_To_Clipboard_Text, Information_Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}

private void btnSaveToTextFile_Click(object sender, EventArgs e)
{
if (allCard.Count > 0)
{
SaveFileDialog sfg = new SaveFileDialog();
sfg.FileName = "decklist.txt"; // Default file name
sfg.DefaultExt = ".txt"; // Default file extension
sfg.Filter = "Text File (.txt)|*.txt"; // Filter files by extension

if (sfg.ShowDialog() == DialogResult.OK)
{
sbdTemp.AppendLine(cards.Name);
System.IO.File.WriteAllBytes(sfg.FileName, Encoding.UTF8.GetBytes(getListString()));
}
Clipboard.SetText(sbdTemp.ToString());
MessageBox.Show(Copied_To_Clipboard_Text, Information_Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}

private string getListString()
{
StringBuilder sbdTemp = new StringBuilder();
foreach (cardData cards in allCard)
{
sbdTemp.AppendLine(cards.Name);
}
return sbdTemp.ToString();
}
}
}
Loading

0 comments on commit d47edde

Please sign in to comment.