K here's the situation, attached is a copy of the lab i have due next week.
But I won't be around for the next few days, so I 've gotta get it done
ASAP. but it's driving me crazy.
We have to design a windows application for children to use for simple
arithmetic. They must have an option button to bring up a modal dialog
which allows them to choose non-zero single digit numbers, double digit
numbers, or one of each. They can also specify a seed for the random number
generator. The application also has to validate any numbers received.
Here are the problems i'm having with it:
label_Click method: when you click on the label it's supposed to cycle
between +. -. * and / I can't seem to get this to work no matter what I try.
All in all I can't really pick heads nor tails of how to go about it. Going
to spend time tomorrow with my instructor, to see if he can clarify what i
need. But thought I'd look for help on here too, as I've gotten good help
here before.
Also, i'm not looking for people to give me code, but just to point me in
the right direction with a good explanation, or a point to a good resource.
Thanks,
Corey 3 1306
Hi,
You problem is not clear and the attachement also not there...
but ....
label_Click method: when you click on the label it's supposed to cycle
between +. -. * and / I can't seem to get this to work no matter what I try.
for this you can do some thing like this
define this global pointer variable
private int lintMyPoint = 0;
define this string array as well
private string[] larstrMyData = new string[] {"*", "+", "-" etc}
in you a label_Click()
{
if (larstrMyData.Length > lintMyPoint)
lintMyPoint ++;
else
lintMyPoint = 0;
label.Text = larstrMyData[lintMyPoint];
}
If I got it correctly this way it should solve it
Nirosh.
"Corey Dyke" <ne***********@hotmail.com> wrote in message
news:KkJgb.6130$Sg4.2235@edtnps84... K here's the situation, attached is a copy of the lab i have due next
week. But I won't be around for the next few days, so I 've gotta get it done ASAP. but it's driving me crazy.
We have to design a windows application for children to use for simple arithmetic. They must have an option button to bring up a modal dialog which allows them to choose non-zero single digit numbers, double digit numbers, or one of each. They can also specify a seed for the random
number generator. The application also has to validate any numbers received.
Here are the problems i'm having with it:
label_Click method: when you click on the label it's supposed to cycle between +. -. * and / I can't seem to get this to work no matter what I
try. All in all I can't really pick heads nor tails of how to go about it.
Going to spend time tomorrow with my instructor, to see if he can clarify what i need. But thought I'd look for help on here too, as I've gotten good help here before.
Also, i'm not looking for people to give me code, but just to point me in the right direction with a good explanation, or a point to a good
resource. Thanks,
Corey
Thanks for the tip, however i did get it working. I just put the label Text
into a buffer and used if statements to check it and change it where
necessary.
yeah for some reason my attachement wouldn't show up...
here is what my assignment says:
Create a C# application for children to practice basic arithmetic. The main
form in the application resembles the following:
"number 1"
operator "number 2"
"answer box" "option button"
When the option button is clicked, a present a modal dialog to allow the
user:
- to choose non zero single digit numbers, double digit numbers, or one of
each
- to specify a seed of the random number generator so as to have a
different set of numbers.
In addition, your application needs to validate any numbers received.
the main problem i have now is....
how do i pass data from my second form, "options", Each of these options
should directly affect the main form when they are chosen, and then OK is
clicked. if Cancel is clicked, the changes to not take place.
i have 2 radio buttons set up for each number (singe digit or double digit)
also, how do I get the numbers to add/sub/multiply/divide together depending
on what the sign is?
i'm still quite a bit lost on the rest...
thanks
Corey
"Champika Nirosh" <cn*****@textcentric.lk> wrote in message
news:ei**************@TK2MSFTNGP09.phx.gbl... Hi,
You problem is not clear and the attachement also not there... but ....
label_Click method: when you click on the label it's supposed to cycle between +. -. * and / I can't seem to get this to work no matter what I
try. for this you can do some thing like this
define this global pointer variable private int lintMyPoint = 0;
define this string array as well private string[] larstrMyData = new string[] {"*", "+", "-" etc}
in you a label_Click() { if (larstrMyData.Length > lintMyPoint) lintMyPoint ++; else lintMyPoint = 0; label.Text = larstrMyData[lintMyPoint]; }
If I got it correctly this way it should solve it
Nirosh. "Corey Dyke" <ne***********@hotmail.com> wrote in message news:KkJgb.6130$Sg4.2235@edtnps84... K here's the situation, attached is a copy of the lab i have due next week. But I won't be around for the next few days, so I 've gotta get it done ASAP. but it's driving me crazy.
We have to design a windows application for children to use for simple arithmetic. They must have an option button to bring up a modal dialog which allows them to choose non-zero single digit numbers, double digit numbers, or one of each. They can also specify a seed for the random number generator. The application also has to validate any numbers received.
Here are the problems i'm having with it:
label_Click method: when you click on the label it's supposed to cycle between +. -. * and / I can't seem to get this to work no matter what I try. All in all I can't really pick heads nor tails of how to go about it.
Going to spend time tomorrow with my instructor, to see if he can clarify what
i need. But thought I'd look for help on here too, as I've gotten good
help here before.
Also, i'm not looking for people to give me code, but just to point me
in the right direction with a good explanation, or a point to a good resource. Thanks,
Corey
Of course it is practise that makes perfect, good to NOT just ask for a full
solution. May I say using if - then to check for the current string (if
that's what you meant) and change it to the next value works but is far from
elegant imho. Using a String [] or enum would probably be both more easy to
read and to code... Resetting the string counter to 0 could also be achieved
by using the % operator. May not be faster (don't know really) but very
easily coded!
Best!
Stu
"Corey Dyke" <ne***********@hotmail.com> wrote in message
news:ywXgb.11935$Sg4.5603@edtnps84... Thanks for the tip, however i did get it working. I just put the label
Text into a buffer and used if statements to check it and change it where necessary.
yeah for some reason my attachement wouldn't show up...
here is what my assignment says:
Create a C# application for children to practice basic arithmetic. The
main form in the application resembles the following:
"number 1" operator "number 2" "answer box" "option button"
When the option button is clicked, a present a modal dialog to allow the user: - to choose non zero single digit numbers, double digit numbers, or one
of each - to specify a seed of the random number generator so as to have a different set of numbers.
In addition, your application needs to validate any numbers received.
the main problem i have now is....
how do i pass data from my second form, "options", Each of these options should directly affect the main form when they are chosen, and then OK is clicked. if Cancel is clicked, the changes to not take place.
i have 2 radio buttons set up for each number (singe digit or double
digit) also, how do I get the numbers to add/sub/multiply/divide together
depending on what the sign is?
i'm still quite a bit lost on the rest...
thanks
Corey
"Champika Nirosh" <cn*****@textcentric.lk> wrote in message news:ei**************@TK2MSFTNGP09.phx.gbl... Hi,
You problem is not clear and the attachement also not there... but ....
label_Click method: when you click on the label it's supposed to cycle between +. -. * and / I can't seem to get this to work no matter what I try. for this you can do some thing like this
define this global pointer variable private int lintMyPoint = 0;
define this string array as well private string[] larstrMyData = new string[] {"*", "+", "-" etc}
in you a label_Click() { if (larstrMyData.Length > lintMyPoint) lintMyPoint ++; else lintMyPoint = 0; label.Text = larstrMyData[lintMyPoint]; }
If I got it correctly this way it should solve it
Nirosh. "Corey Dyke" <ne***********@hotmail.com> wrote in message news:KkJgb.6130$Sg4.2235@edtnps84... K here's the situation, attached is a copy of the lab i have due next week. But I won't be around for the next few days, so I 've gotta get it
done ASAP. but it's driving me crazy.
We have to design a windows application for children to use for simple arithmetic. They must have an option button to bring up a modal
dialog which allows them to choose non-zero single digit numbers, double
digit numbers, or one of each. They can also specify a seed for the random number generator. The application also has to validate any numbers received.
Here are the problems i'm having with it:
label_Click method: when you click on the label it's supposed to
cycle between +. -. * and / I can't seem to get this to work no matter what
I try. All in all I can't really pick heads nor tails of how to go about it.
Going to spend time tomorrow with my instructor, to see if he can clarify
what i need. But thought I'd look for help on here too, as I've gotten good help here before.
Also, i'm not looking for people to give me code, but just to point me in the right direction with a good explanation, or a point to a good
resource. Thanks,
Corey
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: mike |
last post by:
Hello,
After trying to validate this page for a couple of days now I was
wondering if someone might be able to help me out. Below is a list of
snippets where I am having the errors.
1. Line 334,...
|
by: John Flynn |
last post by:
hi all
i'm going to be quick i have an assignment due which i have no idea how to
do. i work full time so i dont have the time to learn it and its due date
has crept up on me ..
As follows:...
|
by: xunling |
last post by:
i have a question about answering ..... this topic is "need help"
what do i have to write at te topic line, !after i have klicked the
"answer message" button
ive tried many possibilities,...
|
by: sk |
last post by:
I have an applicaton in which I collect data for different parameters
for a set of devices. The data are entered into a single table, each
set of name, value pairs time-stamped and associated with...
|
by: Timothy Shih |
last post by:
Hi, I am trying to figure out how to use unmanaged code using P/Invoke. I
wrote a simple function which takes in 2 buffers (one a byte buffer, one a
char buffer) and copies the contents of the byte...
|
by: Cheryl Langdon |
last post by:
Hello everyone,
This is my first attempt at getting help in this manner. Please
forgive me if this is an inappropriate request.
I suddenly find myself in urgent need of instruction on how to...
|
by: pamelafluente |
last post by:
I am still working with no success on that client/server
problem. I need your help. I will submit simplified versions
of my problem so we can see clearly what is going on.
My model:
A client...
|
by: skumar434 |
last post by:
i need to store the data from a data base in to structure
.............the problem is like this ....suppose there is a data base
which stores the sequence no and item type etc ...but i need only...
|
by: U S Contractors Offering Service A Non-profit |
last post by:
Brilliant technology helping those most in need Inbox
Reply
U S Contractors Offering Service A Non-profit
show details
10:37 pm (1 hour ago)
Brilliant technology helping those most in need ...
|
by: mike |
last post by:
I help manage a large web site, one that has over
600 html pages... It's a reference site for ham radio
folks and as an example, one page indexes over
1.8 gb of on-line PDF documents.
The site...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |