Results 1 to 2 of 2

Thread: Help with movie ticket machine Im making

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2003
    Posts
    18

    Help with movie ticket machine Im making

    So I have some code to a program in .NET that Ive been working on to allow users to purchase movie tickets.

    Here it is:

    Module modMovieTron

    System.Windows.Forms.PictureBox

    Sub Main()

    Public Class ListBox


    using System;
    using System.Windows.Forms;
    using System.Drawing;

    #using <mscorlib.dll>
    #using <System.dll>
    #using <System.Drawing.dll>
    #using <System.Windows.Forms.dll>

    using namespace System;
    using namespace System:rawing;
    using namespace System::Windows::Forms;

    __gc class SimpleForm : public Form
    {
    public:
    SimpleForm();
    private:
    PictureBox *PictBox;
    };

    SimpleForm::SimpleForm()
    {
    // The caption of the form
    this->Text = S"The Recruit";
    // The size of the form
    this->Size = Drawing::Size(300, 480);

    PictBox = new PictureBox;
    PictBox->BorderStyle = BorderStyle::FixedSingle;
    PictBox->BackColor = Drawing::Color::White;
    PictBox->Location = Point(16, 16);
    PictBox->Size = Drawing::Size(262, 392);
    // The following line assumes that the picture is in the same
    // folder of the application
    PictBox->Image = PictureBox::Image::FromFile("therecruit_poster.jpg");
    // After creating the control, add it to the
    // group of controls of the form
    Controls->Add(PictBox);
    }

    __gc class SimpleForm : public Form
    {
    public:
    SimpleForm();
    private:
    PictureBox *PictBox;
    };

    SimpleForm::SimpleForm()
    {
    // The caption of the form
    this->Text = S"Lord Of The Rings: Two Towers";
    // The size of the form
    this->Size = Drawing::Size(300, 480);

    PictBox = new PictureBox;
    PictBox->BorderStyle = BorderStyle::FixedSingle;
    PictBox->BackColor = Drawing::Color::White;
    PictBox->Location = Point(16, 16);
    PictBox->Size = Drawing::Size(262, 392);
    // The following line assumes that the picture is in the same
    // folder of the application
    PictBox->Image = PictureBox::Image::FromFile("lordoftheringstwotowers_poster2.jpg");
    // After creating the control, add it to the
    // group of controls of the form
    Controls->Add(PictBox);
    }
    __gc class SimpleForm : public Form
    {
    public:
    SimpleForm();
    private:
    PictureBox *PictBox;
    };

    SimpleForm::SimpleForm()
    {
    // The caption of the form
    this->Text = S"Gangs Of New York";
    // The size of the form
    this->Size = Drawing::Size(300, 480);

    PictBox = new PictureBox;
    PictBox->BorderStyle = BorderStyle::FixedSingle;
    PictBox->BackColor = Drawing::Color::White;
    PictBox->Location = Point(16, 16);
    PictBox->Size = Drawing::Size(262, 392);
    // The following line assumes that the picture is in the same
    // folder of the application
    PictBox->Image = PictureBox::Image::FromFile("gangsofnewyork.jpg");
    // After creating the control, add it to the
    // group of controls of the form
    Controls->Add(PictBox);
    }

    __gc class SimpleForm : public Form
    {
    public:
    SimpleForm();
    private:
    PictureBox *PictBox;
    };

    SimpleForm::SimpleForm()
    {
    // The caption of the form
    this->Text = S"Drumline";
    // The size of the form
    this->Size = Drawing::Size(300, 480);

    PictBox = new PictureBox;
    PictBox->BorderStyle = BorderStyle::FixedSingle;
    PictBox->BackColor = Drawing::Color::White;
    PictBox->Location = Point(16, 16);
    PictBox->Size = Drawing::Size(262, 392);
    // The following line assumes that the picture is in the same
    // folder of the application
    PictBox->Image = PictureBox::Image::FromFile("drumline_poster.jpg");
    // After creating the control, add it to the
    // group of controls of the form
    Controls->Add(PictBox);
    }
    int __stdcall WinMain()
    {
    SimpleForm *SF = new SimpleForm();
    Application::Run(SF);

    return 0;
    }

    public class But:Form {
    Button b1 = new Button();
    Button b2 = new Button();
    Button b3 = new Button();
    Button b4 = new Button();

    But() {
    b1.Text = "Lord Of The Rings: Two Towers";
    b2.Text = "The Recruit";
    b3.Text = "Gangs Of New York";
    b4.Text = "Drumline";


    public class Rad: Form {
    // First Radio Button created
    RadioButton r1 = new RadioButton();
    // Second Radio Button created
    RadioButton r2 = new RadioButton();
    // GroupBox created
    GroupBox g1 = new GroupBox()

    Rad() {
    r1.Text = "Purchase";
    r1.Location = new Point(20,20);
    r2.Text = "End selection";
    r2.Location = new Point(20,40);
    g1.Location = new Point(20,20);
    g1.Text = "";
    g1.BackColor = Color.Blue;
    // Radio Buttons added to group box
    g1.Controls.Add(this.r1);
    g1.Controls.Add(this.r2);
    // Group Box added to the form
    this.Controls.Add(g1);
    }

    }



    Dim strTimes(,) As String = { _
    {"01:00 PM", "03:00 PM", "05:00 PM", "07:00 PM", "09:00 PM", "11:00 PM"}, _
    {"01:15 PM", "03:15 PM", "05:15 PM", "07:15 PM", "09:15 PM", "11:15 PM"}, _
    {"01:30 PM", "03:30 PM", "05:30 PM", "07:30 PM", "09:30 PM", "11:30 PM"}, _
    {"01:45 PM", "03:45 PM", "05:45 PM", "07:45 PM", "09:45 PM", "11:45 PM"}}

    ListBox listBox1 = new ListBox(4)
    listBox1.initialize();

    addItems (String strTimes (,))
    setSelectedItem(String) = strTimes(,)


    MessageBox.Show(output, "Movie selection", _
    MessageBoxButtons.OK

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim f As Form2 = New Form2()
    f.Show()

    if (strTimes > "7:00 PM")
    then price = $8.50

    if (strTimes < "7:00 PM")
    then price = $4.50

    End Sub


    So with that, what I am trying to do is
    1) Add a new form to prompt the user for payment and make changes
    2) Add a new button on this form to allow the showing of the ticket(s)
    3) The ticket(s) should be another form. It must contain the name of the movie, the date and time of the movie, and the number of tickets

    so that it will continue 3 forms

    1st form-Allows the user to select movie, times, and number of tickets. It also shows the amount due

    2nd Form – Prompts the user for payment. Makes change if necessary. If amount paid is not enough, send warning message and repeat the prompt. The second form prompts the showing of the third form (tickets)

    3rd form- Ticket(s) with all the proper information: name of movie, time, date, and # of tickets

    If anyone can give me some assistance I would appreciate it a lot. Thanks.

  2. #2
    Frenzied Member MrGTI's Avatar
    Join Date
    Oct 2000
    Location
    Ontario, Canada
    Posts
    1,277

    Wink

    I'll happily make the program for you ...... for a price. $$
    ~Peter


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width