Esempio n. 1
0
        private void button_write_Click(object sender, EventArgs e)
        {
            if (BaseLineFile == null)
            {
                Geo.Utils.FormUtil.ShowWarningMessageBox("请先读取!");
                return;
            }
            var outpath = Path.Combine(Setting.TempDirectory, "Out_" + BaseLineFile.Name);

            LgoAscBaseLineFileWriter writer = new LgoAscBaseLineFileWriter(outpath);

            writer.Write(BaseLineFile);

            Geo.Utils.FormUtil.ShowIfOpenDirMessageBox(Setting.TempDirectory);
        }
        private void button_exportLgoasc_Click(object sender, EventArgs e)
        {
            if (BaseLineNets == null || BaseLineNets.Count == 0)
            {
                return;
            }
            BaseLineFileConverter converter = new BaseLineFileConverter();
            int i = 0;

            foreach (var item in BaseLineNets)
            {
                var outnet = converter.Build(item);

                var outpath = Path.Combine(Setting.TempDirectory, i + "-" + outnet.BaseLines.First().Key.Name + "_etc" + outnet.BaseLines.Count + Setting.BaseLineFileOfLgoExtension);
                LgoAscBaseLineFileWriter writer = new LgoAscBaseLineFileWriter(outpath);
                writer.Write(outnet);
                i++;
            }

            Geo.Utils.FormUtil.ShowIfOpenDirMessageBox(Setting.TempDirectory);
        }