|
Mycroft Holmes wrote: You are developing in an OO, event driven environment, there is no "go back to start", I've not heard that since the 80s
I remember when I was first learning event-driven programming and this confused the hell out of me!
Kevin
|
|
|
|
|
Yeah but I would have thought anyone learning today would automatically be OO oriented rather than procedural.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Yeah, that's true. I was learning both OO and event-driven programming together circa 1994. Sure was confusing at the time.
Kevin
|
|
|
|
|
Hi,
What I need is to draw a line with a "star" shape for instance.
I mean, use a custom shape (any polygon/ellipse) in order to draw a line with it.
I don't see any way for doing that in C# (WPF).
Take a look at the picture to see what I mean.
http://img242.imageshack.us/my.php?image=sampleiw3.png[^]
Thanks everyone!
|
|
|
|
|
Answered in your original post.
"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 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Is there a site to learn how to build property pages that look like the one's in Visual Studio??
tia
Rafone
Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...
|
|
|
|
|
The first 2 on this search look promising clickety[^]
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thanks for the tip.....propertybag aaa
rafone
Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...
|
|
|
|
|
Hay
I don't know if it's possible or not ...
can I get any file that the user copy it on the hard disk ..
thanks
jooooo
|
|
|
|
|
Theoretically yes, put a watch on every directory. There may be an OS call to copy a file you may be able to monitor. No that does not make sense, too many apps can access the file system!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
thanks my friend for your attention
jooooo
|
|
|
|
|
Hey kindman_nb,
check the FileSystemWatcher class. You can set this to start watching at the root of your file system to get each and every file. However, it does not tell you explicitly which files were copied, only which files were created, updated, renamed or deleted. So in order to check for copied files you would have to keep a reference of files created and files removed. If you have the same file removed and created elsewhere in a short period of time, it's probably going to have been copied. Of course this only works if the file is being copied with the same name.
Let me know if this applies to your case. If not try to provide some more details.
Cheers,
Marcelo
|
|
|
|
|
thanks Marcelo .. it's ok now
jooooo
|
|
|
|
|
im trying to write a battleship program. Bt cannot figure how to get the two grids to show in an array. any help on this would be greatly appreciated.
|
|
|
|
|
To get the grids, you simply need to have two for loops that loop through the specific amount of pixels to form a grid. My Tetris program may be help with getting the general appearance for your grid: http://www.codeproject.com/KB/vb/FallingBlocks2008.aspx[^].
For my battleship program that I created awhile ago:
>The grid was a user control that was self painted with events for placing the ships
>The logical layer was separate from the graphical layer so I did not have to worry about exact pixel specifications
>The logical ships were stored in a collection. The ship object contained generic coordinates along with the size of the ship and image location of the ship
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
i have this code so far
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication21
{
class battleships
{
const int SEA_WIDTH = 10;
const int SEA_HEIGHT = 10;
static int[,] sea = new int[SEA_WIDTH, SEA_HEIGHT];
}
static void clearSea()
{
// Clears the sea to empty
}
static void placeShips()
{
placeShips battleship
// Places ships as follows:
// Battleship: (0,2) and (1,6)
// Cruiser: (0,4), (1,0) and (9,9)
// Submarine: (5,5)
// Rowing boat:(7,8)
}
static void displaySea()
{
// Displays the sea on the users screen
}
{
static void Main(string[] args)
{
}
}
}
how can i make this work
|
|
|
|
|
It appears like you are in the very early steps of the battleship program creation process. So, I would suggest that you map out the program with what classes will be needed, what properties/methods need to be exposed in those classes, create a basic layout for the appearance of the form, etc.
Once you have a blueprint of the entire program that I can help you formulate the blueprint into code. I believe I posted my battleship program (not code) on my website awhile ago: http://homepages.umflint.edu/~thstockw/[^]
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
I'm importing data from a csv file and I need all the fields to be read in as text fields.
I have a zip code field that when I need to put in ZipCode+4(12345-6789) it throws an err because the field is interpreted as a int32 or some such.
I don't see any options anywhere to force the driver to make all the field text either. I thought this is possible, I'm pretty sure it would work with the Jet drivers if they were installed.
If they are installed, they are not showing up in the ODBC Data Source Administrator.
Connection.ConnectionString =
string.Format(@"Dsn=CSV;dbq={0};defaultdir={0};driverid=27;fil=text;maxbuffersize=2048;pagetimeout=5", new FileInfo(openFileDialogGetCRDCSV.FileName).DirectoryName);
|
|
|
|
|
|
That would almost work except the header names are subject to change. The file also comes in with column names with "." and it converts them to "#". I think I'm going to have to switch to a CSV parser of some kind.
|
|
|
|
|
Sunset Towers wrote: header names are subject to change
That doesn't matter. You don't have to name the columns (set ColNameHeader to true) and if you do, it's the name you decide, not the name in the file.
Sunset Towers wrote: The file also comes in with column names with "." and it converts them to "#".
Din't quite understand this.
|
|
|
|
|
The column names are something like column.name which csv is coverting to column#name. Not a big deal.
I can set the column names as they move around also. It's weird and a pain but I'll have to find a different solution.
|
|
|
|
|
|
You may want to take a look at this CSV parser[^] and then use Bulkcopy to load the data into a table. I always use a staging table and a stored proc to do my ETL.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Yeah that is a the route I had to take in the was just to get a csv parser.
|
|
|
|