public FormTelemetrySettings(TelemetryWriter telemetryWriter, Dictionary <string, string> ReportDescriptions, string ExportFilePrefix = "", string WindowTitle = "") { InitializeComponent(); _telemetryWriter = telemetryWriter; _reportDescriptions = ReportDescriptions; _filePrefix = ExportFilePrefix; if (!String.IsNullOrEmpty(WindowTitle)) { this.Text = WindowTitle; } _formConfig = new ConfigSaverClass(this, true, true); _formConfig.StoreControlInfo = false; _formConfig.SaveEnabled = true; _formConfig.RestoreFormValues(); InitialiseGrid(); if (String.IsNullOrEmpty(_telemetryWriter.ExportDirectory)) { radioButtonExportToApplicationFolder.Checked = true; textBoxExportFolder.Enabled = false; buttonBrowseExportFolder.Enabled = false; } else { textBoxExportFolder.Text = _telemetryWriter.ExportDirectory; radioButtonExportToOtherFolder.Checked = true; } }
public FormTelemetryDisplay(TelemetryWriter telemetryWriter, string windowTitle = "Race Telemetry") { InitializeComponent(); // Attach our form configuration saver this.Text = windowTitle; _formConfig = new ConfigSaverClass(this, true, true); _formConfig.StoreControlInfo = false; _formConfig.SaveEnabled = true; _formConfig.RestorePreviousSize = false; _formConfig.RestoreFormValues(); _telemetryWriter = telemetryWriter; _telemetryWriter.SelectionChanged += _telemetryWriter_SelectionChanged; telemetryTable1.SetTelemetryWriter(_telemetryWriter); this.AutoSize = true; this.AutoSizeMode = AutoSizeMode.GrowAndShrink; this.elementHost1.AutoSize = true; this.elementHost1.Dock = DockStyle.Fill; }