private void InitializeDefaultChanel() { mConfigFile = new CREFConfigFile(); mParmConnection = new CREFConectionParms(); mParmConnection.mIP = mConfigFile.GetDefaultIP(); mParmConnection.mPort = mConfigFile.GetDefaultPort(); mParmConnection.mFamily = 2; mFileNameVM = mConfigFile.GetDefaultFileNameVM(); }
public CREFConectionParms GetParametersConnection() { CREFConectionParms lParms = new CREFConectionParms(); lParms.mIP = IP1.Value.ToString() + "."; lParms.mIP += IP2.Value.ToString() + "."; lParms.mIP += IP3.Value.ToString() + "."; lParms.mIP += IP4.Value.ToString(); lParms.mPort = (int)Port.Value; lParms.mFamily = 2; return(lParms); }
public MainWindow(CREFConectionParms aParm, System.String aFileNameVM) { InitializeComponent(); System.String[] lIP = aParm.mIP.Split('.'); if (lIP.Length == 4) { IP1.Value = Convert.ToUInt16(lIP[0]); IP2.Value = Convert.ToUInt16(lIP[1]); IP3.Value = Convert.ToUInt16(lIP[2]); IP4.Value = Convert.ToUInt16(lIP[3]); } Port.Value = aParm.mPort; FileNameVM.Text = aFileNameVM; }