public void AssignRawParameters() { List <string> paramlist = new List <string>(); string rdata = RawParameters.Replace(Environment.NewLine, "~"); var lines = rdata.Split('~'); foreach (var line in lines) { if (!line.StartsWith("//")) { var items = line.Split(';'); foreach (var item in items) { var s = item.Trim(); paramlist.Add(item.Trim()); } } } foreach (var item in paramlist) { //text if (item.StartsWith("DefTextSize=")) { DefTextSize = item.Replace("DefTextSize=", string.Empty); } else if (item.StartsWith("DefTextShift=")) { DefTextShift = item.Replace("DefTextShift=", string.Empty); } else if (item.StartsWith("DefTextWidth=")) { DefTextWidth = item.Replace("DefTextWidth=", string.Empty); } else if (item.StartsWith("DefFontSize=")) { DefFontSize = item.Replace("DefFontSize=", string.Empty); } else if (item.StartsWith("DefFontName=")) { DefFontName = item.Replace("DefFontName=", string.Empty); } else if (item.StartsWith("DefFontColor=")) { DefFontColor = item.Replace("DefFontColor=", string.Empty); } else if (item.StartsWith("DefTextAlignH=")) { DefTextAlignH = item.Replace("DefTextAlignH=", string.Empty); } else if (item.StartsWith("DefTextAlignV=")) { DefTextAlignV = item.Replace("DefTextAlignV=", string.Empty); } else if (item.StartsWith("DefTextBck=")) { DefTextBck = item.Replace("DefTextBck=", string.Empty); } else if (item.StartsWith("DefFontStyle=")) { DefFontStyle = item.Replace("DefFontStyle=", string.Empty); } //visual else if (item.StartsWith("DefVisX=")) { DefVisX = item.Replace("DefVisX=", string.Empty); } else if (item.StartsWith("DefVisY=")) { DefVisY = item.Replace("DefVisY=", string.Empty); } else if (item.StartsWith("DefVisSize=")) { DefVisSize = item.Replace("DefVisSize=", string.Empty); } else if (item.StartsWith("DefVisSpeed=")) { DefVisSpeed = item.Replace("DefVisSpeed=", string.Empty); } else if (item.StartsWith("DefVisLM=")) { DefVisLM = item.Replace("DefVisLM=", string.Empty); } else if (item.StartsWith("DefVisLC=")) { DefVisLC = item.Replace("DefVisLC=", string.Empty); } else if (item.StartsWith("DefVisFile=")) { DefVisFile = item.Replace("DefVisFile=", string.Empty); } // Other else if (item.StartsWith("PackStory=")) { packStory = (item.Replace("PackStory=", string.Empty) == "1"); } else if (item.StartsWith("PackImage=")) { packImage = (item.Replace("PackImage=", string.Empty) == "1"); } else if (item.StartsWith("PackSound=")) { packSound = (item.Replace("PackSound=", string.Empty) == "1"); } else if (item.StartsWith("PackVideo=")) { packVideo = (item.Replace("PackVideo=", string.Empty) == "1"); } } }