Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Bit of direction WP8 development

Options
  • 07-05-2014 8:09pm
    #1
    Registered Users Posts: 501 ✭✭✭


    Hi all


    I've just started building an app for Windows Phone in C# using Visual Studio Express 2013. This is just a spare time thing and completely for learning and something to do.


    What the app will do is basically take two numeric inputs from separate TextBoxes. I've a table for cross referencing, with columns and rows. I want to take the inputs and get a value from the table.


    So, if Input 1 = Blue and if Input 2 = Yellow, then I'd get Green out. But if Input 1 = Red and if Input 2 = Blue, then I'd get Purple.


    I don't want someone doing this for me or anything, just an idea of what I could do. I'm hoping there's an easier way of doing it than writing a very long if() statement!


    Thanks


Comments

  • Registered Users Posts: 2,791 ✭✭✭John_Mc


    No no, you don't want a long IF statement. I'm not really sure what you're asking here though. Create a local database and create the lookup table which stores the two inputs, and the output it should give.

    You'd then have a function which takes the two inputs and queries the table to return the output. This would be in a data access layer class, and would be called by either your UI event, or business layer function. It would obviously need to be asynchronous to prevent the UI from locking up.


  • Registered Users Posts: 501 ✭✭✭muff03


    Brilliant, thanks for that. I was wandering around the developer forms on stack overflow and Microsoft but I wasn't sure what the question I was trying to ask was! This'll put me right.


  • Registered Users Posts: 40,038 ✭✭✭✭Sparks




Advertisement