Beispiel #1
0
        public AddQuote(MainMenuForm mainMenuForm)
        {
            InitializeComponent();
            mainMenu = mainMenuForm;
            this.SaveQuote.Enabled = false;

            //Assigns the current date without getting user input
            DateTime currentDate = new DateTime();

            currentDate = DateTime.Now;

            string stringDate = currentDate.ToString("MM/dd/yyyy");

            this.setDate(stringDate);

            //Sets ArrayList of DesktopMaterial
            ArrayList materials     = new ArrayList();
            int       enumlen       = Enum.GetValues(typeof(Desk.DesktopMaterial)).Length;
            Array     materialNames = Enum.GetValues(typeof(Desk.DesktopMaterial));

            for (int i = 0; i < enumlen; i++)
            {
                materials.Add(materialNames.GetValue(i));
            }

            this.Material.DataSource = materials;
        }
Beispiel #2
0
        private void MainMenuButton_Click(object sender, EventArgs e)
        {
            MainMenuForm mainMenuForm = new MainMenuForm();

            mainMenuForm.Show();
            this.Close();
        }
Beispiel #3
0
 public MainMenuForm()
 {
     InitializeComponent();
     addQuote          = new AddQuote(this);
     searchAllQuotes   = new SearchAllQuotes(this);
     viewAllQuotes     = new ViewAllQuotes(this);
     this.mainMenuForm = this;
 }
Beispiel #4
0
 public SearchAllQuotes(MainMenuForm mainMenuForm)
 {
     InitializeComponent();
     mainMenu = mainMenuForm;
     SearchComboBox.DataSource = Enum.GetValues(typeof(Desk.DesktopMaterial));
 }
Beispiel #5
0
 public ViewAllQuotes(MainMenuForm mainMenuForm)
 {
     InitializeComponent();
     mainMenu = mainMenuForm;
 }