Beispiel #1
0
        private void CreateProject()
        {
            FileManager.INFO_PROJECT info = new FileManager.INFO_PROJECT();
            info.count_block = 0;
            info.Language    = GetPresentLanguage();
            info.name        = textBox_name.Text;
            info.Type        = GetPresentType();
            info.path        = textBox_path.Text;
            info.path_icon   = textBox_icon.Text;

            Boolean result = FileManager.ManagerProjects.CreateProject(info);

            if (result)
            {
                if (onNewCreateProject != null)
                {
                    onNewCreateProject(info);
                }
            }
            else
            {
                String error = FileManager.ManagerProjects.GetError();
                LMD_GUI.LMD_WindowError we = new LMD_WindowError(error);
                we.ShowDialog();

                if (we.Result == LMD_WindowError.RESULT.HELP)
                {
                    info.name         = FileManager.ManagerProjects.CorrectName(info.name, "_");
                    textBox_name.Text = info.name;
                }
            }
        }
        private void LeftPanel_clickItems(Button button, FileManager.ManagerProjects.INFO_ALL_PROJECTS info)
        {
            Boolean result = FileManager.ManagerProjects.LoadProject(info);

            if (result)
            {
            }
            else if (!result)
            {
                String error = FileManager.ManagerProjects.GetError();
                LMD_GUI.LMD_WindowError we = new LMD_WindowError(error);
                we.ShowDialog();
            }
        }