I have 2 wpf applications. I need to send as parameter to one of them and in that one to change the parametr and in the other wpf application to use the new value of the variables.
My code :
1 WPF :
Forms.CreatRadar creatRadarWPF = new Forms.CreatRadar(azimuthStart,AzimuthEnd,Long,Lat,numOfRadars,listRadars);
creatRadarWPF.Show();
2 WPF :
public partial class CreatRadar : Window
{
private double AzimuthStart;
private double AzimuthEnd;
private double Long;
private double Lat;
private int numOfRadars;
private List<Radar> ListRadars;
public CreatRadar(double AzimuthStart, double AzimuthEnd, double Long, double Lat, int numOfRadars, List<MapSample.Radar> ListRadars)
{
InitializeComponent();
}
private void CreatRadarBtn_Click(object sender, RoutedEventArgs e)
{
this.AzimuthStart = double.Parse(txt_AzimuthStart.Text.ToString());
this.AzimuthEnd = double.Parse(txt_AzimuthEnd.Text.ToString());
this.Long = double.Parse(txt_Long.Text.ToString());
this.Lat = double.Parse(txt_Lat.Text.ToString());
this.ListRadars = ListRadars;
this.numOfRadars = numOfRadars;
this.numOfRadars++;
Radar RadarTemp = new Radar(numOfRadars, this.AzimuthStart, this.AzimuthEnd, this.Long, this.Lat, 1, 1);
this.ListRadars.Add(RadarTemp);
MapDrawManager.Instance.Draw(RadarTemp);
}
}
The error : Inconsistent accessibility : parameter type 'System.Collections.Generic.List' is less accessible than method 'MapSample.Forms.CreatRadar(double,double,double,double,int,System.Collections.Generic.List)'