Exemplo n.º 1
0
        private bool LoadStartingData()
        {
            foreach (FileSearchResults fsr in StartingEntries)
            {
                if (fsr.Line.StartsWith("starting,config,"))
                {
                    ConfigFile = fsr.Line.Replace("starting,config,", string.Empty);
                }

                if (fsr.Line.StartsWith("starting,map,"))
                {
                    MapFile = fsr.Line.Replace("starting,map,", string.Empty);
                }

                if (fsr.Line.StartsWith("starting,startDateTime,"))
                {
                    StartingDateTime = fsr.Line.Replace("starting,startDateTime,", string.Empty);
                }

                if (fsr.Line.StartsWith("starting,encoderTransform,"))
                {
                    StartingStatusEventArgs = new StatusEventArgs(fsr.Line, true);
                }

                if (fsr.Line.StartsWith("starting,laser"))
                {
                    string[] spl = fsr.Line.Split(',');
                    if (!spl[1].Contains("Name"))
                    {
                        Devices.Add(spl[1]);
                        StartingRangeDeviceCurrentReadings.Add(new RangeDeviceEventArgs(fsr.Line, true));
                    }
                }
            }

            if (ConfigFile.Equals(string.Empty))
            {
                return(false);
            }
            if (MapFile.Equals(string.Empty))
            {
                return(false);
            }
            if (StartingDateTime.Equals(string.Empty))
            {
                return(false);
            }
            if (ConfigFile.Equals(string.Empty))
            {
                return(false);
            }

            return(true);
        }