.net

EndEdit equivalent in WPF

I have a WPF Window that contains a TextBox. I have implemented a Command that executes on Crtl-S that saves the contents of the window. My problem is that if the textbox is the active control, and I have newly edited text in the textbox, the latest changes in the textbox are not commited. I need to tab out of the textbox to get the chan...

How can I use C# to retrieve Java data from a socket?

I want to send BigInteger data in socket and my friend wants to retrieve the data. I am using Java, but my friend uses C#. String str = "Hello"; BigInteger big = new BigInteger(str.getBytes); byteToBeSent[] = big.toByteArray(); I am sending this byte array (byteToBeSent[]) through socket. And my friend wants to retrieve "Hello". How ...

Exiv2 in 64-bit (or another EXIF writer)

I need a non-destructive way of adding EXIF tags to jpeg images from .NET code. So far I have found Exiv2 and the .NET wrapper Exiv2net that works well when adding or updating tags. However, my code needs to run on a 64-bit machine (and compiled for 64-bit due to other reasons) and it seems to me that the Exiv2 code only compiles in 32-b...

Get path to Portable Device in Vista

I'm trying to write a quick app to fix the ID3 tags on my MP3 player, and I hit an annoying snag. When I plug my MP3 player into the USB, it shows up in Vista under the Portable Devices category and doesn't get a drive letter assigned. I'm using Vista x64 Home Premium and .NET 3.5. The path looks something like "Computer\MP3 Device" Tr...

MSXML2.SAXXMLReader.6.0 doesn't parse 

Hi. I'm writing out some xml from C# using the .net framework's XmlTextWriter. This works ok. Some of the strings I write out contain the character value 5 (note I don't mean the character '5', but I mean the ascii value 5). Now, I understand from the xml specification that this character is illegal in xml. However, I don't care if it'...

vb.net textbox validation against a database?

one of the fields on my form is a textbox that the user types an id. this is the foreign key to another table so I need to bounce the data against that table before letting them submit. I'd rather not use textchanged as every letter they type may incur another query, focus lost would only show an error or validate when they are already i...

linq to sql inserting an entity after creating in memory

I'm building a booking engine for a car hire place. I have a Booking l2s object, which has a Car and Location objects (and subsequent FK CarID / LocationID fields). During the first step of the booking process, I new up a Booking() class. This is passed along in a session to the subsequent pages. As the user proceeds through the proce...

HOW DO I: Pass aggregated data between unmanaged and managed code using a COM interface in the .NET Compact Framework V2?

I have a COM interface in my unmanaged C++ project that my managed C# code can find and use successfully. Currently, all the interface methods use simple type arguments like UINT and DOUBLE. What I want to do is to aggregate data into a single structure that my C# code can create and pass through the COM interface to my unmanaged C++ c...

Custom where clause with a string?

I'm returning a dataset using SubSonic.SqlQuery of two joined objects, but I can't seem to figure out how to perform this where clause: Month(SubmittedOn)=Month(GETDATE()) AND Year(SubmittedOn)=Year(GETDATE()) I tried to do it like this, but it did not like the .IsEqualTo(string): .Where("Month(SubmittedOn)").IsEqualTo("Month(getdate...

Do a self handled event prevent the instance from being garbage-Collected ?

Hi, i read the answer of the question Do event handlers stop garbage collection from occuring?, but what happens when the publisher is the target ? To be more specific, i am using MVVM design for a WPF app. Model-View classes raise a NotifyPropertyChanged on every change. In some classes, i need to call a method when something is modif...

keyboard shortcuts do not work when adding a form to a panel c#

I am writing an application where I have a form with a panel. I have noticed that when I add another form to the panel, that the added form's keyboard shortcuts stop working. I am using the following code : MainMenu m = new MainMenu(); m.TopLevel = false; m.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; m.Dock = System.Wi...

Problem with icon on creating new maximized MDI child form in .NET

I have a .NET 3.5 MDI WinForms application. I set a a child form's Icon property, and the icon shows up correctly in the top left corner of the form. I then maximize the child form and the icon is still OK. With the child form still maximized, I open another child window, which automatically comes up maximized. This form's icon is not ...

Datagrid CurrentRowIndex returns -1??

This seems quite odd. I have a Datagrid (.net 3.5 cf) that I bind to either a List or Inventory[]. When I click on a row and then hit a button to perform an action when I bind to a List CurrentRowIndex is -1. When I bind to Inventory[] and perform the same action CurrentRowIndex comes back with the selected row why is that?? grdBat...

Apache Sandesha whit WSE 3.0 Reliable Messaging (WseRM)

I have a Apache axis1.4 web services system and I'm looking for to add WS-ReliableMessaging whit Apache Sandesha. As any one have some experience off interoperability whit .NET WSE 3.0 Reliable Messaging (WseRM). It just works? Any kown problems? Does it solve problems? ...

DevExpress - Unable to use ctrl-v in TextEdit control

I am attempting to paste a value from a separate program into a TextEdit control and it doesn't do anything when I use ctrl-v. However, I am able to use right click and paste and that is successful. Is there a AllowShortcutKeys = true that I am missing? ...

What is the difference between the "protected" and "protected internal" modifiers in .NET?

What is the difference between the "protected" and "protected internal" modifiers in .NET? ...

How to cancel a long-running Database operation?

Currently working with Oracle, but will also need a solution for MS SQL. I have a GUI that allows users to generate SQL that will be executed on the database. This can take a very long time, depending on the search they generate. I want the GUI/App to responsive during this search and I want the user to be able to cancel the search. ...

windows mobile releasing resources when application is closed (.net 3.5 cf)

I have a basic .net 3.5 cf application with 4+ forms. I am using a window handler class that I created to make sure that certain forms only have one instance open at a time where as other (Product Details for example) can be opened as many times as the user wants. My problem lies in the fact that when the user closes all the forms (By ...

Problems consuming a Java/AXIS web service in a .Net Application

Hi, I have to consume a Web Service that is written in Java by a 3rd party, generated with Axis I guess. I'm using .Net Framework 3.5 SP1 and VS 2008. I've made a Web Reference, as we used to make in .net 2.0, and pointed it to the wsdl of the service. It worked perfectly with some methods of the service, but when I try to call a Met...

Things to consider when writing our own Continuous Integration server?

I work on a large project in an organization that is (slowly) upgrading our development processes to be a bit more modern. We currently are considering moving to a Continuous Integration model; as part of this move, we are considering writing our own Continuous Integration server. We have a very mature (somewhat ossified) build process...