|
New version available:
Download link is at the bottom of the page[^]
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
John Simmons / outlaw programmer wrote: 0) When moving, rotating, or scaling the visualized weapon on the landscape, it flashes - BAD.
Have you enabled double-buffering? There's a couple articles here on CP, but I'm loathe to reference any as I can't tell if they're actually any good.
Marc
|
|
|
|
|
The custom picture box itself is double buffered.
I actually know why the flashing is occurring (I'm redrawing the background image in order to clear the old overlaid image), but any attempt to address it caused MUCH bigger issues.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
Then simply double buffer yourself by first rendering into a bitmap and then updating the image in the control.
And from the clouds a mighty voice spoke: "Smile and be happy, for it could come worse!"
And I smiled and was happy And it came worse.
|
|
|
|
|
Well, I'm not really looking for an answer to that until aft the initial release.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
New version available:
Download link is at the bottom of the page[^]
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
Great. How did you get rid of the flickering? In WinForms I always found the double bbuffering to be hit and miss.
And from the clouds a mighty voice spoke: "Smile and be happy, for it could come worse!"
And I smiled and was happy And it came worse.
|
|
|
|
|
New version available:
Download link is at the bottom of the page[^]
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
Hi JSOP
Nice app, but I just found a way to make it crash, due to an "Unhandled exception".
Steps used to reproduce the crash:
1) Select an image
(I just used one of the sample images in Windows 7)
2) Get colors
3) Select "Simple visualization"
4) Select "Advanced visualization..."
(Just close the dialog, clicking OK or Cancel)
5) Select "Simple visualization"
6) Select "Advanced visualization..."
(BOOM!!!)
|
|
|
|
|
Try and be helpfull, post the stacktrace that was included in the exception
Bastard Programmer from Hell
|
|
|
|
|
Good point
Here is the complete error description:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.ArgumentException: Parameter is not valid.
at System.Drawing.Image.get_Width()
at System.Drawing.Image.get_Size()
at System.Windows.Forms.PictureBox.ImageRectangleFromSizeMode(PictureBoxSizeMode mode)
at System.Windows.Forms.PictureBox.OnPaint(PaintEventArgs pe)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.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: 4.0.0.0
Win32 Version: 4.0.30319.237 (RTMGDR.030319-2300)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
CamoPicker
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/Michael%20B.%20Jensen/Downloads/camopicker/CamoPicker/CamoPicker.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.235 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 built by: RTMRel
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.236 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Xml.Linq
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 built by: RTMRel
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml.Linq/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.Linq.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.233 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.233 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.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">
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.
|
|
|
|
|
Yeah, I got it already, and I'm working it.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
Well, I was trying to be clever with the advanced vis box, and it's come back to bite me on the ass. I wanted to be able to retain the last configured layer set when the user clicked OK in the form, so I figured I'd just hide the form when they clicked ok or cancel, and then re-show it when the clicked the adv vis button in the main form. Essentially, I was treating the form as if it was modeless, and doing that allowed me to not worry about the layer set between invocations. Well, fixing the problem you reported caused me to repeatedly bring up the form and eventually, it stops showing (even though the code is being hit). I therefore have to refactor the mechanism...
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
I fixed it, and will be uploading a new version after I get home from work this evening.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
New version available:
Download link is at the bottom of the page[^]
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
Pretty awesome!
John Simmons / outlaw programmer wrote: I'm curious to see how everyone does without any supporting documentation (which I'm currently working on), and to see if anything weird happens.
I could figure it out almost instantly (may not mean anything, who are the intended users?)
You could change "select image" to "select background", but isn't a big issue.
A few minor points
* Make jpg the default extension (have to change it every time)
* How do you save? Is that unimplemented, or am I blind?
* A list would be nice, for the images (show everything in the backgrounds folder, maybe?)
* Allow resizing the advanced visualization form.
The crash in the message above happens for me too. Also, changing to the saved objects tab after closing advanced visualization also crashes it (I'll send the exception details if needed)
|
|
|
|
|
intended users - the only thing I know about them is that they own guns and computers.
Saving objects is planned, but not currently available to the users.
Resizing in the advanced visualization form - to what purpose? The only thing they're doing there is building the weapon image. Resizing doesn't apply.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
modified 3-Oct-11 8:50am.
|
|
|
|
|
John Simmons / outlaw programmer wrote: Resizing in the advanced visualization form - to what purpose? The only thing they're doing there is building the weapon image. Resizing doesn't apply.
Some weapon images were clipped, I thought it would be nice to see the entire thing.
(or scale the weapon, that would make more sense I suppose)
|
|
|
|
|
Yeah, that's probably the pistol, right?
I'll think on that a bit... Fixed.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
modified 3-Oct-11 10:18am.
|
|
|
|
|
Another possible bug
* Pick a background
* Select only some of the colors in it
* Open advanced visualization form
Result - all colors are used in the camo pattern
|
|
|
|
|
The selected colors on the main form are only for the simple visualization. The advanced visualization attempts to fill all the available layers for the selected pattern. That's why the simple render differs from the initial render in the advanced form.
It looks like I may have to re-organize the main form a bit.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
BTW, I added a label on the Saved Objects tab that says it will be implemented in a future release.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
New version available:
Download link is at the bottom of the page[^]
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
Good stuff John. I will download it tonight and go over it with a fine toothed comb.
Thanks for sharing this project of yours with us.
Just along for the ride.
"the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011) "No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011)
|
|
|
|
|
I'll be uploading an update between 4 and 5pm this evening. I fixed the crash issue reported above.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|