예제 #1
0
        ///Событие. Главное меню.
        private void MainMenu_N1_1Click(object sender, EventArgs e)
        {
            if (sender == MainMenu_N1_1)
            {
                Environment.Exit(0);
            }
            if (sender == MainMenu_N2_3)
            {
                System.Diagnostics.Process.Start(FBAPath.PathAdditional + @"ColorTable.html");
            }
            if (sender == MainMenu_N2_4)
            {
                new FormReg().Show();
            }
            if (sender == MainMenu_N2_5)
            {
                System.Diagnostics.Process.Start(FBAPath.PathAdditional + @"ASCII.html");
            }
            if (sender == MainMenu_N2_6)
            {
                System.Diagnostics.Process.Start(FBAPath.PathAdditional + @"DataTimeFormat.html");
            }

            if (sender == MainMenu_N2_8)
            {
                FBAFile.FileRunEXESimple(FBAPath.PathMain + @"Updater.exe");
            }
            if (sender == MainMenu_N2_9)
            {
                FBAFile.FileRunEXESimple(FBAPath.PathMain + @"ServerApp.exe");
            }
            if (sender == MainMenu_N2_10)
            {
                FBAFile.FileRunEXESimple(FBAPath.PathMain + @"ClientApp.exe");
            }

            if (sender == MainMenu_N4_2)
            {
                new FormAbout().Show();
            }
            if (sender == MainMenu_N2_13)
            {
                new FormGrant().Show();
            }
            if (sender == MainMenu_N2_15)
            {
                new FormDDL().Show();
            }
            if (sender == MainMenu_N2_16)
            {
                new FormModel().Show();
            }
            if (sender == MainMenu_N2_17)
            {
                new FormSQL().Show();
            }
            if (sender == MainMenu_N2_18)
            {
                new FormUpdate().Show();
            }
            if (sender == MainMenu_N2_19)
            {
                new FormImage().Show();
            }
            if (sender == MainMenu_N2_20)
            {
                new FormText().Show();
            }
            if (sender == MainMenu_N2_21)
            {
                new FormParam().Show();
            }
            if (sender == MainMenu_N2_22)
            {
                new FormStatus().Show();
            }
            if (sender == MainMenu_N3_1)
            {
                new FormConList().Show();
            }
            if (sender == MainMenu_N2_23)
            {
                new ProjectService("").Show();
            }

            //Выбор шрифт всех форм.
            if (sender == MainMenu_N3_2)
            {
                if (fontDialog1.ShowDialog() == DialogResult.OK)
                {
                    Var.font1 = fontDialog1.Font;
                }
            }
            if (sender == MainMenu_N3_3)
            {
                string Path = "";
                if (!FBAFile.DirChoose(Application.StartupPath, out Path))
                {
                    return;
                }
                sys.ShowSolutionStringCodeCount(Path);
            }

            //Сущности.
            if (sender == MainMenu_N2_24)
            {
                sys.ShowDirectorySimple("Entity", "", "", "", null, "SELECT * FROM fbaEntity", "");
            }

            //Атрибуты.
            if (sender == MainMenu_N2_25)
            {
                sys.ShowDirectorySimple("Attribute", "", "", "", null, "SELECT * FROM fbaAttribute", "");
            }

            //Таблицы.
            if (sender == MainMenu_N2_26)
            {
                sys.ShowDirectorySimple("Table", "", "", "", null, "SELECT * FROM fbaTable", "");
            }

            //Шаблоны отчетов.
            if (sender == MainMenu_N2_27)
            {
                new FormReport().Show();
            }

            if (sender == MainMenu_N2_7)
            {
                System.Diagnostics.Process.Start(@"https://docs.microsoft.com/ru-ru/dotnet/api/system.windows.media.brushes?view=netcore-3.0");
            }

            //Ошибки пользователей.
            if (sender == MainMenu_N2_28)
            {
                new FormError().Show();
            }

            //Справка
            if (sender == MainMenu_N4_1)
            {
                sys.ShowHelp();
            }
            //Help.ShowHelp(this, sys.PathHelp);

            //Форма для добавления методов сущностей.
            if (sender == MainMenu_N2_29)
            {
                new FormMethod().Show();
            }
        }