コード例 #1
0
ファイル: AddQuote.cs プロジェクト: emilydani/megaDesk3
        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;
        }
コード例 #2
0
        private void MainMenuButton_Click(object sender, EventArgs e)
        {
            MainMenuForm mainMenuForm = new MainMenuForm();

            mainMenuForm.Show();
            this.Close();
        }
コード例 #3
0
ファイル: MainMenu.cs プロジェクト: emilydani/megaDesk3
 public MainMenuForm()
 {
     InitializeComponent();
     addQuote          = new AddQuote(this);
     searchAllQuotes   = new SearchAllQuotes(this);
     viewAllQuotes     = new ViewAllQuotes(this);
     this.mainMenuForm = this;
 }
コード例 #4
0
 public SearchAllQuotes(MainMenuForm mainMenuForm)
 {
     InitializeComponent();
     mainMenu = mainMenuForm;
     SearchComboBox.DataSource = Enum.GetValues(typeof(Desk.DesktopMaterial));
 }
コード例 #5
0
 public ViewAllQuotes(MainMenuForm mainMenuForm)
 {
     InitializeComponent();
     mainMenu = mainMenuForm;
 }