It seems like all of the code is dynamic. If the result is a single dll, then you can combine all code (text) right before compilation. If the result is two dlls or more, you can create an interface and then load the implementation of Update on runtime (there are many other ways...)
Natza Mitzi
Posts
-
Mixing Dynamic code with non-dynamic code. -
very fast image conversion from jpg to bmp in c#Look at the previous message with the sample code. I conducted a test with jpeg images and it seems like the decoding does not take that much CPU. I suggested that you try to isolate the problem by using a set of predefined images (eliminate the decoding) and see whether the CPU usage continues.
-
very fast image conversion from jpg to bmp in c#I tested it and I do not think it is the encoding. Try to do the same with pre loaded bmp files in memory (eliminate the encoding) Here is the sample project I used: http://www.natzamitzi.com/imagetest.zip[^]
-
very fast image conversion from jpg to bmp in c#Hi, Try to use the same bitmap object instead of creating a new one (I am assuming the images are the same size (resolution wise). Copy the jpeg data to the bitmap but do not use Get/Set pixel methods since they are slow. Instead, pin the image to memory and do the copy there. If that is not fast enough, do it in unmanaged code using C++, it will be much faster.
-
Get window using process Thread.Are you looking for the main form in your own application ? A main window in a different application? Is the other process a .NET application? Please explain
-
Non-Client Paint IssueThe best thing I know is to use a form without borders and do your own form borders. You can see that on chrome, msn messenger, media player and more. If you do find a way to draw on that area, please post your answer. Thanks :)
-
Looking for ideas on how to release memory right before a generation 3 garbage collection [modified]Hi, Did you think about implementing a paging algorithm (LRU, clock page replacement) ? As for the dispose, I recommend that in your dispose you set the memebers to null where possible for faster memory reclaims.
-
Custom text with Special Field inside Crystal Reports.I am not sure whether this will work but if you can load this field dynamically from C# (or .NET) do the following: 1) Create a resource file 2) add the field name and text 3) use this in the code instead of the hard coded string 4) Add another resource file with the culture name inbetween the file name and the .resx (e.g. myResource.resx will become myREsource.fr-FR.resx) 5) Copy the exact field to the second file 6) Write it in your language 7) Change the appplication culture to the resx culture
-
SerializationYou can not serialize a dictionary, if this is your dictionary, use KeyedCollection
-
C# string conversion issuesI replied to someone else by a mistake, please see my coomment, code included
-
C# string conversion issuesHi, When converting from or to strings (even calling ToString(), you should ALWAYS use the culture in which you intend the formatting for. A general rule of thumb is always use English (us or uk) for internal stuff such as application logs and exporting/importing internal data, this way even when your software or data is moved between computers with different languages it will work. Use the UI culture and number formatting in the UI layer for UI interaction. Look at this horror: 10.000 An American or english computer will read this as 10$ and a french, german and others will read this as 10000$ Fun fun fun :) I think your code should look something like this:
String sEarnings = txtEarnings.Text;
double earnings;//Use the System.Threading.Thread.CurrentThread.CurrentUICulture.NumberFormat //since the text box string data has the UI culture bool earningsParseOk = Double.TryParse( sEarnings, System.Globalization.NumberStyles.Any, System.Threading.Thread.CurrentThread.CurrentUICulture.NumberFormat, out earnings); //check whether all parsing went ok //if not alert if (earningsParseOk) { //go go go } else { //error }
-
C# string conversion issuesDouble.TryParse and dont forget formatting and the Culture you are addressing
-
DataGrid date sorting [modified]Hi, As you can see in other responses, Application.DoEvents consumes all kinds of events such as user clicking buttons and can cause unexpected application states. It can also be a very heavy call to make in a loop, since you do not really know what or how much code will be executed. I am not saying never use it but use with extra caution (try not to use it). I asked for the number of records since you can use a list view in which sorting is very simple. Sorting list view C#
-
Remembering VariablesIf your list is something that can be thought of as application settings , put it there. The application settings are easy to manage. Try to use but not abuse data bases (not even xml file dbs)
-
Static in C# 1.1There are static element in .NET 1.1 but no static classes. I used to use abstract classes instead of static classes. Some people might say its not clean yet it did the job.
-
User Feedback while main thread is busyI would like to add that when DoEvents is called, your GUI becomes "alive" in the middle of the process and your user can click buttons and create unstable UI states. It also seems like calling DoEvents inside a loop may decrease performance to the ground depending on your loop code. When using threading and UI make sure to use Invoke and BeginInvoke properly to avoid dead locks or racing/overflowing
-
DataGrid date sorting [modified]HI, Your code looks evil. Application.DOEvents() is a bad call. Re-think and do this in a different way and not with a hit test ?? How much data is on this grid ?
-
C# Difference between byte and ByteYou are confusing with java. in C# byte == Byte string == String ... ... .. ..
-
USB to ParallelHi I am not sure whether this is your problem, There is a general problem with USB to parallel. I know for sure that many times USB to parallel does not work and "true" parallel port is required. T o answer that, Is there another program or application that can do the same thing via the same port and succeed ?
Natza Mitzi
Analysis Studio - Statistical Analysis -
Strong name and .pfx fileCreate a new project (a dummy one) in the project properties go to the signing tab, click sign this assembly, under the choose name key label, select new from the combo box and create it. There is a manual way to make it from command line but right now, I can only trace back this one.
Natza Mitzi
Analysis Studio - Statistical Analysis