//Overides
        #region Overides
        protected override void OnActivate()
        {
            // Read parent values on activation, after it will be handled by messaging
            MainViewModel ParentViewModel = (MainViewModel)this.Parent;

            _IP_Address_ParTranViewModel = ParentViewModel.IP_Address;
            _Port_ParTransViewModel      = ParentViewModel.Port;

            //Background worker attach events
            _transferParameters_Worker.DoWork             += DoWork_Transfer;
            _transferParameters_Worker.RunWorkerCompleted += WorkCompleted_Transfer;
            _transferParameters_Worker.ProgressChanged    += ProgressChanged_Transfer;

            //subscribe to the event messages
            _eventAggregator.Subscribe(this);

            XML_Handler XML_FileHandler = new XML_Handler();

            FormatPar_Struc_ToFormatParViewModel.path = System.IO.Directory.GetCurrentDirectory();
            FormatPar_Struc_ToFormatParViewModel.NumberOfFormatVar             = _conHandler.ReadCommSetting("NumberOfFormatVar");
            FormatPar_Struc_ToFormatParViewModel.SettingsFileName              = _conHandler.ReadCommSetting("SettingsFileName");
            FormatPar_Struc_ToFormatParViewModel.RootElementName               = _conHandler.ReadCommSetting("RootElementName");
            FormatPar_Struc_ToFormatParViewModel.NumFormatVarElementName       = _conHandler.ReadCommSetting("NumFormatVarElementName");
            FormatPar_Struc_ToFormatParViewModel.NumForVarAttributeName        = _conHandler.ReadCommSetting("NumForVarAttributeName");
            FormatPar_Struc_ToFormatParViewModel.FormatElementName             = _conHandler.ReadCommSetting("FormatElementName");
            FormatPar_Struc_ToFormatParViewModel.FormatParElementName          = _conHandler.ReadCommSetting("FormatParElementName");
            FormatPar_Struc_ToFormatParViewModel.FormatParAttributeName        = _conHandler.ReadCommSetting("FormatParAttributeName");
            FormatPar_Struc_ToFormatParViewModel.FormatParAttributeValue       = _conHandler.ReadCommSetting("FormatParAttributeValue");
            FormatPar_Struc_ToFormatParViewModel.PointerStringElementName      = _conHandler.ReadCommSetting("PointerStringElementName");
            FormatPar_Struc_ToFormatParViewModel.PointerStringAttributeName    = _conHandler.ReadCommSetting("PointerStringAttributeName");
            FormatPar_Struc_ToFormatParViewModel.PointerStringAttributeValue   = _conHandler.ReadCommSetting("PointerStringAttributeValue");
            FormatPar_Struc_ToFormatParViewModel.TransferReqElementName        = _conHandler.ReadCommSetting("TransferReqElementName");
            FormatPar_Struc_ToFormatParViewModel.TransferReqAttributeName      = _conHandler.ReadCommSetting("TransferReqAttributeName");
            FormatPar_Struc_ToFormatParViewModel.TransferReqAttributeValue     = _conHandler.ReadCommSetting("TransferReqAttributeValue");
            FormatPar_Struc_ToFormatParViewModel.ParValidElementName           = _conHandler.ReadCommSetting("ParValidElementName");
            FormatPar_Struc_ToFormatParViewModel.ParValidAttributeName         = _conHandler.ReadCommSetting("ParValidAttributeName");
            FormatPar_Struc_ToFormatParViewModel.ParValidAttributeValue        = _conHandler.ReadCommSetting("ParValidAttributeValue");
            FormatPar_Struc_ToFormatParViewModel.ParameterToSendElementName    = _conHandler.ReadCommSetting("ParameterToSendElementName");
            FormatPar_Struc_ToFormatParViewModel.ParameterToSendAttributeName  = _conHandler.ReadCommSetting("ParameterToSendAttributeName");
            FormatPar_Struc_ToFormatParViewModel.ParameterToSendAttributeValue = _conHandler.ReadCommSetting("ParameterToSendAttributeValue");

            //create Settings file if it doesn't exists
            if (!File.Exists(FormatPar_Struc_ToFormatParViewModel.SettingsFileName))
            {
                XML_FileHandler.Create_XMLfileStruc(FormatPar_Struc_ToFormatParViewModel);
            }

            _percentage       = 0;
            _percentageString = _percentage.ToString() + "%";

            //read settings.xml file
            _list_FormatVariables = XML_FileHandler.ReturnListOfXMLAttributes(FormatPar_Struc_ToFormatParViewModel.SettingsFileName, _path, FormatPar_Struc_ToFormatParViewModel.FormatElementName, FormatPar_Struc_ToFormatParViewModel.FormatParElementName, FormatPar_Struc_ToFormatParViewModel.FormatParAttributeName);
            _list_FormatValues    = XML_FileHandler.ReturnListOfXMLAttributes(FormatPar_Struc_ToFormatParViewModel.SettingsFileName, _path, FormatPar_Struc_ToFormatParViewModel.FormatElementName, FormatPar_Struc_ToFormatParViewModel.FormatParElementName, FormatPar_Struc_ToFormatParViewModel.FormatParAttributeValue);
            _list_PointerVariable = XML_FileHandler.ReturnListOfXMLAttributes(FormatPar_Struc_ToFormatParViewModel.SettingsFileName, _path, FormatPar_Struc_ToFormatParViewModel.PointerStringElementName, "", FormatPar_Struc_ToFormatParViewModel.PointerStringAttributeName);
            _list_TransferReq     = XML_FileHandler.ReturnListOfXMLAttributes(FormatPar_Struc_ToFormatParViewModel.SettingsFileName, _path, FormatPar_Struc_ToFormatParViewModel.TransferReqElementName, "", FormatPar_Struc_ToFormatParViewModel.TransferReqAttributeName);
            _list_ParValid        = XML_FileHandler.ReturnListOfXMLAttributes(FormatPar_Struc_ToFormatParViewModel.SettingsFileName, _path, FormatPar_Struc_ToFormatParViewModel.ParValidElementName, "", FormatPar_Struc_ToFormatParViewModel.ParValidAttributeName);
            _list_ParameterToSend = XML_FileHandler.ReturnListOfXMLAttributes(FormatPar_Struc_ToFormatParViewModel.SettingsFileName, _path, FormatPar_Struc_ToFormatParViewModel.ParameterToSendElementName, "", FormatPar_Struc_ToFormatParViewModel.ParameterToSendAttributeName);

            //add strings from the lists in the collections
            foreach (String listItem in _list_FormatVariables)
            {
                Parameters par = new Parameters {
                    Name = listItem
                };
                FormatVariables_ObservableCollection.Add(par);
            }
            foreach (String listItem in _list_FormatValues)
            {
                Parameters par = new Parameters {
                    Name = listItem
                };
                FormatValues_ObservableCollection.Add(par);
            }
            foreach (String listItem in _list_PointerVariable)
            {
                Parameters par = new Parameters {
                    Name = listItem
                };
                Pointer_ObservableCollection.Add(par);
            }
            foreach (String listItem in _list_TransferReq)
            {
                Parameters par = new Parameters {
                    Name = listItem
                };
                TransferReq_ObservableCollection.Add(par);
            }
            foreach (String listItem in _list_ParValid)
            {
                Parameters par = new Parameters {
                    Name = listItem
                };
                ParValid_ObservableCollection.Add(par);
            }
            foreach (String listItem in _list_ParameterToSend)
            {
                Parameters par = new Parameters {
                    Name = listItem
                };
                ParameterToSend_ObservableCollection.Add(par);
            }

            base.OnActivate();
        }