|
If you look at the Logging Enterprise Library from Microsoft, one of the TraceListeners it supports is a "RollingFlatFileTraceListener" - this has a setting to make it roll over to a new file at midnight (as well as other options like at xxxKb filesize)
|
|
|
|
|
Thanks for that... I didnt even know the Enterprise Library existed.
I have been taking a look at on off moments the past couple days, learning curve is a bit high for me to make use of it for what I'm presently working on; however, it is something I can make good use of in the near future (much more than just the file listener at that!).
---------------------------------------------
Help... I'm embedded and I can't get out!
If they don't get the basic research and learning skills down then they'll end up having a very hard life (Either that or they'll become managers) - Micheal P Butler
|
|
|
|
|
Hey.
I am having a program where I am navigating a site, but the program continiues before the site is done loading, which means I get errors in the program.
I have tried:
wb.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(
delegate
{
//MyCode
}
);
But the program still contiunues, and then returns back to that function it is done loading, and that still gets me error.
I also tried
private void Navigate2(String address)
{
if (String.IsNullOrEmpty(address)) return;
if (address.Equals("about:blank")) return;
if (!address.StartsWith("http://") &&
!address.StartsWith("https://"))
{
address = "http://" + address;
}
try
{
webBrowser1.Navigate(new Uri(address));
}
catch (System.UriFormatException)
{
return;
}
}
But that aint waiting neither for the site to finish loading.
Can anyone help me please 
|
|
|
|
|
you may use ProgressChanged event, and check for e.CurrentProgress and e.MaximumProgress
Calin
|
|
|
|
|
Thx very much.. I used these functions you mentioned and then a global variable..
private void Navigate2(String address)
{
if (String.IsNullOrEmpty(address)) return;
if (address.Equals("about:blank")) return;
if (!address.StartsWith("http://") &&
!address.StartsWith("https://"))
{
address = "http://" + address;
_loaded = false;
webBrowser1.Navigate(address);
webBrowser1.ProgressChanged += new WebBrowserProgressChangedEventHandler(webBrowser_ProgressChanged);
while (_loaded == false)
{
Wait(100);
}
return;
}
}
private void webBrowser_ProgressChanged(object sender, WebBrowserProgressChangedEventArgs e)
{
siteLoading.Value = (int)e.CurrentProgress;
if (e.CurrentProgress >= e.MaximumProgress)
{
Wait(200);
_loaded = true; ;
}
}
|
|
|
|
|
|
Hi all,
I m developing an add-in for outlook using C# (VS 2005). The requirement is when i click the addin button it should forward all the newly arrived mails to all other systems through LAN. It should not use internet connection, the reason is our internet connection is not able to serve all the PCs. So mails will be sent to one id, and the add-in should forward it to other systems...
Is it possible to send a mail from outlook of one system to outlook of another system through LAN?
If possible how to do that?
Thanks in Advance,
Mahesh S
|
|
|
|
|
If my undetstanding is correct. You just want to switch between your Internal mailbox (Which will be configured in your internal exchange server) and external mailbox (which uses internet to access your external mail server). So as said If you have a mail server configured inside your LAN.. in any of your servers then you can just switch between these two mailboxes to achieve your requirement
|
|
|
|
|
HI,
Is it possilble to access remote desktop without changing any settings of the client system?
how can both the users share a desktop at same time?
Thankyou,
YP
|
|
|
|
|
You're asking this here because....
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
i need to use in my application
|
|
|
|
|
Can we share a desktop which is not having an administrator privilige?
Regards
YP
|
|
|
|
|
You cannot share the same User ID to use simultaneously.. And please use the relevant forums to ask your Questions.. This helps you to get quick reply..
|
|
|
|
|
Hi,
I'm trying to write a binary tree in C#. Looked all over internet for some tutorials. Found one here, the theory made sense, I downloaded the code it did not work. I just copied the code into my own file it said it did not have a Main() method.
I'm stuck. Please help me write a simple binary tree that you can insert values to by using a command prompt window Console.ReadLine() thing in code.
I'm new to C# so please keep it as stupid and as simple as possible.
Thank you.
|
|
|
|
|
Just try here itself:
http://www.codeproject.com/KB/vb/SimpleBTree.aspx
|
|
|
|
|
|
how do i enter a record to database(table) by datagrid/.
|
|
|
|
|
|
I am using following string..
Searching text er's community and total budget is $16/page.
The regular expression I am using is "[^$]*"
but it only get "Searching text er's community and total budget is " not getting the whole string.
it means it stop at $ sign what changes I should made to get the whole string.
Thanks in advance 
|
|
|
|
|
You told it to take everything up to the first $ and stop there, what did you expect?
You want a RegEx to take the whole string you already have? Why?
|
|
|
|
|
Actually this is a part of a big string in which I am searching for something but it stop at $ sign if you resolve this issue then it will helpful for me.
Thanks
|
|
|
|
|
Then more information is required. What is the string, and what part do you want? Are there many strings?
|
|
|
|
|
|
This is re posted question
Hi all,
I am trying to retrieve the Disk partitions using the following code lines
foreach (ManagementObject mgmObj in gmtObjo.GetRelated("Win32_DiskPartition"))
{
//get the logical partitions and add to collection
}
This code snippet works well for user having administrative privileges on the machine.However,user having less privileges it does not retrieve any record.
I have searched through net and got the solution where we have to give the permission to the WMI itself using WMITool.However,this solution seems like not feasible as I can not give the permission to client machine.
I am looking for solution using which I would able to fetch the records irrespective of what user privileges are.Either through script or setting the privileges through code(setting through code might again require admin rights...).
Anybody here had faced this problem before or have solution to this??
Help will be appreciated!!!
Thanks in advance
|
|
|
|
|
Hi,
I am working on a blocking client/server architecture.I have a client which sends XML files to the server. It sends many XML files continuously (5 to 10 files per second) to the server using blocking communication method through TCP/IP. What I have to do is to read the XML file and store it in a queue and if the XML file is valid or invalid, give the response back to the client that the file is valid or invalid from the same communication path from where it come. Can anyone help me in this regard that how to acheive that. I am comfortable with queue, just want to know how to send the response back to the client using the same communication path from where the XML file comes.
Thanks in advance.
|
|
|
|