locked
Building a Pos Terminal Simulation with C# MVP (ModelViewPresenter) RRS feed

  • Question

  • Hi,

    I have 4 buttons. Btn1, Btn2, Btn3 and Btn4. Also I have some arrays as it shown below and 1 combo-box.

    1. ArrayMain() = {“1.Water”,”2.Air”,”3.Soil”,”4.Fire”}

    1.1.   ArrayWater() = {“1.Salty”,”2.Fresh”, “3.Contaminated”}

    1.1.1.ArraySalty() = {1.”AA”, 2.”BB”, 3.”CC”}

    1.1.2.ArrayFresh() = {1.”DD”, 2.”EE”, 3.”FF”}

    1.1.3.ArrayWaterContaminated() = {1.”XX”, 2.”YY”, 3.”ZZ”}                                   

    1.2   ArrayAir() = {“1.Fresh”, “2.Contaminated”}

    1.3   ArraySoil() = {“1.Normal”, “2.Contaminated”}

    1.4   ArrayFire() = {“1.Low”,”2.Mid”,”3.High”}

    When my app starts, first array values 1.(ArrayMain) fills the comboBox.This comboBox will have (4 values as;)  “1.Water”, ”2.Air”, ”3.Soil”, ”4.Fire” values in it.

    If user choose “1.Water” than user clicks Btn1. Than Btn1 events clears the comboBox and loads 1.1ArrayWater() values into comboBox.

    Second time if user chooses “1.Salty” than user clicks again Btn1 and this time Btn1 events clears the comboBox and loads 1.1.1ArraySalty() values into comboBox.

    Third time if user chooses “2.BB” than user clicks Btn2 and sends the information “BB” for calculation.

    Now I want to build this demo app in C# and it must use Context/Interface (or MVP- ModelViewPresenter) type and avoids multiple if/else statement as well as multiple panel control on main form.

    Like (ingenico) pos terminal. First you have 5 (more or less) menu item and each time you press any (number) buttons (1 to 9 lilke in pos terminal) than new menu appears on the screen.

    I thank you for reading my post.

    Kind Regards,

     

     

     

     






    • Edited by GC2006 Wednesday, April 29, 2015 6:19 AM
    • Moved by Kristin Xie Wednesday, April 29, 2015 8:59 AM
    Tuesday, April 28, 2015 4:35 PM

Answers

  • Thank you all, I made it. Most of the credit goes to Eugene Podskal who help me to find best logic, with minimum of code. And this is my few cent contribution for C# world. Here it is: http://stackoverflow.com/questions/29941997/how-to-set-same-button-events-for-listbox-value-index-or-treeview-nodes/29951624#29951624

    • Marked as answer by GC2006 Wednesday, April 29, 2015 6:33 PM
    Wednesday, April 29, 2015 6:33 PM

All replies

  • I redeem my expectation and put my app main form picture that for to user on this form can understand my problem much better. Any help please.
    Wednesday, April 29, 2015 6:21 AM
  • Hi GC2006,

    Visual C# forum is discuss and ask questions about the C# programming language, IDE, libraries, samples, and tools.

    Based on your scenario, your case related to POS. And I see you have already post the same issue in  .NET Framework > POS for .NET forum, This forum is more appropriate for your scenario than others. Now I will move your thread to that forum. Thanks for your understanding.

    Best wishes!

    Kristin


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.



    • Edited by Kristin Xie Wednesday, April 29, 2015 9:01 AM
    Wednesday, April 29, 2015 8:58 AM
  • Thanks Kristin
    Wednesday, April 29, 2015 10:28 AM
  • Kristin,

    Just because the post mentions POS doesn't mean it is for POS for .NET forum. POS for .NET applications use the POS for .NET SDK to interface to POS devices.

    The question here is more for C# forum.


    Sean Liming - Book Author: Starter Guide SIM (WEI), Pro Guide to WE8S & WES 7, Pro Guide to POS for .NET - www.annabooks.com / www.seanliming.com

    Wednesday, April 29, 2015 4:01 PM
    Answerer
  • Please re-post to the C# forum.

    If you are targeting a mobile platform, then you might want to post to the Windows Mobile Forum: https://social.msdn.microsoft.com/Forums/en-US/home?forum=windowsmobiledev


    Sean Liming - Book Author: Starter Guide SIM (WEI), Pro Guide to WE8S & WES 7, Pro Guide to POS for .NET - www.annabooks.com / www.seanliming.com

    Wednesday, April 29, 2015 4:02 PM
    Answerer
  • Thank you all, I made it. Most of the credit goes to Eugene Podskal who help me to find best logic, with minimum of code. And this is my few cent contribution for C# world. Here it is: http://stackoverflow.com/questions/29941997/how-to-set-same-button-events-for-listbox-value-index-or-treeview-nodes/29951624#29951624

    • Marked as answer by GC2006 Wednesday, April 29, 2015 6:33 PM
    Wednesday, April 29, 2015 6:33 PM