Ejemplo n.º 1
0
        private void MainView_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.N && e.Control && e.Shift)
            {
                NewTopLevelComponentButton_Click(sender, e);
                return;
            }

            if (e.KeyCode == Keys.N && e.Control)
            {
                NewEmbeddedComponentButton_Click(sender, e);
                return;
            }

            if (e.KeyCode == Keys.F2)
            {
                RenameComponent_Click(sender, e);
                return;
            }

            if (e.KeyCode == Keys.Delete)
            {
                RemoveComponent_Click(sender, e);
                return;
            }

            if (e.KeyCode == Keys.R && e.Control)
            {
                CreateOpenXmlReport_Click(sender, e);
                return;
            }

            if (e.KeyCode == Keys.D1 && e.Control)
            {
                DatabaseSeeder.SeedData1();
                RefreshView();
                return;
            }

            if (e.KeyCode == Keys.D2 && e.Control)
            {
                DatabaseSeeder.SeedData2();
                RefreshView();
            }

            if (e.KeyCode == Keys.D3 && e.Control)
            {
                DatabaseSeeder.SeedData3();
                RefreshView();
            }
        }
Ejemplo n.º 2
0
        private async void Seed1_Click(object sender, RoutedEventArgs e)
        {
            await DatabaseSeeder.SeedData1();

            FacultiesButton.Command.Execute("faculties");
        }
Ejemplo n.º 3
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            DatabaseSeeder.SeedData1();

            RefreshView();
        }