|
Uhhh...What?? I don't think there's a single person here who could understand what you just said...
|
|
|
|
|
LMAO, im suddenly worried that i have forgotten how to understand my national language
My opinion is... If someone has already posted an answer, dont post the SAME answer
|
|
|
|
|
Try setting the focus to other controls either in combobox leave event or form click event.
|
|
|
|
|
i have installed enterprise application block first and then i am trying to install updater application block but it always try to locate enterprise library component. so please tell me which component i have to mapped. i saw it is looking for one .sln fine. please guide me in detail to install updater application block.
Thanks
tbhattacharjee
|
|
|
|
|
Hy everyone!
I do need your help. I would like to create a logfile for my application one a day (eg. Logfile_20090210.log for today, Logfile_20090211.log for tomorrow etc.).
the log4net config file looks like this
<configuration>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>
<log4net>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
<param name="File" value="C:\\PrintService.log" />
<param name="AppendToFile" value="true" />
<param name="rollingStyle" value="Date" />
<param name="datePattern" value="yyyyMMdd" />
<layout type="log4net.Layout.PatternLayout">
<!-- <param name="Header" value="[Header]\r\n" />
<param name="Footer" value="[Footer]\r\n" /> -->
<param name="ConversionPattern" value="%d [%t] %-5p %c %m%n" />
</layout>
</appender>
<root>
<!-- <level value="INFO" /> -->
<appender-ref ref="RollingLogFileAppender" />
</root>
</log4net>
</configuration>
I do have two problems:
there is no logfile with the config above. when I change this to "yyyyMMdd-HHmm" for datePattern, then it works, but I do not want the time to be part of the logfilename.
the second problem is the logfile is named PrintServce.log20090210-1346 for example.
So my question:
What does the config have to look like to get PrintServer_20090210.log for example?
I found pages with configs similar like mine ("yyyyMMdd" for datePattern). But none worked!
Thanks for any help!
Stephan.
|
|
|
|
|
hi,
someone has an idea for object the i can write to it strings (with the first thread) and read from this object at th same time(with the second thread)?
it will be very helful if this object will can convert itself to StreamReader.
thank you.
|
|
|
|
|
why would you need to do that?
My opinion is... If someone has already posted an answer, dont post the SAME answer
|
|
|
|
|
now, i can analize a file (file.log) convert it to StreamReader and analize it with my object Parser(StreamReader sr).
(i am using there sr.readline() etc.)
now i want to receive the same information from port.
i want to receive information from port232 (strings) and to save them (somewhere),and to analize them with th same object Parser(StreamReader sr) on a real time(2 threads- one for writing information from port to StreamReader(possible???) and another thread for reading the inforamtion by using Parser).
thank you.
|
|
|
|
|
ok well i think the problem you will have is writing to a file that is open for reading.
So you could either close the file after the write and then read, somehow you will have to decide which process to do, or alteratively you could pass the string value to the parsing thread and write it to the log file, rather than reading from the file.
My opinion is... If someone has already posted an answer, dont post the SAME answer
|
|
|
|
|
i thought about it but..
opening and closing the file a lot of times will not slow down the analizing time?
maybe there is something like "virtual file" or another solution that will let update the real file every X seconds?(for backup).
or this is the only way to solve this problem?
|
|
|
|
|
i think you should be opening and closing streams with each write anyway, you dont want to leave a stream open longer than needed.
As i also suggested, i think the best way is to:
Get string from port,
Write it to the log file,
then pass it to the parsing thread for whatever that needs to do
My opinion is... If someone has already posted an answer, dont post the SAME answer
|
|
|
|
|
I have a solution with various projects, normally I gather the logon credentials via the UI and settings and pass 1 copy to the DAL. In this project there will be multiple DAL implementations all requiring a set of credentials. Credentials is declared as a class in the intermediate layer (server,DB,User & password) which is referenced by the UI.
Now I have the requirement of passing the creds to many objects which do not reference where the Credentials class resides. I initially created a copy of the Credentials class in the target object and attempted to pass Credentials as an object and then converting to the local Credentials type.
DAL.Server = (Creds as Credentials).Server;
This gets an error to use NEW. Creds is an object and has data in it.
Any recommendations on how to do this properly
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi,
you should use interfaces. Define a Credentials-interface, which will be accessible by all objects (do this by putting the interface into a seperate assembly). Let your Credentials-class implement the interface. Within all objects you can now use the interface to interact with the object, without knowing how it is implemented (how it should be within OOP).
interface ICredentials {
}
Your credentials-class:
class Credentials:ICredentials {
}
How to use it:
DAL.Server = MyCreds.Server
Hope this helps.
Regards
Sebastian
|
|
|
|
|
There you go, ask for a simple casting solution get the application of a whole different technology. What a way to learn, I have not used interfaces except when building services, will be working with this info today.
Thanks
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
It turns out the interface does not meet the requirements - one of the assemblies will need to be isolated for use with another solution and will not have access to the interface. Changed it to use a list<string>.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
i developed an application for a mobile device using ce 5.in the application i have two forms A ,and B. A is the main form and B is the child form most of the times form B is created, used and closed.but before showing the Form B the memory
usage (ex: 15MB) when form B is loaded the mem is (ex:16MB),but when the form is closed the mem is still 16 MB.i there might be a memory leak . do you
have any suggestions on this
|
|
|
|
|
Hi all,
I am currently make use of the Assembly.LoadFile to get hold of some of the attributes.
The problem that I am experiencing is that the LoadFile method holds on to the assembly, thus preventing me from taking actions on the assembly file like: deleting the file or moving the file. Only when the program closes does the release on the assembly take place.
How can I load the attribute data of the assembly without running into this issue.
Many thanks in advance
Regards,
The only programmers that are better C# programmers, are those who look like this -> |
Programm3r
My Blog: ^_^
|
|
|
|
|
Look at this[^]
or
This[^]
The only programmers that are better C# programmers, are those who look like this -> |
Programm3r
My Blog: ^_^
|
|
|
|
|
Ahh, the "I realised google can answer me quicker than a forum post" reply. Well done sir!
|
|
|
|
|
yeah, someone should make a tutorial on the subject - apparently its not an easy task
My opinion is... If someone has already posted an answer, dont post the SAME answer
|
|
|
|
|
Indeed. If only somebody here on Code Project had written this[^] article. Oh how I wish somebody would.
|
|
|
|
|
ahhh... now with my new found knowledge i will never not find an already created tutorial that im suggesting to be written again
My opinion is... If someone has already posted an answer, dont post the SAME answer
|
|
|
|
|
Hi,
I'm trying to find the existence of a child node in Treeview control. I used the following find(), Contains(), ContainsKey() methods.
1. TreeNode[] ad= treeView2.Nodes.Find("child2",true);
2. bool res= treeView2.Nodes[0].Nodes.Contains(selNode);
3. res = treeView2.Nodes[0].Nodes.ContainsKey("child2");
None of the above is giving result. Please let me know how to find a child node in a treeview control.
Thanks in advance.
|
|
|
|
|
what are you searching for and is it in the base level only?
the Find method should work fine, "child2" should be the key of the node to find, i.e. the Name property, change false to true if you want to search deeper than the base level.
what results are you getting from you find function?
My opinion is... If someone has already posted an answer, dont post the SAME answer
|
|
|
|
|
Try the following code for the same:
For Each LeftMenuNode As TreeNode In LeftMenu.Nodes ' LeftMenuNode will give you Nodes in TreeView
For Each LeftChildNode As TreeNode In LeftMenuNode.ChildNodes 'LeftChildNode will give u childnodes if any
If LeftChildNode.Text <> "Child Nodes" Then
LeftChildNode.NavigateUrl = "#"
End If
Next
Next
Regards,
Kaushal Arora
|
|
|
|