|
thanks, minor oversight
Thanks,
Chad Aiena
|
|
|
|
|
Hi,
i have a xml file that i get from a website,
and i need to save the xml to the disk, but i need to add a namespace to the xml.
Im using XmlTextReader To read from a stream,
and after that im using xmlDocument.Load.
i want to set a namespace to the xml that i got,
and dont know how.
thanx,
shay
|
|
|
|
|
I am currently using FileSystemWatcher to monitor one directory for new files.
Can i use it to monitor two directories?
How would that be coded? Because when an event occurs(like a new file), the Event handler is the same. Would i have to create another event handler that does the same thing?
|
|
|
|
|
You can have two FileSystemWatchers and one event associated with both of them
|
|
|
|
|
So i take it that Windows will handle event syncronization. Cause if a new file gets dropped in both directories at the same time, would one event handler still be able to handle?
|
|
|
|
|
It would.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi All,
I have to syncronise the system Date through c# code.
The scenerio is like whenever User sign In, I have to check the current system date,and compare with the date i have written in Registery, so that he can not use the appication beyond the trial period date.
The Problem is that the User can Manipulate his system date and can sign in n number of times.
If anyone have the code then Please help me out in my problem.
Thanx
Sandeep
|
|
|
|
|
Sychronize the system date/time with what?
|
|
|
|
|
In addition to the constraint you've applied, add another flag in the registry, which tells you if the product has expired or not. Initially, it should be false, but after the first time the user has used the product for more than X days, make it false. After this, even if the user manipulates the system time, the second condition will fail.
Possibly better way to do it:
I While installing, set lastUsedDate to the current date and usedDaysCount to 0 in the registry.
II Every subsequent execution
1. Compare current date with lastUsed date in registry.
2. If they are different
lastUsedDate = current date;
usedDaysCount++;
3. If usedDaysCount > 10
Display nag screen and exit
Else
Get on with the program.
Cheers,
Vıkram.
Déjà moo - The feeling that you've seen this bull before.
Join the CP group at NationStates. Password: byalmightybob
|
|
|
|
|
Is there a way to tell if an object, like a button, has been moved into a container like a group box or a panel. (this is the running app, not in the IDE)
The method of moving would be using the MouseMove event with the button object and I was looking to see if there was an easier way than to use the x,y of the object to see if something was in the container after dragging it.
"Details details. Things to do Things to get done. Don't bother me with details just tell me when they're done." James Price
|
|
|
|
|
Have you looked at the Parent property of the control? That should give you the container of the control.
|
|
|
|
|
When I look at the .Parent of the current moving control, it is still showing my form as the parent.
I am not implicitly setting a new parent but I would not be able to do that because i wouldnt know what to set it to and run into the same issue.
"Details details. Things to do Things to get done. Don't bother me with details just tell me when they're done." James Price
|
|
|
|
|
You set Parent by adding the control to the Controls collection of the parent. Parent will tell you if your control belongs to a different control's Controls collection.
|
|
|
|
|
But I would still have to know what the control was under neath the control I am dragging. I cannot use whats under my mouse because that would be what i was dragging.
Unless I am just missing the point you are making.
"Details details. Things to do Things to get done. Don't bother me with details just tell me when they're done." James Price
|
|
|
|
|
Of course. So, you are drawing on a surface (which requires a control), and you know what that surface is. If you detect/manage events applied to *that* surface, you are trapping the relevant events. So you have to build your class from Control, or one of its derivatives.
|
|
|
|
|
ahh, i see what you are saying.
Thanks, I will give that a try.
"Details details. Things to do Things to get done. Don't bother me with details just tell me when they're done." James Price
|
|
|
|
|
|
I have been looking for a portal framework in C#... It looks like the Rainbow portal has not been updated in quite a while. (Dotnetnuke looks good, but is vb.net)Is anybody aware of another alternative? It does not have to be an open source, but must have source code available.
Thanks for your help
|
|
|
|
|
|
I have a form where there is a button and i want to launch an another form by the help of that button which is done but when second form opens it doesnt close the first one as i did many tries.
Following is my code snippet
private void LoadGameButton_Click(object sender, EventArgs e)<br />
{<br />
TicTacToe tic=new TicTacToe();<br />
tic.Show();<br />
log = new Login();<br />
log.Close();
<br />
}
Please help
|
|
|
|
|
Hello,
shah123 wrote: log = new Login();
log.Close(); // or i tried hide and different ways here but still login form appear
this creates a new instance of o Form and closes it directly after creaton.
Just add:
this.Hide();
All the best,
Martin
|
|
|
|
|
Thanks a million. It worked.
|
|
|
|
|
You are wellcome!
I'm glad I could help!
|
|
|
|
|
hi the program i am using for remoting has an configuration file which stores the port number and etc..
RemotingConfiguration.Configure(Application.StartupPath + "\\Client.exe.config",false);
the above is the where the program initialized the remoting with the configuration file..
however i am now trying to change the ip of the server
does anyone know how to set the ip portion of the server programically in the client while the other configuration is set in the configuration file?
thx
|
|
|
|
|
Something like this
ChannelServices.RegisterChannel(new TcpClientChannel(), false);<br />
Activator.GetObject(typeof(NetTime.NetTime), "tcp://localhost:8086/Time") as NetTime.NetTime;<br />
led mike
|
|
|
|