|
I think that all u have to do is to plug the touch screen and start browsing. Nothing to add to the code unless u want to use some additional feature from the vendor's APIs.
Off course your controls should be larger to suit human fingers
Hope this helps
Best Regards
3ala2
|
|
|
|
|
Hi all.
I've searched around and can't find a solution to a pickle i'm in.
I'm writing a type of auto-complete selection process. I would like the box to highlight the
closest match as a user types in text.
Given a list of strings such as
R05
R09
R087
R321
R3394
G5832
If the user types in R09
String.Compare will return R05, R09, R087, R321, R3394
I want to find the string that has the largest match (In this case R09)
I could write a routine that does this, but didn't know if one exists in an assembly somewhere...
Anyone have any thoughts?
Thanks,
Tom
|
|
|
|
|
Youll have to write a custom method that does this using the String.StartsWith() method:
And, considering the example you gave, I feel you should process your textbox text in a loop that will do the following:
str.StartsWith("R09");
str.StartsWith("R0");
str.StartsWith("R");
So, the loop would decrement the index of the textbox string and check each time with - "R09","R0" and "R".
|
|
|
|
|
You may want to look for articles on "natural string comparison".
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
|
|
|
|
|
I'm having a little trouble trying to complete a fairly simple C# remoting app I found in a tutorial.
The server includes a declaration of an event-handler delegate the server class uses and the event argument class for the event. The client is then supposed to associate its event handler to the server's event (e.g., server.eventname += new eventhandlername(client.handler) ), periodically do things to raise the event, and finally remove its handler from the server's handler list when the client closes.
When I try to run the client, however, the server throws the following exception:
"An unhandled exception of type 'System.Security.SecurityException' occurred in mscorlib.dll
"Additional information: Type System.DelegateSerializationHolder and the types derived from it (such as System.DelegateSerializationHolder) are not permitted to be deserialized at this security level."
I'm reading this as some sort of a code access permissions problem, but so far I haven't been able to quite chase it down, much less figure out how to correct the problem. The event argument class definition in the server is marked as Serializable, but the event-handler delegate isn't; should it be? That doesn't seem right to me, but I'm obviously not getting something....
Thanks,
Ron Ritchie
|
|
|
|
|
Hello? Anybody there?
Ron Ritchie
Ron Ritchie
|
|
|
|
|
I am not sure if this is the correct form, but as I think the problem is a result of something in .NET I am posting here.
Running a program (written in C# and using .NET 2.0) on a local machine. Using that program to access a file on a network drive, working on the file (the file is a SEGY file, like a JPEG, and lines are overlaid on the file, information about the lines get saved while the SEGY file is unchanged), and saving the work as a text file. It appears, depending on the size of the file trying to be written, the program hangs. A file of 900K can be written successfully, but when the program hangs it stops with about 230K written (working on a local machine only the save which hangs on a network drive works fine). Adding a flush after each write 'appears' to solve the problem (appearing to solve the problem isn't good enough). The writes are in a for loop, running in debug and adding a break point inside the loop, the break point is not tripped.
Has anyone had any experience with this or can they point me where I may be able to find an answer?
this thing looks like it was written by an epileptic ferret
Dave Kreskowiak
|
|
|
|
|
Looks like FTP problem to me.
What's the O.S. installed on the images server?
Best Regards
3ala2
|
|
|
|
|
I would like to know is there any release/build engineer related information is present here at CodeProject. I'm working as Technical support engineer and engaged into release of asp.net/sql server based files. I need to know any information/ group for this over here.
thanks
Raj
rajesh
|
|
|
|
|
I've read this three times and I am still not sure what you're asking for.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
hi cris,
I 'm asking about information for release tools like NAnt, Cruise Control
thanks
raj ram
raj
|
|
|
|
|
rajg82 wrote: I 'm asking about information for release tools like NAnt, Cruise Control
Click the Site Map link under NEWS & COMMUNITY. There is a Development Lifecycle category that has an Installation sub category that lists 93 articles. I have no idea what's in there but it sounds like thats what you want to look at, yes?
led mike
|
|
|
|
|
thanks mike, the same i'm looking for
raj
|
|
|
|
|
Hello everyone,
I am actually preparing for a job interview and I had my first telephone interview last week. One of the things that came up in the discussion was generation of .NET bytecode directly!
Well, I am not supposed to know how to go about it, I guess but it would be nice to talk about it intelligently in the interview. Does anyone know where I can get some information about it and if someone has tried doing something like that. It would definitely be nice to be able to suggest some ways one can go about it etc.
Many thanks,
Keith
|
|
|
|
|
|
|
CodeDom.Compiler just is a wrapper around the C# compiler/VB compiler.
CodeDom is nearly useless for generating code because it supports only a few operators, I've often run into cases where CodeDom cannot generate the code I wanted.
And a call to an external compiler is quite expensive if you just want to dynamically generate a method!
Usually, generating .NET bytecode directly means Reflection.Emit[^].
|
|
|
|
|
Hi Guys,
While i understand the differenced between the operator and the Equals method, is there a rule of thumb for when to use them in code?
I've always tended to use == for value comparisons of known types (strings, ints, etc), and Object.Equals() when comparing unknown objects.
I have a colleague who insists on using Object.Equals() for every comparison, and while i don't like it, i can't think of a reasonable reason not to use it.
What are other peoples thoughts on this?
Cheers
Tristan
-------------------------------
Carrier Bags - 21st Century Tumbleweed.
|
|
|
|
|
Tristan Rhodes wrote: While i understand the differenced between the operator and the Equals method, is there a rule of thumb for when to use them in code?
If you did understand it, you wouldnt be asking
== and ReferenceEquals is more closely related, and == does ReferenceEquals if not overriden.
You can see the effect with structs/valuetypes, create 2 structs of the same type, and go through all 6 permutations of equality tests.
|
|
|
|
|
Ok, if == is more closely equated to ReferenceEquals, then >=, <= , >, < are all value operators, and == is a reference comparison operator and doesn't relate to the other equality operators at all?
I mean, i see the following quite regularly:
If (myDate.Equals(defaultDate) || myDate < minDate || myDate > maxDate)
throw new ArgumentOutOfRangeException("myDate");
that does cause me to do a double take, as i would expect it to be
If (myDate == defaultDate || myDate < minDate || myDate > maxDate)
throw new ArgumentOutOfRangeException("myDate");
Hence why i ask. What's the rule of thumb? In this instance both work the same way.
Cheers
-------------------------------
Carrier Bags - 21st Century Tumbleweed.
|
|
|
|
|
Object.Equals is a virtual method (and the static Object.Equals(a,b) just does a few null checks and calls a.Equals(b)).
Operators are static.
Virtual methods are called using dynamic dispatch - so Object.Equals always does a value comparison if supported by the runtime types.
However, the == operator is called using static dispatch - if you compare two string variables, it does a value comparison, but if you compare two object variables, it does a reference comparison - even if the object variables contain string objects!
|
|
|
|
|
Object.Equals() should be used whenever you want to check Identity not equity.
Reference type equals returns true if both objects are pointing to same memory location. It is not going to return you true if both object have identical values(except string type). So Object.Equals() checks for Identity not equality.
But if you are using Equals method on value types it check for Equility not identity
So When you want to check Identity use Equals method
But when you want to check for equility use ==
Be aware while using Equals method with values types as it may have performance issue while boxing the values types sp better to go with ==
Addition to this Object.Equals method provides Comparison type paramter where you can ignore case sensitivity
Please have some thoughts on this question so that i can also get some feedback
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
Just wondering whether .NET is required for .NET framework? I checked it requires XP SP2. Now I am not sure whether current updates of SP2 automatically installs .NET or not because we have to decide whether we go for .NET based solution or not and only stat which I could grab that majority of users are using IE7 for browsing.
|
|
|
|
|
Adnan Siddiqi wrote: .NET is required for .NET framework?
What ?
Adnan Siddiqi wrote: I checked it requires XP SP2
Yes.
Adnan Siddiqi wrote: Now I am not sure whether current updates of SP2 automatically installs .NET
I don't think so.
Christian Graus
Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
|
|
|
|
|
err I mean whether .net is required for IE7 installation.
|
|
|
|