Results 1 to 3 of 3

Thread: Client 1.22 issues (sorry)

  1. #1
    Registered User
    Join Date
    Jun 2006
    Posts
    32

    Client 1.22 issues (sorry)

    Great work, Seaxouri !
    Very enjoyable version so far.

    I have but one issue, and that is the same I brought up last time I looked at the 1.20 client.. For us Non-US users, we still need the Numformat reference in the mapreader class. Otherwise the map won't draw.

    mapreader.cs :
    Code:
      using System.Globalization;
         public static class MapReader
         	{
         		private static Settings Settings = Settings.GetSingleton();
         		public static MapFileLine WorkingLine = new MapFileLine();
         		public static MapFileLabel WorkingLabel = new MapFileLabel();
         		
         		public static MapFileLineType ParseLine(string line)
         		{
         		    IFormatProvider NumFormat = new CultureInfo("en-US");
         
         			string [] tokens;
         			int r, g, b;
         			
         			if (line == null)
         				return MapFileLineType.MLT_EOF;
         
         			if (line.Length == 0)
         				return MapFileLineType.MLT_EMPTY;
         
         			if (line.Length < 10)
         				return MapFileLineType.MLT_INVALID;
         			
         			try
         			{
         				tokens = line.Remove(0,1).Split(',');
         				switch (line[0])
         				{
         					// Line parsing
         					case 'L':
         						WorkingLine.from.x = (int)float.Parse(tokens[0], NumFormat);
         						WorkingLine.from.y = (int)float.Parse(tokens[1], NumFormat);
         						WorkingLine.from.z = (int)float.Parse(tokens[2], NumFormat);
         						WorkingLine.to.x = (int)float.Parse(tokens[3], NumFormat);
         						WorkingLine.to.y = (int)float.Parse(tokens[4], NumFormat);
         						WorkingLine.to.z = (int)float.Parse(tokens[5], NumFormat);
         						r = int.Parse(tokens[6]);
         						g = int.Parse(tokens[7]);
         						b = int.Parse(tokens[8]);
         						if (Settings.forceBlack)
         						{
         							WorkingLine.pen = Pens.Black;
         						}
         						else
         						{
         							WorkingLine.pen = ColorManager.FindNearestSystemPen(Color.FromArgb(r, g, b));
         							if (WorkingLine.pen.Color == Pens.DarkGray.Color)
         								WorkingLine.pen = Pens.Black;
         						}
         						return MapFileLineType.MLT_LINE;
         						
         					// Label parsing
         					case 'P':
         						WorkingLabel.at.x = (int)float.Parse(tokens[0], NumFormat);
         						WorkingLabel.at.y = (int)float.Parse(tokens[1], NumFormat);
         						WorkingLabel.at.z = (int)float.Parse(tokens[2], NumFormat);
         						r = int.Parse(tokens[3]);
         						g = int.Parse(tokens[4]);
         						b = int.Parse(tokens[5]);
         						if (Settings.forceBlack)
         							WorkingLabel.brush = (SolidBrush) Brushes.Black;
         						else
         							WorkingLabel.brush = ColorManager.FindNearestSystemBrush(Color.FromArgb(r, g, b));
         						WorkingLabel.fontSize = Math.Max(0,Math.Min(int.Parse(tokens[6]), 3));
         						WorkingLabel.text = tokens[7];
         						return MapFileLineType.MLT_LABEL;
         
         					// Anything else is invalid
         					default:
         						return MapFileLineType.MLT_INVALID;
         				}
         			}
         			catch (Exception ex)
         			{
         				Logger.Debug("MapReader:ParseLine - " + ex.Message);
         				return MapFileLineType.MLT_INVALID;
         			}
         		}
    In order to build "on your own", you need to remove the "clickonce" manifest signing under project properties.
    Also, solution looks for structures.cs, which does not exist so we need to delete/remove that from project reference list.

    I can live with it.

    Bobster

  2. #2
    Registered User
    Join Date
    Dec 2004
    Posts
    284

    Re: Client 1.22 issues (sorry)

    ok, I will fix that next pass.

    The clickonce stuff I tried to setup but had miserable failures. I will remove all that junk.
    Thanks for all the donuts.

  3. #3
    Registered User
    Join Date
    Dec 2004
    Posts
    284

    Re: Client 1.22 issues (sorry)

    Hmm I don't see Structures.cs anywhere. I thought I removed that long ago. I see it in the old csproj file, but I don't use that.
    Last edited by Seaxouri; 01-20-2008 at 03:35 PM.
    Thanks for all the donuts.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

You may post new threads
You may post replies
You may post attachments
You may edit your posts
HTML code is Off
vB code is On
Smilies are On
[IMG] code is On