예제 #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();
            }
        }
예제 #2
0
        private async void Seed2_Click(object sender, RoutedEventArgs e)
        {
            await DatabaseSeeder.SeedData2();

            FacultiesButton.Command.Execute("faculties");
        }