private void storageButton_Click(object sender, EventArgs e) { MAStorageForm storage = new MAStorageForm(); // sending current value storage.IsStoreSmoothed = this.isStoreSmoothed; storage.IsStorePredicted = this.isStorePredicted; storage.IsStoreResidual = this.isStoreResidual; storage.SmoothedName = this.smoothedName; storage.PredictedName = this.predictedName; storage.ResidualName = this.residualName; storage.ShowDialog(); if (storage.DialogResult == DialogResult.OK) { //accepting selected value this.isStoreSmoothed = storage.IsStoreSmoothed; this.isStorePredicted = storage.IsStorePredicted; this.isStoreResidual = storage.IsStoreResidual; this.smoothedName = storage.SmoothedName; this.predictedName = storage.PredictedName; this.residualName = storage.ResidualName; } }