Jump to content
SubSpace Forum Network

[rel] LvzViewer


Recommended Posts

Posted

After a whole week of development I'm proud to release LvzViewer to the public.

 

 

 

LvzViewer is a WinRAR like program for lvz.

You need the .NET Framework 2 to run it.

 

Features

  • Creating a new empty lvz
  • Adding/Extracting files
  • Drag&Drop to/from Explorer
  • Open files
  • Deleting files
  • Renaming files
  • Editing files

Special Features (the ones that are not self-explanatory)

 

Repack

Tries to recompress all data inside the lvz. This may result in a smaller lvz file, because for some reason BuildLevel doesn't compress picture files other then bmp.

 

Edit

Rightclick a file and chose "Edit". LvzViewer will open the file with its !@#$%^&*ociated application. When you're done editing, save the file and close the opened application. LvzViewer will tell you that the file has been edited and asks if you want to update it. You're not able to do anything in LvzViewer until the application it opened to edit the file closes.

 

What's next

LvzViewer is all about files at the moment, it ignores the object part of the lvz.

But LvzViewer will be able to open ini-files, add, delete and edit objects in the future.

 

Support

If you have any questions, problems or suggestions, send me an email (address below) or contact me on

http://forums.minegoboom.com or

http://ssforum.net

Forums will probably be better, as I tend to forget answering emails.

 

License and warranty

LvzViewer is released under the MIT license.

 

Credits

Idea - Mine GO BOOM (http://forums.minegoboom.com)

LvzViewer - Patrick Deuster aka k0zy (pdeuster [ a t ] gmail [ d o t ] com)

Icons - Tango Desktop Project (http://tango.freedesktop.org)

zlib.net - ComponentAce (http://www.componentace.com)

 

EDIT:

Updated version to fix most of the errors SOS found. Redownload, please.

Added comments to sourcecode.

 

Known bugs

Fails to compress/decompress rar archives

Posted

Neato.

  • Code has 0 comments...
  • Size is shown in US number format.
  • The size unit is not shown anymore ("Size (bytes)" as the column !@#$%^&*le would be fine, for example).
  • It should be "Open..." and "Add..." since they pop up dialogs blum.gif
  • A delete operation does not add an asterisk to the !@#$%^&*le bar.
  • When nothing is selected and you do right click->Open or ->Edit, you get
    System.ArgumentOutOfRangeException: InvalidArgument=Value of '0' is not valid for 'index'.
    Parameter name: index
      at System.Windows.Forms.ListView.SelectedListViewItemCollection
    .get_Item(Int32 index)
      at LVZViewer.LVZForm.openToolStripMenuItem_Click(Object sender, EventArgs e)


  • How about a total compression ratio somewhere?
  • There is no need for a separate right click->Open. Edit seems to fulfill that functionality already and provides saving into the lvz, as well.
  • When doing a repack of the attached file, it crashes:
    zlib.ZStreamException: inflating: 
      at zlib.ZOutputStream.Write(Byte[] b1, Int32 off, Int32 len)
      at LVZViewer.LvzData.CopyStream(Stream input, Stream output)
      at LVZViewer.LvzData.decomp_data()
      at LVZViewer.LVZForm.tSBRepack_Click(Object sender, EventArgs e)


  • "File has not been saved. Save now?" Is a non-standard prompt and should not be used. The question is the same but it needs a cancel button.

That's it for now smile.gif

c_counter.zip

Posted (edited)

I should've given it to you for testing. ;)

 

I know about the comments, I was nonsequential naming my methods and variables, too. smile.gif

Guess that happens when you don't plan a single bit and start off coding right away.

 

I think I'll make the numbers plain unformated then?

I'll add the unit, just thought if WinRAR doesn't show it, I don't need to, too.

 

Forgot about the delete operator, oops.

 

I'll look into the other errors now and add the "cancel button"

 

Thank you. smile.gif

 

k0zy

 

Edit: Removed quote of entire previous post. --Smong

Edited by Smong
Posted

How about printing the size in the local format? int.ToString("some format string was needed here, I think").

 

You didn't plan a single bit? Pfft, that is no excuse for lack of comments ;) At least your general coding style is more-or-less ok ;)

Posted

I did use a formatstring.

Anyways, it's plain now ;)

 

Updated my first post, please redownload.

 

I added a few comments, too.

 

I should have planed, but I just wanted to try C#, was surprised how easy it is and so I went on and on.

I did draw an UML diagram for my last MERVBot plugin, though ;)

 

k0zy

Posted

*Cracks tester knuckles*

*Crashes program 10 different ways*

*Decides to read code instead*

  • catch (Exception)

    is generally considered extremely bad style, since it catches program-fatal exceptions, as well. I have used it myself, as well, though. I sometimes wish there were a

    catch (!SystemException)

    , but the .Net developers have decided that the likes of SystemException and ApplicationException were a mistake... I find it very useful but meh. ASSS. Although, they were not consistent at all, so it is a bad idea to rely on these two anyway. Woah, this list item got too long.

  • I have having garbage comments - XML comments like
    <param name="sender">sender</param>

    . But meh, many coders are too sloppy to remove that. A lot actually want those there. Freaks blum.gif

  • File IO has almost no exception handling. Every read, every open, every write can throw a mul!@#$%^&*ude of exceptions very easily! At least do the lazy
    catch (Exception)

    blum.gif

  • The type column is a bit skinny - lots of things get cut off at default width for me.
  • Your non-XML commenting is pretty good!

Guest
This topic is now closed to further replies.
×
×
  • Create New...