Пример #1
0
 public static void InitWindow(Forms form)
 {
     switch (form)
     {
         case Forms.fLogin:
             fLogin = new FormLogin();
             break;
         case Forms.fModules:
             fModules = new FormModule();
             break;
         case Forms.fTasks:
             fTasks = new FormTasks();
             break;
         case Forms.fTask:
             fTask = new FormTask();
             break;
         case Forms.fPhenomenas:
             fPhenomenas = new FormPhenomenas();
             break;
         case Forms.fAllIdeas:
             fAllIdeas = new FormAllIdeas();
             break;
         case Forms.fAboutCreativeSchool:
             fAboutCreativeSchool = new FormAboutCreativeThinking();
             break;
         case Forms.fAboutEducation:
             fAboutEducation = new FormAboutEducation();
             break;
         case Forms.fReg:
             fReg = new FormRegistration();
             break;
         case Forms.fAboutProgramm:
             fAboutProgramm = new FormAboutProgramm();
             break;
         case Forms.fMailSender:
             fMailSender = new FormMailSender();
             break;
         case Forms.fShowAllIdeas:
             fShowAllIdeas = new FormShowAllIdeas();
             break;
         case Forms.fEditIdea:
             fEditIdea = new FormEditOrAddIdea();
             break;
         case Forms.fNewModule:
             fNewModule = new FormNewModule();
             break;
         case Forms.fEditModule:
             fEditModule = new FormEditModule();
             break;
         case Forms.fNewTask:
             fNewTask = new FormNewTask();
             break;
         case Forms.fEditTask:
             fEditTask = new FormEditTask();
             break;
         case Forms.fDeleteConform:
             fDeleteConform = new FormDeleteConform();
             break;
         case Forms.fEditModuleEntity:
             fEditModuleEntity = new FormEditModuleEntity();
             break;
         case Forms.fEditTaskEntity:
             fEditTaskEntity = new FormEditTaskEntity();
             break;
         case Forms.fDeleteConformTask:
             fDeleteConformTask = new FormDeleteConformTask();
             break;
         case Forms.fFullImage:
             fFullImage = new FormFullImage();
             break;
         case Forms.fPhenomenasEditor:
             fPhenomenasEditor = new FormPhenomenasEditor();
             break;
         default:
             break;
     }
 }
Пример #2
0
        static void Main()
        {
            if (DateTime.Today > endProgram)
            {
                /*MessageBox.Show("Пробный период истек, обратитесь к разработчикам за поддержкой.");
                return;*/
            }
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            p = new ProgramInstance();
            if (Program.p.AdminMode)
            {
                fModules = new FormModule();
                Application.Run(fModules);
            }
            else
            {
                fLogin = new FormLogin();
                Application.Run(fLogin);
            }
        }