It is currently 11 May 2021, 22:02
   
Text Size

PlayDeckOrganizer

Continuing Development of MicroProse's Magic: The Gathering!

Moderators: BAgate, drool66, stassy, Aswan jaguar, gmzombie, CCGHQ Admins

PlayDeckOrganizer

Postby Dave » 18 Feb 2013, 22:16

Made a little program called PlaydeckOrganizer.
It scans the Playdeck-folder and all subdirectories for decks.
It only reads the name and description of each deck and displays it in a screen.
Place PlayDeckOrganizer.exe in the magic directory and run it.

Features:
- filter by typing in the search-textbox (multiple keywords supported)
- copies multiple decks from any subdirectory to Playdeck
- Copies all decks from Playdeck back to their subdirectories. If they had none yet, it will be copied in the subdirectory MyPlaydeck.

Once you have organized your decks in subdirectories (unfortunately you have to do that part yourself), this proggie will make your life easier.
No messing around with renaming directories.
Just clear Playdeck-folder with a click on a button and start filling it up again with decks from your subdirectories.

Before you go experiment, make a copy of your playdeck. Just in case.

It requires .Net Framework 2.0 and is tested on Windows 7 x64 only for now, but should work on any windows.
As always, feedback is appreciated.

V2:
- Replaced annoying messages by logfile when copying decks to subdirectories
- User can define in which columns to search (Deckname,desciption and/or path)
- Able to search multiple keywords (separated by space)
- Added label in left bottom corner to show info from selected cell

V3:
- Playdeck to Subdirs went wrong with files with an apostrophe (') in it, like a Paladin's tale.
Attachments
PlaydeckOrganizer.zip
(7.07 KiB) Downloaded 201 times
Last edited by Dave on 13 Oct 2013, 08:55, edited 2 times in total.
Dave
 
Posts: 97
Joined: 09 Jan 2010, 13:30
Has thanked: 16 times
Been thanked: 14 times

Re: PlayDeckOrganizer

Postby nove » 19 Feb 2013, 10:35

Cool little program ;)

I've tested it now and it seems to work "as advertised". Pretty nice =D>

Just one "bug report" (although I'm sure it's probably a "feature" :P): the "playdeck to subdirs" function is cool, but it's a bit annoying when you run it the first time, since it will give off a dialog that requires you to press "OK" for _every single deck_ in your Playdeck folder (hundreds and hundreds :P). Maybe you could just add a checkbox to the interface with a caption like "ignore warnings" under the "playdeck to subdirs" folder, in case the user wants to bypass the warnings? Also, in the warning dialog, it seems you need to add a space right after the deck's name.

Other than that, seems like it does what people were requesting :)

(also, not that it matters, but you should probably set the title of the window to "PlayDeckOrganizer by Dave" or something :P)

EDIT: I just remembered another possibly useful feature (if you feel like implementing it, of course :P)... to make the search box also look in the path of the files; that way, if I search for "Dredge", it would give me all decks within any folder containing the string "Dredge" BESIDES decks which would contain the string "Dredge" in their filenames. This would be useful so we don't have to put information on deck "theme" within the description of the deck, as long as the deck are contained within descriptive folders.
nove
 
Posts: 10
Joined: 05 Feb 2013, 20:46
Has thanked: 4 times
Been thanked: 0 time

Re: PlayDeckOrganizer

Postby Dave » 20 Feb 2013, 20:24

Updated the first post with the new Organizer.
@nove: Thank you for taking the time to point out some (annoying) bugs #-o . They are all gone.
Dave
 
Posts: 97
Joined: 09 Jan 2010, 13:30
Has thanked: 16 times
Been thanked: 14 times

Re: PlayDeckOrganizer

Postby CirothUngol » 23 Mar 2013, 00:23

Hiya, Dave.
Wow, nice looking app. Tiny, sleek, and really fast!
It looks like Visual Studio... which language? What was your development time?

I'm looking to move away from Just BASIC/Liberty BASIC. It's excellent for utilitarian, i-need-to-use-it-once sort of programs, and I'll continue to use it 'cause it's so easy, but the difficulty in developing my latest effort has proven to me it's ineffectualness in creating larger, more complex applications (take a look at the code to the PDAnalyser sometime... eek).

I've been investigating other platforms, and I'm currently leaning toward AutoIt, 'cause it's a simple, procedural, scripting language with a familiar BASIC-ish syntax, it offers a ton of Built-in and User-provided functions, it has an insane amount of control over the Windows GUI, it compiles to a single, fully-contained executable with absolutely no dependencies, and it's still completely free.

However, I've never used one of those multi-mega software development platforms with the gigantic array of gizmos, widgets, and what-not. I've always found them rather intimidating... to force an analogy; I'm accustomed to NotePad, not Microsoft Word.

...but I might be willing to learn, if it will significantly reduce the amount of effort it requires to produce a working application. Which version of Visual Studio do you use, maybe I can scare up a copy?
"I thought the day had brought enough horrors for our ragged band, but the night was far worse."
-Lucilde Fiksdotter


My MtG Folder on DropBox, or Google Drive.
User avatar
CirothUngol
Programmer
 
Posts: 430
Joined: 13 May 2009, 21:34
Location: Gulf Coast, Texas, USA
Has thanked: 106 times
Been thanked: 104 times

Re: PlayDeckOrganizer

Postby Dave » 23 Mar 2013, 11:43

i made this in C# in Visual Studio 2008.
I think i got the platform by usenet. Don't tell anyone :wink:
The code could also be copied down to VS 2005 en up of course to 2010.

The first draft would be 3-4 hours since i'm not completely familiar with C#. Tweaking costs me always the most time (the famous 80-20 rule).
I think when you make a program like PlayDeckAnalyzer in C# ( or any other VS language), it will greatly improve in speed.
And you have a lot of controls to choose from.
The main advantage writing in a VS-language, like C#, is the enormous amount of examples on the internet. There is always someone who had the same problem and asked about it. And gotten a response. (like: how do i write to a file in c#?)

I included the source-code of PlayDeckOrganizer.
You can read the code in Form1.cs with notepad++ or any other texteditor if you don't have VS2008.
Or steal the code and use it in your new platform :)

Maybe it helps in your decision.
If you are changing platform and run in some problems, let me know. Maybe i can help.
Attachments
PlaydecksOrganizer.zip
(1.34 MiB) Downloaded 230 times
Dave
 
Posts: 97
Joined: 09 Jan 2010, 13:30
Has thanked: 16 times
Been thanked: 14 times

Re: PlayDeckOrganizer

Postby stassy » 23 Sep 2013, 14:06

While trying to update the "official" Playdeck folder to latest OoAv1 patch with PlaydeckOrganizer v2, I got a crash with the following message :

| Open
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Data.SyntaxErrorException: Syntax error: Missing operand after 's' operator.
at System.Data.ExpressionParser.Parse()
at System.Data.DataExpression..ctor(DataTable table, String expression, Type type)
at System.Data.Select..ctor(DataTable table, String filterExpression, String sort, DataViewRowState recordStates)
at System.Data.DataTable.Select(String filterExpression)
at PlaydecksOrganizer.Form1.Btn_Update_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
PlaydeckOrganizer
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files/Magic/PlayDeckAnalyser/PlaydeckOrganizer.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.


Image

Crash occurred when I hit the Playdeck to subdir button, after PDA did his check (it was not the "normal" Playdeck folder but the PDA Playdeck folder)
stassy
Moderator
 
Posts: 5274
Joined: 25 Feb 2009, 07:06
Has thanked: 471 times
Been thanked: 337 times

Re: PlayDeckOrganizer

Postby Dave » 28 Sep 2013, 08:34

Stassy, this is the way i would do it:
But then again, I would stop after point 7. :wink:
1. Start PlaydechOrganizer
2. Cleared Playdeck
3. Copy decks from folders i want to run in Pda, in PlayDeck
4. Start Pda
5. Convert those decks
6. Copy those decks back in Playdeck
7. Click 'PlayDeck to subdirs'
8. Crash.....

So could you tell me each step you took, so i can emulate the problem ?
Dave
 
Posts: 97
Joined: 09 Jan 2010, 13:30
Has thanked: 16 times
Been thanked: 14 times

Re: PlayDeckOrganizer

Postby stassy » 28 Sep 2013, 10:27

- PDO is in Magic/PlayDeckAnalyser folder in order to update the Magic/PlayDeckAnalyser/Playdeck folder
- PDO is launched and start to detect all decks in Playdeck folder of PDA.
- I hit the clear button (there was no deck file in Playdeck root so nothing happen)
- I select all deck from the list (ctrl+A) and hit Copy selected to Playdeck button
- I start PDA updated to OoAv1 and with Magic/PlayDeckAnalyser/Playdeck as Playdeck folder which detect around 2k7 decks, then I hit the convert button with no sort and no option selected (30/40/16000) for aroud 30ish seconds
- I select again all deck in PDO with ctrl+A and hit the Playdeck to subdir button with overwrite confirmed
>>> crash
stassy
Moderator
 
Posts: 5274
Joined: 25 Feb 2009, 07:06
Has thanked: 471 times
Been thanked: 337 times

Re: PlayDeckOrganizer

Postby Dave » 13 Oct 2013, 09:04

Sorry it took some time to adress your problem, Stassy. But here it is: V3 of PlayDeckOrganizer.
Updated the first post.

For the interested:
The culprit was: a Paladin's Tale. PDO uses a database kind of way to check if a deck-name is in multiple dirs (other than Playdeck-folder itself). In databases you have to double each apostrophe (a Paladin's Tale should be a Paladin''s Tale)

Anyway, enjoy the new exe
Dave
 
Posts: 97
Joined: 09 Jan 2010, 13:30
Has thanked: 16 times
Been thanked: 14 times

Re: PlayDeckOrganizer

Postby stassy » 13 Oct 2013, 13:03

Argh, so if PDO doesn't like copies of the same deck in several directories, it would be nice to have a tickbox to bypass this feature (for EDH deck used in Tournament and Challenge for eg.)

| Open
Angelic LockDown found in more than one subdirectory. Deck not copied to subdirectory
Arch Angel found in more than one subdirectory. Deck not copied to subdirectory
Black-Green Enchantress found in more than one subdirectory. Deck not copied to subdirectory
Dante found in more than one subdirectory. Deck not copied to subdirectory
Darksteel Deck found in more than one subdirectory. Deck not copied to subdirectory
EDH Doran found in more than one subdirectory. Deck not copied to subdirectory
Eggscalibur found in more than one subdirectory. Deck not copied to subdirectory
Elvish Magi found in more than one subdirectory. Deck not copied to subdirectory
Enchantress found in more than one subdirectory. Deck not copied to subdirectory
Ethyl Merman found in more than one subdirectory. Deck not copied to subdirectory
Fungus AmongUs found in more than one subdirectory. Deck not copied to subdirectory
Goblin Warlord found in more than one subdirectory. Deck not copied to subdirectory
Kobold Madness found in more than one subdirectory. Deck not copied to subdirectory
Land Vise found in more than one subdirectory. Deck not copied to subdirectory
Lockdown found in more than one subdirectory. Deck not copied to subdirectory
Merfolk Shaman found in more than one subdirectory. Deck not copied to subdirectory
Mother May I found in more than one subdirectory. Deck not copied to subdirectory
Swamp Thing found in more than one subdirectory. Deck not copied to subdirectory
Undead Knight found in more than one subdirectory. Deck not copied to subdirectory
Vampire Lord found in more than one subdirectory. Deck not copied to subdirectory
WOLFLING found in more than one subdirectory. Deck not copied to subdirectory
stassy
Moderator
 
Posts: 5274
Joined: 25 Feb 2009, 07:06
Has thanked: 471 times
Been thanked: 337 times


Return to ManaLink 3.0

Who is online

Users browsing this forum: No registered users and 9 guests


Who is online

In total there are 9 users online :: 0 registered, 0 hidden and 9 guests (based on users active over the past 10 minutes)
Most users ever online was 1371 on 09 Feb 2020, 16:22

Users browsing this forum: No registered users and 9 guests

Login Form