Example #1
0
        private string get3dScript(int index)
        {
            string destination_name = destination_location[index];
            string location_name    = Path.GetFileName(destination_location[index]).Replace("xml", "gsm");

            if (!File.Exists(destination_location[index]))
            {
                convertToXml(location_name, destination_location[index]);
            }

            if (destination_location.Length > 2)
            {
                GsmXmlReader reader = new GsmXmlReader(destination_location[index]);
                ParamList.Add(reader.getParameters().xml_parameters);
                ParamList.Insert(index, reader.getParameters().xml_parameters);
                if (index == mainFileIndex)
                {
                    mainXmlDoc = reader;
                }
                return(reader.get3dScript().script3dText);
            }
            else
            {
                MessageBox.Show("No path found" + index.ToString() + "\r\n");
                return("");
            }
        }
Example #2
0
 private string get3dScript2(string filePath, int index)
 {
     if (File.Exists(filePath))
     {
         GsmXmlReader reader = new GsmXmlReader(filePath);
         ParamList.Add(reader.getParameters().xml_parameters);
         ParamList.Insert(index, reader.getParameters().xml_parameters);
         if (index == mainFileIndex)
         {
             mainXmlDoc = reader;
         }
         return(reader.get3dScript().script3dText);
     }
     else
     {
         MessageBox.Show("File : " + filePath + " not found!");
     }
     return("");
 }