private void WriteToTextFile(string path)
        {
            var writer = new TextMatrixEquationWriter(path);

            writer.Write(Entity);
            writer.Close();
        }
Exemple #2
0
        private void button_saveAsBinary_Click(object sender, EventArgs e)
        {
            if (Entity == null)
            {
                Geo.Utils.FormUtil.ShowWarningMessageBox("请先读取或生成矩阵再试。"); return;
            }
            SaveFileDialog dlg = new SaveFileDialog();

            dlg.Filter   = Setting.BinaryMatrixEquationFileExtension;
            dlg.FileName = "equation";
            if (dlg.ShowDialog() == DialogResult.OK)
            {
                var path   = dlg.FileName;
                var writer = new TextMatrixEquationWriter(path);
                writer.Write(Entity);
                writer.Close();
                Geo.Utils.FormUtil.ShowOkAndOpenDirectory(Path.GetDirectoryName(path));
            }
        }