I have a Mainform with many controls on it.Now I'm trying to access this controls from a thread.Should I use invoke statement for each instruction?!!! or there is another way? a piece of my code is:
switch (currentSetting.CurrentFFMDisplayMode)
{
case FFM_DisplayMode.Polar:
this.display.Visible = false;
this.gauge1.init(10000, 450);
this.gauge1.Visible = true;
this.AzimuthWaterfall.Visible = false;
this.FreqWaterfall.Visible = false;
this.histogram1.Visible = false;
this.LevelSlider.Visible = true;
this.QualitySlider.Visible = true;
this.LevelSlider.Visible = true;
this.QualitySlider.Visible = true;
this.textBoxLevel.Visible = true;
this.textBoxQuality.Visible = true;
this.textBoxAzimuth.Visible = true;
this.textBoxPrevious.Visible = true;
this.textBoxfloatE.Visible = true;
this.labelPrevious.Visible = true;
this.labelLevelErr.Visible = false;
this.labelQualityErr.Visible = false;
this.LevelLine.Visible = false;
this.Levelarraw.Visible = false;
this.freqLine.Visible = false;
this.spectVLine.Visible = false;
this.labelSNR.Visible = false;
this.button_dec_freq_spec.Visible = false;
this.button_inc_freq_spec.Visible = false;
this.combobox_Span.Visible = false;
this.label_Spectrum.Visible = false;
this.FreqLable.Visible = false;
label1.Visible = true;
label2.Visible = true;
label3.Visible = true;
label4.Visible = true;
label5.Visible = true;
label6.Visible = true;
label7.Visible = true;
label8.Visible = true;
label9.Visible = true;
label10.Visible = true;
label11.Visible = true;
label12.Visible = true;
l20.Visible = true;
LevelTHlabel.Visible = true;
qTHlabel.Visible = true;