for the icon marks works fine but it does not draw the lines, this is the code:
var utils = new Utils();
Font f = new Font("Arial", 15, FontStyle.Bold);
System.Drawing.Image im = null;
var sf = new Shapefile();
sf.CreateNew(filename, ShpfileType.SHP_POLYLINE);
m_layerHandle = axMap1.AddLayer(sf, true);
MapWinGIS.Shape myShape = new Shape();
myShape.Create(ShpfileType.SHP_POLYLINE);
sf = axMap1.get_Shapefile(m_layerHandle);
for (int i = 0; i < numberofpoints; i++)
{
im = System.Drawing.Image.FromFile(Path + filename + ".png");
Graphics graf = Graphics.FromImage(im);
graf.DrawString(Convert.ToString(i + 1), f, Brushes.Black, 0, 0);
im.Save(Path + filename + Convert.ToString(i + 1) + ".png");
MapWinGIS.Image image1 = new MapWinGIS.Image();
image1.Open(Path + filename + Convert.ToString(i + 1) + ".png", ImageType.USE_FILE_EXTENSION, true, null);
string categoryName = Convert.ToString(i);
ShapefileCategory ct = sf.Categories.Add(categoryName);
ct.DrawingOptions.PointType = tkPointSymbolType.ptSymbolPicture;
ct.DrawingOptions.Picture = image1;
ct.DrawingOptions.FrameVisible = true;
ct.DrawingOptions.LineVisible = true;
ct.DrawingOptions.LineColor = utils.ColorByName(tkMapColor.Red);
ct.DrawingOptions.LineWidth = 4;
ct.DrawingOptions.FillVisible = true;
sf.set_ShapeCategory(i, i);
MapWinGIS.Point myPoint = new MapWinGIS.Point();
myPoint.x = Convert.ToDouble(pathline.GetValue(i, 1).ToString());
myPoint.y = Convert.ToDouble(pathline.GetValue(i, 2).ToString());
myShape.InsertPoint(myPoint, ref i);
}
sf.EditAddShape(myShape);
sf.CollisionMode = tkCollisionMode.AllowCollisions;
axMap1.Redraw();