private void buildButton_Click(object sender, EventArgs e) { while (true) { if (string.IsNullOrEmpty(ConfigProject.ServerSrcDirectory) || string.IsNullOrEmpty(ConfigProject.ClientSrcDirectory) || string.IsNullOrEmpty(ConfigProject.DataOutputDirectory) ) { if (DialogResult.Cancel == MessageBox.Show("Build输出目录没有配置。请先设置。", "配置错误", MessageBoxButtons.OKCancel)) { return; } OpenFormProjectConfig(); continue; // check again. } if (System.IO.Path.GetFullPath(ConfigProject.DataOutputDirectory).StartsWith(ConfigEditor.GetHome())) { MessageBox.Show("数据输出目录不能是配置Home的子目录。"); OpenFormProjectConfig(); continue; } break; } FormBuildProgress progress = new FormBuildProgress(); progress.ShowDialog(); progress.StopAndWait(); progress.Dispose(); }
public void LoadAllDocument(FormBuildProgress progress = null) { ForEachFile((File file) => { if (file.Document == null) { file.OpenDocument(); progress?.AppendLine($"Load {file.Document.RelateName}", Color.Black); } return(true); }); }