Search Results

Search found 8 results on 1 pages for 'pbean'.

Page 1/1 | 1 

  • Allow users to insert a TAB into a TextBox but not newlines

    - by pbean
    I want to have a TextBox which does accept the TAB key (and places a TAB, ASCII 0x09, \t accordingly into the textbox) instead of jumping to the next control. The TextBox has a property AcceptsTab, which I have set to true but this does not give the desired result. It turns out the AcceptsTab property only works then Multiline is set to true as well. However I want to have a one-line TextBox which doesn't accept newlines.

    Read the article

  • [C#] Array as DataSource of a DataGrid: how to customize columns?

    - by pbean
    In my Windows Mobile .NET application I have a simple array of object with the data I want to display in my DataGrid. To do this, I simply call: myDataGrid.DataSource = myArray; This works, but I have a problem with it: it uses all properties as columns and uses the names of the properties as the column headers. I can't figure out how to customize two things: Select which subset of properties should be displayed as columns (say I have an ID, Name and Value property, I'd only want to show Name and Value); Rename the column headers to make more sense (for example if the property is called ID display a column header saying "Number"). Is this possible at all? As mentioned this is in a Windows Mobile .NET (version 2) application.

    Read the article

  • How to implement a SOAP client in C# (specifically for Windows Mobile)?

    - by pbean
    I'm really confused about how to create a SOAP client in C# using .NET. I have found this page which looks really promising, but for the life of me I can't find Microsoft.Web.Services2. Also most information I find about SOAP with C#/.NET are about creating web services in ASP.NET and that's not what I want to do. Basically what I want to do is implement a SOAP client in C# in a Windows Mobile application.

    Read the article

  • [Database] How to model this one-to-one relation?

    - by pbean
    I have several entities which respresent different types of users who need to be able to log in to a particular system. Additionally, they have different types of information associated with them. For example: a "general user", which has an e-mail address and "admin user", which has a workstation number (note that this a hypothetical case). Both entities also share common properties like first name, surname, address and telephone number. Finally, they naturally need to have a (unique) user name and a password to log in. In the application, the user just has to fill in his user name and password, and the functionality of the application changes slightly according to the type of the user. You can imagine that the username needs to be unique for this work. How should I model this effectively? I can't just create two tables, because then I can't force a unique constaint on the user name. I also can't put them all in just one table, because they have different types of specific information associated to them. I think I might need 3 seperate tables, one for "users" (with user name and password), one for the "general users" and another one for the "admin users", but how would the relations between these work? Or is there another solution? (By the way, the target DBMS is MySQL, so I don't think generalization is supported in the database system itself).

    Read the article

  • REST and links: middle ground?

    - by pbean
    I've been wondering about how far to go with links in REST. Consider books which have authors, but there is obviously a many-to-many relationship between books an authors (a book can be written by multiple authors, and authors can write multiple books). So let's say we have a rest call http://server/book/21, which will return a book XML, containing information about an author. Now since the book is a resource, and the author is a resource, the XML should not straight up include all the author information. It should contain a link to the author information. But which of the below two examples is more widely accepted? (Excuse my crappy formatted XML, I am not that experienced with hand writing XML) <book> <title>Some Book</title> <authors> <author link="http://server/author/82">Some Guy</author> <author link="http://server/author/51">Some Other Guy</author> </authors> </book> Then, an author link would return more information: <author> <name>Some Guy</name> <dateOfBirth>some time</dateOfBirth> </author> Or: <book> <title>Some Book</title> <authors>http://server/book/21/authors</authors> </book> Where http://server/book/21/authors returns: <authors> <author link="http://server/author/82">Some Guy</author> <author link="http://server/author/51">Some Other Guy</author> </authors> And then each of those returns the former <author> example again. The reason I'm asking is basically because at my job they went with the second approach, and it seems to me that clients have to take many more steps to reach where they want to go. Also, for basic information which "you're always going to need" (author's name), you do have to take one additional step. On the other hand, that way the book resource only returns information about the book (nothing else), and to get anything else, you have to access other resources.

    Read the article

  • How to implement this .NET client and PHP server synchronization scenario?

    - by pbean
    I have a PHP webserver and a .NET mobile application. The .NET application needs data from a database, which is provided (for now) by the php webserver. I'm fairly new to this kind of scenario so I'm not sure what the best practices are. I ran into a couple of problems and I am not certain how to overcome them. For now, I have the following setup. I run a PHP SOAP server which has a couple of operations which simply retrieve data from the database. For this web service I have created a WSDL file. In Visual Studio I added a web reference to my project using the WSDL file and it generated some classes for it. I simply call something like "MyWebService.GetItems();" and I get an array of items in my .NET application, which come straight from the database. Next I also serialize all these retrieved objects to local (permanent) storage. I face a couple of challenges which I don't know how to resolve properly. The idea is for the mobile client to synchronize the data once (at the start of the day), before working, and then use the local storage throughout the day, and synchronize it back at the end of the day. At the moment all data is downloaded through SOAP, and not a subset (only what is needed). How would I know which new information should be sent to the client? Only the server knows what is new, but only the client knows for sure which data it already has. I seem to be doing double work now. The data which is transferred with SOAP basically already are serialized objects. But at the moment I first retrieve all objects through SOAP and the .NET framework automatically deserializes it. Then I serialize all data again myself. It would be more efficient to simply download it to storage, and then deserialize it. The mobile device does not have a lot of memory. In my test data this is not really a problem, but with potentially tenths of thousands of records I can imagine this will become a problem. Currently when I call the SOAP method, it loads all data into memory (as an array) but as described above perhaps it would be better to have it stored into storage directly, and only retrieve from storage the objects that are needed. But how would I store this? An array would serialize to one big XML (or binary) file from which I cannot choose which objects to load. Would I make (possible tenths of thousands) separate files? Also at the end of the day when I want to send the changes back to the server, how would I know which objects to send... since they're not in memory? I hope my troubles are clear and I hope you are able to help me figure out how to implement this the best way. :) Some things are already fixed (like using .NET on the mobile device, using PHP and having a MySQL database server) but other things can most certainly be changed (like using SOAP).

    Read the article

  • [C#] Implementing different windows/forms in a Windows Mobile application?

    - by pbean
    I am a bit new to Windows Mobile (with C# and the compact framework) development, so I am kind of unsure how to do this. The user has to go through several pages of information in a wizard-like manner. At the start there is a login window. How would I go about and implement this? Would I just have different User Controls for each page and create/show and destroy/hide them on request? Or do I need to create different forms and somehow show those?

    Read the article

1