|
If you look at my question at the top of the page, it is about my private little monster. It spreads over two clients and four webservices and now even has its own XNA UI
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.
|
|
|
|
|
CDP1802 wrote: monster
Indeed
When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman
|
|
|
|
|
It's my version of a model train
The goal is to see how far I can go when building it and where my limits are. The fun stuff which my bosses would never allow me to do.
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.
|
|
|
|
|
I am lucky enough to work for myself - so I don't have any bosses. Most of my clients couldn't care less about the actual structure of their apps, or what goes into them, they just want to print Invoices and look at pretty graphs of how much money they are making. That gives me the freedom to use the technologies that I like, and I love WPF - it's the dog's danglies as Nagy would say.
When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman
|
|
|
|
|
WPF is great. But, as you may have guessed, my little project is a game. Webpages are very limited and can make the whole thing just exciting as Excel. Going over to a client and Windows Forms helped a little. We could integrate an XNA window into a control and at least have something moving on the screen. If only the UI was not so ugly...
WPF offered a UI with great options for designing, but getting along with XNA (or DirectX) was not easy. This slowly seems to be changing with Silverlight and the Windows Phone 7, but then still it would be two different applications which run at the same time and somehow have to communicate.
So, if the prophet does not come to the mountain, I added my own UI to the graphics engine and now am porting the game client to use it. At the moment it is in a very interesting state. It already is far enough to be used seriously, but every step of the way is delayed by graphics bugs, oversights and things I had put off until 'later'.
My bosses would die instantly when trying to calculate what this evolution has cost, but it's my time and it's hard to put a price tag on the things I have learned
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.
|
|
|
|
|
Sounds like you are really enjoying what you do. Is it a commercial game, or will you release it to the public? My life sounds really boring in comparison. My apps are only complicated by deadlines, otherwise they are just bog standard data applications
When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman
|
|
|
|
|
At work it is just as boring for me. If the stuff which bosses or customers want was so much fun, they would probably charge us a fee instead of paying us
This[^] is an older screenshot of my test program for the graphics engine and the UI. In the picture you can see me blowing up one of my first (and worst) 3D models. I guess, I'm not really talented as an artist. Luckily I found one just last week who is interested in helping.
So no, it's not commercial. I work on it in my spare time, but I do intend to install it on a server and offer the client for download. Then we shall see what happens.
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.
|
|
|
|
|
CDP1802 wrote: At work it is just as boring for me
Sorry to hear that. I like the controls that you have made for your UI, really cool. You're character names are nice, especially their friends(James Bond - Walther PPK, Vodka - Q - None) You should keep us posted on what is happening with the project.
When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman
|
|
|
|
|
What you are talking about is hashing and not encryption. Putting it in the UI layer as Wayne suggested will ensure that the real password does not pass through all parts of the application.
|
|
|
|
|
I don't know if this is frowned upon, but the way I set my last server up was:
On the Sql Server instance, I setup a main database, and an ID database. The passwords are entered into the ID database, hashed. Outside of local access, the only access to the ID database was through stored procedures. I used a generic user and password to access the ID database, so a program could send the ID and password entered by the operator, and the stored procedure would do the hash & compare. If there's a match, then a user ID and password to the main database was returned. Again, this ID only has access to stored procedures, and is changed periodically.
I'm sure there's a better way to do it, but this meets our needs.
|
|
|
|
|
Bert Mitton wrote: so a program could send the ID and password
That however is a problem. It presumes that the "send" is secure enough. While hashing in the client precludes the need to care.
|
|
|
|
|
|
Hi There,
I have to develop a program (winform) that extracts data from the queries on a DB MSSQL2008 and data are written to a text file in the default locations.
The customer asks me to build something dynamic in the sense that if he must add an information to the file or change the value of a field should do so only by adding or modifying the appropriate query.
The initial idea is to save in a table the queries needed to extract the value of any information and execute one, then place it in a database the result of support where the tables have the same layout of records in the file to be produced.
According to you, wanting to use an approach object-Orientes rather than structural way, how should I organize the source?
If you can think of even a better solution to get the result and what is well pleasing.
Thanks
|
|
|
|
|
Rephrasing....
What you want to do is the following
1. Query a database
2. Write the results to a file.
Based on that a simple solution is based on the following - the query is a single sql select.
If so then you do the following.
1. The sql statement (select) is read from a configuration source.
2. The database layer sequences through the result set columns using a 'get string' api. It also checks for nulls appropriately.
3. An appropriate text output form is defined. It should be capable of dealing with nulls and things like embedded quotes. I would suggest:
a. Use tab for a delimiter
b. For each string value strip out all tabs, and end of line characters and replace with spaces.
4. You put 1, 2, 3 together to write to the file.
Additional items - I suggest that you allow for a configurable file location and file name.
Trying to generalize to more complex examples is probably pointless. Too much generalization ends up recreating things that already exist such a programming languages and report generators.
|
|
|
|
|
Not sure you are still looking for an answer.
You can do something like a Key and value(payload),ie sql will be for just fetching the value for the given key.
Here the value will be a payload(a XML string). You will have template for the xml format. whenever you want to add something you just add it the template. while writing to file you
first fetch the payload, then parse the XML, put the parsed values to a file, in what format you want.
|
|
|
|
|
Okay, I've kinda merged everyone's suggestions into the following.
My goal is to have everything visible regarding the configuration of the layers. So, I've redesigned the left side as follows (it's really too bad I can't FTP to my web site from work).
+- Layers -------------------+
| |
| +------------------------+ |
| | V B 1 (Woodland Tan) | |
| | V B 2 (No Color) | |
| | ... | |
| +------------------------+ |
| [Flip] [Mirror] [Restore] |
| Blur [000]^ [x] Visible |
| |
| Environment Colors |
| +------------------------+ |
| | list of colors that | |
| | match picture | |
| +------------------------+ |
| Other Palette Colors |
| +------------------------+ |
| | Colors not matched | |
| | from selected paint | |
| | color palette | |
| +------------------------+ |
| |
+----------------------------+
Initially, only the first listbox will be enabled.
The first list box contains a list of layers and each layer is preceded by a pair of icons indicating whether the layer is visible (the "V"), and whether it's blurred (the "B"). The selected color (if any) is indicated in parenthesis after the layer name. When a layer is selected in the list, the controls underneath will be enabled.
Under the list box is a row of buttons that allows the user to flip/mirror/reset the selected layer.
Next are the controls that allow the user to control blur and visibility.
Finally, the user can select the color from either of the two color listboxes.
Notes:
I'm anticipating that many of the guys that will be using the app won't be familiar (or at least not *as* familiar) with the various paint programs' handling of layers as all of us are. For that reason, I figure trying to emulate that kind of interface would take too long for the anticipated return regarding ease of use. Making things roll up/down and disappearing unexpectedly kinda bothers me, and IMHO disrupts usage flow to some degree.
Opinions, suggestions, ideas are now being fielded.
".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
|
|
|
|
|
That looks sensible. Everything is visible but contextualised via selection. I guess you'll always have reasonable real-estate down the left so using show/hide or pop-outs isn't needed.
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
John Simmons / outlaw programmer wrote: I'm anticipating that many of the guys that will be using the app won't be familiar (or at least not *as* familiar) with the various paint programs' handling of layers as all of us are.
Good point. I honestly didn't think of this initially. I do like your redesign layout though.
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 forget what technology you are using but if its something like WPF you could have the colour selection on a rollout from the main listbox item. might be too fiddly though, would have to play with it to tell
as it is, how are you enforcing the behaviour of selecting 1 colour from 2 lists? and would a colour pallette of some sort not be more approprriate?
Pedis ex oris
Quidquid latine dictum sit, altum sonatur
|
|
|
|
|
GParkings wrote: I forget what technology you are using
It's WinForms.
GParkings wrote: as it is, how are you enforcing the behaviour of selecting 1 colour from 2
lists? and would a colour palette of some sort not be more appropriate?
I pass the entire list of available colors to the form. Each color item has a flag that indicates whether it was an environmental match. All environmentally matched colors go in the first color listbox, and the rest go in the bottom one. When one is selected from either listbox, the other listbox's selected item is cleared.
I want the user to be more apt to select from the environmental matches (that's the whole point of the app, afterall), so it's placed above the remaining colors listbox.
I've got it pretty much wired up at this point, and it's a lot cleaner than what I tried to do before.
".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've been trying to come up with a form that performs the following function:
The user selects a pattern which consists of one to six image layer files. Each files consists of a single-color area on a transparent background, and are overlaid on top of each other (in a specific order). What the user will be able to do:
0) Select a replacement color for the non-transparent portion on an image-by-image basis.
1) Blur an image (with a numeric value indicating the amount of blur to apply)
2) Select a layer to be used or not
3) Flip the image vertically
4) Mirror the image horizontally
5) The composited image is updated as the user changes settings.
Right now, I have this form[^].
The idea is that the user assigns a color by right-clicking each of the layer panels on the left side. the checkbox next to each of the layer panels is used to indicate which layer is affected by the three buttons (Flip, Mirror, and Restore).
When the user right-clicks on a layer panel, a borderless form that holds a listbox of available colors is displayed at the mouse position, and when selected, the color is displayed on the layer panel in the label that currently reads "No Color", and the name of the selected color will also be displayed in that label.
I toyed with using a listview instead of the layer panels, but the association between the listbox and a color selector was even more klunky than what I have now.
Opinions, options, suggestions are now being entertained.
".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
|
|
|
|
|
What you are effectively doing here is mirror the way that a graphics program such as Fireworks or Photoshop behaves. If you take a look at those applications, and have a play around with the way that Layers works, you'll get the general idea. Basically, you'd separate the layer out from the action, so you might end up with the following idea(mocked out in line art):
+-------------------------+
| Title |
| Layer 6 |
| Layer 5 |
| Layer 4 |
| Layer 3 |
| Layer 2 |
| Layer 1 |
+-------------------------+
| Add layer Remove layer |
+-------------------------+ I would make this a floating panel. Then, when the user selects a layer from this list, and a separate panel just details the options once; these options being tied to the selected layer.
|
|
|
|
|
I thought about that, but I don't have to allow removal/adding of a layer. The number of layers possible is 1 to 6, and the number of layer panels will refelct the available layers (if there are only 5 layer images, only 5 layer panels will be displayed.
".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
|
|
|
|
|
http://www.codeproject.com/Messages/4037183/Design-Quandary-v2.aspx[^]
".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
|
|
|
|
|
Sorry, just got back from lunch. Anyway, what you have got there seems a reasonable compromise.
|
|
|
|
|