|
Depends on the app. The simplest thing I've found is to write an app that runs the installation scripts against the DB. You can also ship a DB backup and expect the user to restore it. I'm sure there are other ways, but the question is, how technical are your end users ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
First of all, is there any Sql server installed? Or which dbms are you using?
|
|
|
|
|
hi ,
thanks for ur reply . here in client system he dont have any database
i have to do all the things .
i dont know whether to install full version of sql server 2005 or sql server express 2005 . is sqlexpress2005 is sufficient ???
can u tell which is better one to do ..
thanks .
CSN
|
|
|
|
|
That depends on the client needs. You should check the differences between the express edition and the full version.
Also keep in mind that while the express edition is free, the full version is not. I never agree to install any pirated software to any client, it's not fair and you too could be held liable.
|
|
|
|
|
Im implementing a currency converter into an application of mine. The data i need to read from is stored in the file CurrRates.txt and is comma delimited. I am trying to set it up so that I open the file, read each line and send that line to an array, then read the next line etc, then closes the file.
As I am trying to learn all this ive spent ages looking for what is necessary, and so far all I have determined is that it usese FileStream. Ive spent along time trying to implement it but my knowledge is limited as, like i said, im still learning.
Any help would be appreciated.
|
|
|
|
|
File.ReadAllLines will do what you want.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Heres what I have so far:
private void importRates()
{
string[] line;
System.IO.FileStream fStream = new FileStream("C:\\UserData\\Rossulator\\CurrRates.txt", FileMode.Open);
while (fStream != null)
{
// add line to array
}
}
I tried File.ReadAllLines and I either didn't understand or didn't put it in the right place...probably both.
|
|
|
|
|
Okay let me rephrase my question cos im not making sense.
I originaly had:
private void importRates()
{
rates[0, 0] = 0.010289;
rates[0, 1] = 97.1907;
rates[1, 0] = 1.07181;
rates[1, 1] = 0.933001;
rates[2, 0] = 1.67566;
// etc to rates[19, 1] = 0.026708;
}
and everything was working fine. I did this so i could learn how to do it, but also to make sure i had the rest of my code working, which i do. The next step is to take all that rates[19, 1] = 0.026708; stuff, and put it into an external file. I want to read in that file, take each line into an array, and use that instead of having a massive list of information which is very difficult to update regularly.
I hope this clears things up a bit.
|
|
|
|
|
System.IO.File.ReadAllLines(filename)
will read an entire file line by line into a string array.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks for your help, finally got it, even though i ended up using ReadLine();. The only reason i looked around for something else was because intelli-sense wasn't showing it as an option :/. Anyway, thought id post my final code, just cos.
private void importRates(){
string path = Settings.Default.FileName;
if (!File.Exists(path))
{
MessageBox.Show("no file found at " + path);
return;
}
int lineCount = 0;
StreamReader sr = new StreamReader(path);
{
String line;
while ((line = sr.ReadLine()) != null)
{
string[] ToFrom = line.Split(',') ;
rates[lineCount, 0] = double.Parse(ToFrom[0]);
rates[lineCount, 1] = double.Parse(ToFrom[1]);
lineCount++;
}
sr.Close();
}
}
|
|
|
|
|
File.ReadAlllLines is the better option IF you are doing this on the standard framework and not the compact framework, because the compact framework doesn't contain this method.
If you are on the compact framework the above code isn't a good implementation of the StreamReader object, you should use a tryf statement or the simplier method of a using statement to the StreamReader object to finalize after execution.
Below is better (with the using statement) though you might want to check for End of File and other sorts also (which have not been added by me)
private void importRates()
{
string path = Settings.Default.FileName;
if (!File.Exists(path))
{
MessageBox.Show("no file found at " + path);
return;
}
int lineCount = 0;
using (StreamReader sr = new StreamReader(path))
{
String line;
while ((line = sr.ReadLine()) != null)
{
string[] ToFrom = line.Split(',');
rates[lineCount, 0] = double.Parse(ToFrom[0]);
rates[lineCount, 1] = double.Parse(ToFrom[1]);
lineCount++;
}
sr.Close();
}
}
|
|
|
|
|
I am looking for some good quality skins for a Windows Forms project.
The software is going to be a Winforms app that will be used in conjunction with iTunes/iPhone so I would like the GUI to look more polished than a plain vanilla out-of-the box Winforms app.
What in your opinion are the best free skins currently available?
|
|
|
|
|
Your basic problem is that winforms do not support skinning without some library to do it for you.
Does the iPhone even run .NET ? I'd be astounded if it did.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I've seen some demos of running Mono on the iPhone
|
|
|
|
|
originSH wrote: I've seen some demos of running Mono on the iPhone
DevExpress has very good skins. It allows you to create office 2007 style GUI and many more skins. But I think it won't work with MONO as they will be using many P-Invoke calls to change the default look & feel.
|
|
|
|
|
No - This app is not designed to run on the iPhone. The app is designed to run on a PC but it will sync some data with iTunes/iPhone.
I just don't want the app to look like it was written in 2001.
|
|
|
|
|
Member 3919049 wrote: I just don't want the app to look like it was written in 2001.
*cough* W *cough* P *cough* F.
|
|
|
|
|
That's funny. I will probably write the next version of the app in WPF but for now the app is written in Winforms and I would like to get it out to production as soon as possible.
Do you know of a skin that I can use to give it a look to the effect of a scaled down Windows Media Player?
|
|
|
|
|
|
I am currently developing software that I am planning on selling.
I have created a Setup Project in .NET to install the software to a user's computer.
However, I need to implement logic that provides a 30-day free trial. The software should expire after 30 days unless the user purchases a key.
Can someone here give me some guidance on how I can implement this?
|
|
|
|
|
The easiest way is to check the date your file was created, and check if it was 30 days ago. Another way is to write something somewhere that stores the date first run, and check if it was 30 days ago.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I'm not sure if checking the date the file was created will work.
If the validation was based on the file create date then couldn't the user simply uninstall the existing app and then reinstall it?
When you say "write something somewhere that stores the date first run, and check if it was 30 days ago" are you suggesting that I write to the registry or some other file on the user's computer?
|
|
|
|
|
Member 3919049 wrote: If the validation was based on the file create date then couldn't the user simply uninstall the existing app and then reinstall it?
In fact, the file system will use the original date, if the file is in the same location.
Member 3919049 wrote: When you say "write something somewhere that stores the date first run, and check if it was 30 days ago" are you suggesting that I write to the registry or some other file on the user's computer?
Of course, how else could you do a 30 day trial ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Christian,
What would stop File.SetCreationTime() from changing the date?
|
|
|
|
|
For example without thinking to much:
1. take the expiration date
2. encrypt it with some symmetric encryption
3. store it somewhere for reference (settings file, registry, whatever)
4. on program start get the current date and compare with the encrypted expiration date.
This isn't a bullet-proof solution, since you're using symmetric encryption, and also the .net assembly can be quite easy
analyzed with reflector. But it's a start
|
|
|
|