7 partial class ConfigurationControl
13 private void InitPlacesValues()
15 string[] allowedFileFormats = {
"Ascii",
"Pcd" };
19 foreach (
string fileFormat
in allowedFileFormats)
21 this.comboBoxFileFormat.Items.Add(fileFormat);
23 if (this.configuration.Places.FileFormat.ToString() == fileFormat)
24 this.comboBoxFileFormat.SelectedIndex = i;
28 this.comboBoxFileFormat.SelectedIndexChanged += this.comboBoxFileFormat_SelectedIndexChanged;
30 this.textBoxImagePath.Text = this.configuration.Places.ImageSubPath;
31 this.textBoxLogPath.Text = this.configuration.Places.LogSubPath;
32 this.textBoxLastFilePath.Text = this.configuration.Places.LastFilePath;
34 this.checkBoxSaveImages.Checked = this.configuration.Places.SaveImages;
36 this.checkBoxSaveImages.CheckedChanged += this.CheckBoxSaveImagesOnCheckedChanged;
46 private void comboBoxFileFormat_SelectedIndexChanged(
object sender, EventArgs e)
48 this.configuration.Places.FileFormat =
EnumHelper.ParseEnum<
FileFormat>(this.comboBoxFileFormat.Text);
59 private void CheckBoxSaveImagesOnCheckedChanged(
object sender, EventArgs eventArgs)
61 this.configuration.Places.SaveImages = this.checkBoxSaveImages.Checked;
66 private void buttonLoadPathDefaults_Click(
object sender, EventArgs e)
68 this.DetachPlacesEvents();
69 this.comboBoxFileFormat.Items.Clear();
71 this.InitPlacesValues();
74 private void DetachPlacesEvents()
76 this.comboBoxFileFormat.SelectedIndexChanged -= this.comboBoxFileFormat_SelectedIndexChanged;
77 this.checkBoxSaveImages.CheckedChanged -= this.CheckBoxSaveImagesOnCheckedChanged;
static Places CreateDefaultPlaces()
Creates the default places.
FileFormat
File output format
Class for accessing the configuration.