|
But, what if the user re-installs the application again after the trial period expires? Will it not reinstall the config file with a fresh trial period?
Secondly, can't the user directly edit the date in the cofig file? Even if you encrypt it, the encryption key will have to be strored somewhere in the config file or the program itself, so that the user can still decrypt the date and edit it, may be after some efforts.
So, will this solution work?
|
|
|
|
|
That depends on your thoughts, you can create a registry entry to act like a flag to you ,or you can try anything else.
|
|
|
|
|
You can make it by taking the date within the first runtime to the application and store it in the config file in the same directory only .
|
|
|
|
|
hi omar, could u please help me by some code plz
Thanks alot
Hamody
|
|
|
|
|
|
Hi, Sir and Madam!
Regular Expression for repeat string Please.
Thank You.
|
|
|
|
|
What do you mean? Can you give us an example?
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I have a String
I wish to check that are there repeat substring in the String and what substring repeat.
Sorry fro bad English
Thank You.
|
|
|
|
|
hi,
These contents i want to insert after farm elements where farm is equal to dev2
<database state="0" name="one" sourceType="amacs">
<database>
I want Xml(database) to be inserted after farm where farm is equal to "dev2"
I am giving you the structure of XML file
<?xml version="1.0" encoding="UTF-8"?>
<root>
<farm-config>
<farm name="dev1">
<connection address="localhost" user="root" selectedConnection="1" password="ram">
<lastJob>Copy-All</lastJob>
<lastConnection startdate="2005-05-10" starttime="12:43:23" enddate="2005-05-10" endtime="12:58:32" />
<state>1</state>
</connection>
<database state="0" name="bd_plc1_house1_14022005" sourceType="amacs">
<tables state="0" name="feed_delivery">
</table>
</database>
</farm>
<farm name="dev2">
<connection address="localhost" user="root" selectedConnection="1" password="ram">
<lastJob>Copy-All</lastJob>
<lastConnection startdate="2005-05-10" starttime="12:43:23" enddate="2005-05-10" endtime="12:58:32" />
<state>1</state>
</connection>
</farm>
</farm-config>
</root>
i have the code pls anybody can modify it
This code givens syntax error
xmldoc.DocumentElement["farm name='dev2'"].PrependChild(databaseElement);
regards
sanjeev
|
|
|
|
|
Hi
I want to add string to an array and retrieve that string from Array
Pls send me code for that regards
sanjeev
|
|
|
|
|
ArrayList myStrings = new ArrayList();
Add item to array:
myStrings.Add("string1");
myStrings.Add("string2");
myStrings.Add("string3");
Get item at index "index":
string getString=(string)myStrings[index];
modified 12-Sep-18 21:01pm.
|
|
|
|
|
If you mean add ONE string as array,you can add it by several methods as Split(),and Substring(),or ToCharArray().
|
|
|
|
|
Hi,
I want to create a textbox which shows text in black when disabled.
Unfortunately the selecting, deleting and editing the text don't work and it's in a different font.
Does anyone know what code I need to add to make the textbox work like a textbox except for the enabled = false part?
Thanks,
Serdar YILMAZ
Senior Developer
|
|
|
|
|
Have you inhereted your class from TextBox() ?
|
|
|
|
|
If someone know yahoo messanger or msn know i can press a button in the chat window and other play a sound to make quaver the chat window.
How can i do it using c#?
Tnx
|
|
|
|
|
Explore the directx sdk on microsoft .
|
|
|
|
|
sameone can give me a more detailed answer, tnx.
|
|
|
|
|
i've used the Bob Bradley's textbox but i don't like it, becouse it has some bugs, can you show me another free to use or some tutorial by others to create one?
tnx
|
|
|
|
|
Now as I have told earlier, I am just 30 days old baby as far as C# is considered. But amibition knows flying since its birth.
I am interested in harnessing the power of C# for scientific calculation. I want to create a console like structure as cmd.exe in XP, which does mathematical calulation. Like if i write
>> 3+2 [Enter]
5
The output should be 5. How ambitious am I and where do I go before I see no falling of my ambition? What are the issues assocoated with it?
Regards,
Amit
|
|
|
|
|
This is pretty easy to do, you're talking about a console application, with a parser in it
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
|
Well, you know how to write a console application, generally, right ? Then you need to accept input, presumably a string at a time, and then parse it to work out what is being requested, I guess first by looking for numbers and operators, then working out the order of operations.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Can anyone help me with this problem, i am going blind looking at the code trying to figoure out whats wrong with it.
This is what I am trying to do ..
I have a small Form with a button, when the user clicks the button on the form, my program connects to a server and receive som information.
The server responds and sends back a couple of lines with text to my program, then my program prints out the info to the console. Simple enough rite ?
It actually works, or so it does the first time i click the button, but the second time i click the button my program decide only to print out the first line of what the server sent back to it.
First click on button: The program works 100% and prints out all the lines sendt from the server
Second click on the button: The program only prints out the first line of what the server sent back.
This is what i have in the button clickevent
NetworkStream myNetworkStream;
TcpClient tcpC = new TcpClient();
tcpC.Connect("home.bergetun.net",14000);
myNetworkStream = tcpC.GetStream();
string myCompleteMessage = "";
if(myNetworkStream.CanRead)
{
byte[] myReadBuffer = new byte[1024];
int numberOfBytesRead = 0;
do
{
numberOfBytesRead = myNetworkStream.Read(myReadBuffer, 0, myReadBuffer.Length);
myCompleteMessage =
String.Concat(myCompleteMessage, Encoding.ASCII.GetString(myReadBuffer, 0, numberOfBytesRead));
}
while(myNetworkStream.DataAvailable);
Console.Out.WriteLine(myCompleteMessage);
}
myNetworkStream.Close();
tcpC.Close();
|
|
|
|
|
I'm surprised it even works it all.
The problem is, while "DataAvailable" is up to the vagueries of the server and the connection. If the server hasn't sent any data when you get to this point in the code, then there won't be any data available.
Even worse, if you try this over a real internet connection, packet delays, TCP/IP error recovery, etc., will delay your data in a completely random manner, so you can never rely on DataAvailable.
Pretty much, you need to put this code in a thread and the server should send some indication of how many lines the client should be expecting.
Hope that helps.
Marc
My website
|
|
|
|
|
Hmmm.. The problem is that the server doesnt give me a indication on how many lines to expect.
|
|
|
|