Click here to Skip to main content
15,030,320 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want a tool, but I do not want to knock my main program code in the background too, so I would like to attribute to bind the command button, but do not know how to write code, here is my tool of UI:
http://desmond.imageshack.us/Himg840/scaled.php?server=840&filename=psminitoolui.jpg&res=medium[^]

I want to implement the function: select the appropriate radioButton, Query button will query according to different conditions of data, of course, how to execute the query results here, how do I know, I mainly want to improve the readability of my code,

I now mainly use MVC implementation code, so the plot in MainWindow push a lot of code, mainly because some button's clcik time, there radioButton and some checkBox the check / uncheck event, so

I am very poor code readability, and so want to achieve with the WPF Command, but I am a beginner, the MVVM for WPF is not really understand, for ICommand is not very clear, so I hope what expert advice and guidance to some,

I would like to once again explain the problem, for example for example: I choose BugIDs, then enter the appropriate subsequent textBox ID, and then click Query Button will get results and displayed; and if I choose PSQ File

Then select the appropriate file, and then click Query Button will get the corresponding results.

Which expert can teach me, give me some of the best code.

Best Wishes
Posted
Updated 19-Dec-11 6:13am
v2
Comments
Wendelius 19-Dec-11 12:14pm
   
big tags removed to enhance readability
Sergey Alexandrovich Kryukov 19-Dec-11 14:38pm
   
What do you want to achieve: your functionality or your idea of comfort like "I do not want to knock my main program code in the background". As for now, this dilemma makes a question completely incorrect.
--SA

1 solution

Please see my comment to the question. When you say that you "don't know how to write your code", you probably already over-estimate your knowledge. You don't know something else. You don't know that the button and any other UI elements have nothing to do with "background" or "foreground". You don't even understand that buttons are not programmed to carry any functionality bound to their clicks.

You request is simply beyond the help that would satisfy you, not mentioning your ability to write the application immediately after getting any help. First, you should learn how to get help.

You main problem is that you failed to isolate description of required functionality form your idea on how it should be achieved. The problem is not that your ideas are wrong or right; the problem is that you cannot see the boundary between reality and your understanding if this reality, trying to base your question on some ideas you are preoccupied with, no matter right or wrong (and in this very case it looks they are wrong).

First of all, you would need to share your ultimate goals. Not just explain what you want to achieve, explain why. Don't apply any constraints to the advice, as you don't understand if they are valid or wrong.

Embrace the idea that your "I want" is not really about "possible" or "impossible". Generally, the statements are not classified into "true" and "false", not even close to that. Remember that statements involve real-life language. So, they are roughly classified into "true", "false" and "gibberish", see http://en.wikipedia.org/wiki/Gibberish[^].

Please, read the rules for asking questions at http://en.wikipedia.org/wiki/Gibberish[^].

See also this discussion: How to ask a good question?[^] (not just my answer but the whole discussion).

Please also see my explanation of the related issue: what is the difference between the class and encapsulation in programming[^].

Good luck,
—SA
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900