Public feed #726369

Something

public text v1 · immutable
Raw Edit
·published 2007-10-05 03:29 UTC
rendered paste body
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Ayalon
{
    public partial class MainForm : Form
    {
        bool form2opened = false;
        bool form3opened = false;
        public MainForm()
        {
            InitializeComponent();
        }

        private void exitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Close();
        }

        private void abToolStripMenuItem_Click(object sender, EventArgs e)
        {
            MessageBox.Show("Ayalon Cameras 1.0\nBy Yoni Roll\nBased on the program by Genia Malinsky and Alon Tzur", "About");
        }

        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            switch (comboBox1.SelectedIndex)
            {
                case 0:
                    Camera1.URL = @"http://ayalon.castup.net/gmembed.asp?hn=castupay07&sn=1&authi=414C58505F0A574C404F5D0548&autht=4D4F455556014F5544515C045444464C591349";
                    break;
                default:
                    break;
            }
        }

        private void Stop1_Click(object sender, EventArgs e)
        {
            Camera1.Ctlcontrols.stop();
        }

        private void toolStripTextBox1_TextChanged(object sender, EventArgs e)
        {
            try
            {
                double ratio = Convert.ToDouble(toolStripTextBox1.Text);
                if (ratio > 0)
                    Camera1.Size = new Size(Convert.ToInt32(320 * ratio), Convert.ToInt32(240 * ratio));
            }
            catch { };
        }
        
        private void part2ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (!form2opened)
                Form2 Form2inst=new Form2();
            Form2inst.Show();
        }

        private void part3ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (!form3opened)
                Form3 Form3inst=new Form3();
            Form3inst.Show();
        }
    }
}