Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6894895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:50:22+00:00 2026-05-27T06:50:22+00:00

I am trying to write a kiosk program for my print center at a

  • 0

I am trying to write a kiosk program for my print center at a school for students to select size and media type and then have it generate a price. I am currently doing this with radio buttons which works fine but we are adding many more options and a drop down list box would be more appropriate. Also, my code for calculating the price is out of control. I would like to set this up so that calculating the price should be easy. Setup is something like this:

File1 – Paper Size (9 options) – Media Type (18 options)
File2, File 3, etc.

I was going to store this in a 3D array filename[]papersize[]media[] for processing the price.

The problem is that not all media types are available in all sizes. I see that you can not disable items in the list. If you pick one size, I can selectively populate the other drop down with or without items, but it changes my index numbers. If I could disable items, I could keep the same index and make an easy loop for processing prices. As it is now I would have to manually specify and loop for each paper size since the media types are different indexes.

I hope this makes sense, I am not really a programmer, I am just trying to make something simple to improve our workflow and accuracy at the print center. I can provide a screen shot of the old program and a mockup of my new program if it would help. Can anyone think of a more elegant solution for this?

Thanks!!

EDIT

Yikes.. Ok, this is ending up to be more difficult than I was expecting: Thanks everyone for your input, it is much appreciated. I did not really expect any responses and there were a lot. Thank You. I attempted the table idea mentioned below but I am not exactly sure how to implement it. I will comment on that post for what I tried. Let me provide more detail in the event that someone else has another idea.

For example of what I am trying to do:

Size = 8.5×11 has media = matte, double sided matte, luster, gloss, acetate, resume
Size = 11×17 has media = same minus acetate and resume
and so on, up to a 60″ roll with backlit media and all sorts of stuff.

Price for 8.5×11 is 1.50 regardless of paper and then each paper has its own price
Price for 11×17 is 3.00 and each paper has its own price which is more than their 8.5×11 counterparts

8.5x11 matte = .25
11x17 matte = .50

8.5x11 matte total = 1.75
11x17 matte total = 3.50

I am trying to do this in as little steps as possible. Currently I have radio buttons which take up a bunch a screen real-estate and do things like: When 11x17_1.Checked acetate_1.Disable, etc. Also for calculating price I have hundreds of lines of code doing things like:

 If(8.5x11_1.Checked)
    {
        If(matte_1.Checked) 
            price = 8.5x11matte_1; 
        if(luster_1.Checked) 
            price = 8.5x11luster_1;
        ...etc.
    }  

Rolls require more data (height) to be processed as we charge by linear inch for these. Currently for each file I just have a height box that they are required to fill out. I could just put a height field next to each file for my new version. Then if they select a roll, the height box bust be filled out, which requires more IF’s… which I currently have hundreds of. Any thoughts on a more elegant way to do this?

I just don’t have the programming background to simplify this, but I know this can probably be done in 10 lines of code using an array and drop down lists:

It has been a long time since I used arrays but I was thinking of something like:

Selection[file_1][combobox_size.Index][combobox_media.Index]

I think I would have to manually define each array value since the prices are arbitrary?

[0][0][0] = 1.75
[0][0][1] = 1.75
[0][0][2] = 2.00

And so on.

My winform would have let’s say 12 rows for them to enter a file name and then pick the drop down lists. If filename != null then I will process a price for the file and selections.

So if file 1 was 11×17 gloss my array would be something like:

[0][1][3] which I would have pre-defined with a value of $4.00 for example

If it is a roll then I would just multiply by the required height box.

Is this logic sound or grossly inefficient?

EDIT #3

Ok, almost there I think. Sadly, I was unable to figure out the other solutions offered by the community, but I wrote a “get_index” function that looks like this:

public static int get_index(string index)
        {

            if (index == "Matte")
                return (1);
            ....
            if (index == "Luster")
                return (3);
            ....
            else
                return (0);
        }

in my main program I define prices like this:

for (int x = 0; x < filenum; x++)
            {
                pricegrid[x, 0, 0] = 1.75; // 8.5x11 Resume
                pricegrid[x, 0, 1] = 1.75; // 8.5x11 Matte
                pricegrid[x, 0, 2] = 1.75; // 8.5x11 Double Sided Matte
                pricegrid[x, 0, 3] = 2.35; // 8.5x11 Luster
                .....
            }

Then to calculate the price I am doing something like this calling that get_index function:

private void calculate_price()
        {

                getindex[0] = get_index(media1.SelectedItem.ToString());

            ....


        }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T06:50:23+00:00Added an answer on May 27, 2026 at 6:50 am

    You should populate your ComboBox dynamically as you do.
    Instead of using SelectedIndex you can use SelectedValue which does not depend on number of elements.

    See for example: Using ValueMember in ComboBox

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying write a java program to send live microphone data over UDP, then
I'm trying write a query to find records which don't have a matching record
Im trying to write something to get my images to show correctly. I have
Trying to write this small program to help me in my Stats class, everything
Trying to write a trivial application, But I have stuck into one of the
i trying to write a comment in each PHP file, then the comment will
I'm trying write a C program that sends an UDP packet to a given
In trying to write more testable Java code, I have been using the Model-View-Presenter
Im trying to write a single activity app, extending ListActivity. I have a class
I'm trying to write a kiosk GUI in ruby/gtk on ubuntu. I'm pretty fluent

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.