public ExporterDialog() { InitializeComponent(); WriteRuntime.Load(); InsertionPoint.SelectedIndex = WriteRuntime.InsertionPoint; SkipSmallerThan.Value = WriteRuntime.SkipSmallerThan; SkipInteriorDetails.Checked = WriteRuntime.SkipInteriorDetails; CollectTextures.Checked = WriteRuntime.CollectTextures; UnicodeSupport.Checked = WriteRuntime.UnicodeSupport; GeometryOptimization.Checked = WriteRuntime.GeometryOptimization; levelOfDetail.Value = WriteRuntime.levelOfDetail; }
private void button1_Click(object sender, EventArgs e) { this.SaveFileDialog.Filter = "COLLADA file|*.dae"; this.SaveFileDialog.Title = "保存 COLLADA(.dae)"; if (this.SaveFileDialog.ShowDialog() == DialogResult.Cancel) { base.DialogResult = DialogResult.None; } //TODO 设置一个工具类来全局存储访问这些数据,保存这些值是为了下一次打开软件还是上一次的设置,避免重复设置。 WriteRuntime.InsertionPoint = InsertionPoint.SelectedIndex; WriteRuntime.SkipSmallerThan = SkipSmallerThan.Value; WriteRuntime.SkipInteriorDetails = SkipInteriorDetails.Checked; WriteRuntime.CollectTextures = CollectTextures.Checked; WriteRuntime.UnicodeSupport = UnicodeSupport.Checked; WriteRuntime.GeometryOptimization = GeometryOptimization.Checked; WriteRuntime.levelOfDetail = levelOfDetail.Value; WriteRuntime.Save(); }