private void btnTest_Click(object sender, EventArgs e) { if ((cfg.MdkPath == null) || (!File.Exists(cfg.MdkPath))) { MessageBox.Show("请选择正确的文件"); btnSelMDKPath.Focus(); return; } cfg.MacroDefine = FromMDK5.GetMacroDefine(cfg.MdkPath); cfg.IncludePath = FromMDK5.getIncludePath(cfg.MdkPath); cfg.projguid = Guid.NewGuid().ToString("B"); ToVC2017.createvcxproj(cfg); ToVC2017.createfilters(cfg); ToVC2017.createsln(cfg); label5.Text = "转换完:" + DateTime.Now.ToString("HH:mm:ss"); btnOpen.Visible = true; }
private void btnTrans_Click(object sender, EventArgs e) { var builder = new StringBuilder(); if ((cfg.MdkPath == null) || (!File.Exists(cfg.MdkPath))) { MessageBox.Show("请选择正确的文件"); btnSelMDKPath.Focus(); return; } cfg.MacroDefine = FromMDK5.GetMacroDefine(cfg.MdkPath); cfg.IncludePath = FromMDK5.getIncludePath(cfg.MdkPath); builder.AppendLine(cfg.MacroDefine); builder.AppendLine(cfg.IncludePath); FromMDK5.getGroups(builder, cfg.MdkPath); richTextBox1.Text = builder.ToString(); }