|
|
Hi everybody!
I'm new to OOP and I would find it much easier to learn by looking at an existing application. I'm looking for an open source business application written in c# or vb.net with "good" (=implements most standarts) oo design. Can anyone help me? Thanks!
Yaniv
|
|
|
|
|
Microsoft have a number of samples available. Fotovision is one I know of, but there are others, I am sure.
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 )
|
|
|
|
|
Look at Spring .NET source www.springframework.net/[^], many patterns.
NHibernate [^]demonstrates data Access patterns (abstract factories....)
A very good is the source of SharpDevelop [^]it is open source C# IDE .Contains many paterns and an simple mvc architecture .
also i like axiom (3d rendering framework)
there are infinite which are good written JUnit in java has good code .i dont know about NUnit
f(yf) = yf
|
|
|
|
|
Thank you very much!!! Spring.net & the ms samples are both greate!
|
|
|
|
|
Hello,
In my program there are delays of several seconds when certain windows are first loaded/shown. The second time this is done it's way faster. I am trying to get as closest as possible to eliminating this effect as it seriously disturbes the user experience.
I already did things like
* installed assemblies into GAC
* selected base adresses to prevent assembly relocation
* ngen'd the assemblies
This did some effect, but not too much.
Now, after I found this article I started playing around with Assembly.Load, RuntimeHelpers.PrepareMethod, RuntimeHelpers.RunModuleConstructor and RuntimeHelpers.RunClassConstructor. It does some effect, but I can't figure out the logic behind it. Preparing all methods takes ages, and does not do much more effect than preparing some well-selected methods. Both do not speed up the first show as much as I think would be possible.
Has anyone digged into this successfully? Or are there other ways I haven't found yet? I don't want to (and also cannot) instantiate all possible types.
Thanks in advance...
|
|
|
|
|
dfoerder wrote: Both do not speed up the first show as much as I think would be possible.
There can be other things going on in that form when it loads the first time that can effect load time like connecting to a remote resource such as a Database or WebService etc.
You could try to pre-load the forms and not show them until they are requested.
led mike
|
|
|
|
|
Hi, thanks for the reply.
There are no remote resources involved, so only "standard" stuff should happen. I could try to preload the form, that's right. Maybe I'll try that. But I still hope to find a more universal and elegant solution...
Any other ideas?
Daniel
|
|
|
|
|
Hi i want to develop a profiling tool. I just need to add TRACE to a .net assembly's(exe or dll) all methods before its execution.
is it possible to modify the assembly by inserting code for trace?
My small attempt...
|
|
|
|
|
I developed a program which monitors a web service and upon certain events it would do a task. Initially, it was a Windows Form application which consisted of:
1) a Timer which performed business logic
2) a Settings1.settings files
3) A simple GUI which was mainly a PropertyGrid which was bound to the Settings file.
(By Settings file i mean the built in Settings file creator which has VS designer support that lets you specify user or application scope).
The application worked perfect. The business logic that executed when the Timer elapsed made use of the Settings1.settings.
Then, i refactored the business logic into an independent class (note in the same project as the Windows Form, Settings1.settings) which is called through a Windows Service Object. I kept the Windows Form application as a means to allow the user to change the settings.
But, now since each project is effectively it's own assembly. The changes made in the GUI aren't reflected in the windows service.
The Windows Form Project creates a local user configuration file where the service creates one for the "Default User". I found that i after i modify the settings in the windows form... i could copy the generated user.config file as shown below to bring the new settings into the windows service:
COPY the user.config file from:
C:\Documents and Settings\blake\Local Settings\Application Data\MyCompanyName\\eEASAlertServiceActivator_Url_i10wwnu40dieoj2szfvkyaqsxsafbbhj\2.1.2.14
TO:
C:\Documents and Settings\Default User\Local Settings\Application Data\MyCompanyName\eEASAlertServiceActivator_Url_qfzoqgk0ecwshk1ztshws5yghp51pxoc\1.1.3.4
I'm wondering what is the best practice to go from here. I like using Settings.settings file for the following reasons:
1) you get VS Designer support
2) ability to use PropertyGrid's which provide an extremely fast way of allowing users to update the settings.
3) Very simple to access "string s = Settings1.Default.MyString;"
Is there anyway that you specify the file path that the settings are read from? I looked at other solutions on code project and the alternatives don't seem to have 1, 2, or 3.
My research suggests that there isn't such a solution... which is frustrating because if only the generated Settings class had a .Save( <filepath>) and .Load( <filepath> ) it would be perfect for what i wanted to do.
Thanks In Advance,
~blake
http://www.blakerobertson.com
|
|
|
|
|
blak3r wrote: Is there anyway that you specify the file path that the settings are read from?
Yes, they hide that information in the documentation[^]
led mike
|
|
|
|
|
The settings files which are created when you create a new "Settings File" from the IDE are of type System.Configuration.ApplicationSettingsBase .
The link you pointed me to i had read before. I do not know how (if it is even possible) to use the static ConfigurationManager class in conjunction with ApplicationSettingBase.
Code sample from the "documentation".
<br />
static void ModifyCustomSection2()<br />
{<br />
System.Configuration.Configuration config =<br />
ConfigurationManager.OpenExeConfiguration(<br />
ConfigurationUserLevel.None);<br />
<br />
CustomSection custSection =<br />
config.Sections[customSectionName] as CustomSection;<br />
<br />
custSection.FileName = "anotherName.txt";<br />
custSection.MaxIdleTime = new TimeSpan(0, 20, 0);<br />
custSection.MaxUsers = custSection.MaxUsers + 20;<br />
<br />
if (!custSection.ElementInformation.IsLocked)<br />
config.Save();<br />
else<br />
Console.WriteLine("Section was locked, could not update.");<br />
Example of designer generated Settings class.
<br />
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")]<br />
internal sealed partial class SettingsEmail : global::System.Configuration.ApplicationSettingsBase {<br />
<br />
private static SettingsEmail defaultInstance = ((SettingsEmail)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new SettingsEmail())));<br />
http://www.blakerobertson.com
|
|
|
|
|
bump
http://www.blakerobertson.com
|
|
|
|
|
Hi,
How should i integrate Google earth to my application without installing Google Earth to my application??
Regards,
Priya
|
|
|
|
|
I don't know but if Google Earth does not provide any developer documentation for doing that then good luck. If the do provide documentation you should be reading that instead of posting questions in a forum. HINT: Google Google Earth developer
led mike
|
|
|
|
|
Hi Mike,
I was not aware of reading documentation,thatswhy i posted like that..I almost dropped the idea of integrating... ...
Priya..
|
|
|
|
|
Hi All,
I have a scenario where in i implement a remoting service using TCP/IP. This remoting service by default accepts 25 Active concurrent connections from clients. I have to increase this to 50. Is thr any idea of achieving it……
Thanks in Advance
Cheers
Mani.
|
|
|
|
|
What version of windows is this server running on?? 2000 Workstation, 2000 Server, XP, Vista, Server 2003, Server 2008?? How many connection licenses does it have installed??
|
|
|
|
|
Its running on windows 2000 . i have no idea of connection licenses...
|
|
|
|
|
Windows 2000 Server has a default connection limit of (I think) 20 inbound connections, of any type. In order to get more connections, you have to buy more connection licenses.
Windows 2000 Workstation has an absolute limit of 10, that cannot be (legally) changed.
|
|
|
|
|
I am trying to solve a memory leak issue when accessing a serial port on a WINCE 5.0 device. My application is devloped in MSVS2008 and uses .NetCF 3.5. I have pinpointed the leak was due to a third party serial port DLL so I tried to implement the Microsoft SerialPort class. Unfortunately the memory leak still exists. I cut my code back to just the reading of the data buffer (see below) but the memory still keeps dropping constantly. Any suggestions of how to solve this problem?
private void PortOnRead(object sender, System.IO.Ports.SerialDataReceivedEventArgs e)
{
try
{
byte[] bData = new byte[this.sPort.BytesToRead];
int iRead = this.sPort.Read(bData,0,bData.Length);
// To Do
this.dtReceived = DateTime.Now;
}
catch { }
}
|
|
|
|
|
Hi,
I have several comments:
1.
please use PRE tags to show multi-line code snippets
2.
this does not look like actual code; what do you do with bData once it got filled?
3.
why do you think there is a memory leak? whatever .NET program you write, memory usage
will go up until at some point more memory is required and the GC (garbage collector)
kicks in and tries to free some memory (looking for objects that are no longer alive,
i.e. no longer reachable because all references to them are gone).
That would apply to bData since it is no longer reachable once your PortOnRead() method
finishes.
But, remember, the GC kicks in only when more memory is needed than is actually available
(or allowed by some internal OS settings).
So there would be a problem if your app suddenly throws an OutOfMemoryException, or
dramatically fails with some symptoms that are memory-related; and there would be no
problem at all if the memory usage (say the Working Set) keeps growing, suddenly
falls back dramatically, then grows again, etc.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Is it possible to discover the private key used in a hash algorithm if you have both a clear text value and it's hashed equivelent?
|
|
|
|
|
Probably with a PhD in Mathematics and whole lot of computing power, yes. Can it be brute forced? Yep, given sufficient time, anything can be guessed at until you get it right.
Can some schmuck off the street discover it, no.
|
|
|
|
|
Great, what I wanted to do was create a confirmation email. The link to confirm would include the email address to be confirmed in plain text, and a hashed version of the same email address. So when the email is confirmed I can hash the plain text and compare the two values to make sure it hasn't been tampered with. But I wasn't sure if it was possible to reverse engineer the private key and regenerate the hash value so it would match and bypass the validation.
|
|
|
|