public void generateSettingsOutput() { List <String> settings = new List <String>(); //Top Printer Settings settings.Add("Print Setting : " + ddPrintSettings.SelectedItem.ToString()); settings.Add("Filamenet Setting : " + ddFilament.SelectedItem.ToString()); settings.Add("Printer Setting : " + ddPrinter.SelectedItem.ToString()); //Advanced Settings Group settings.Add("XY Size Compensation Setting : " + ddPrinter.SelectedItem.ToString()); //Infill Settings Group settings.Add("Bottom Infill Pattern : " + ddBottomInfill.SelectedItem.ToString()); settings.Add("Fill Density : " + ddFillDens.SelectedItem.ToString()); settings.Add("Fill Gaps : " + cbGaps.Checked.ToString()); settings.Add("Fill Pattern : " + ddFillPattern.SelectedItem.ToString()); settings.Add("Infill before Perimeters : " + cbInitalBeforePerim.Checked.ToString()); settings.Add("Top Infill Pattern : " + ddTopInfill.SelectedItem.ToString()); //Layers and Perimeters settings.Add("External Perimeters First : " + cbExternalPerims.Checked.ToString()); settings.Add("First Layer Height : " + txtFirstLayer.Text.ToString()); settings.Add("Layer Height : " + ddFillPattern.SelectedItem.ToString()); settings.Add("Perimeters : " + txtPerimeters.Value.ToString()); settings.Add("Sprial Vase : " + cbSpiral.Checked.ToString()); Form gcodeOutput = new frmOutput(settings); gcodeOutput.Show(); }
private List <String> generateDefaultConfigFile() { //Reader StreamReader config = new StreamReader(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"config_default.txt")); List <String> settings = new List <string>(); try { do { string line = config.ReadLine(); int indexOf = line.IndexOf('='); if (indexOf != -1) { settings.Add(line.Substring(0, line.Length)); } }while (config.Peek() != -1); } catch { settings.Add("File is empty"); } finally { config.Close(); } Form gcodeTxTOutput = new frmOutput(settings); gcodeTxTOutput.Show(); return(settings); //Console.WriteLine(settings.ToString()); //Top Printer Settings (Default) //settings.Add("printer_settings_id"); //Advanced Settings Group //Infill Settings Group //Layers and Perimeters }