Ejemplo n.º 1
0
		public static void Init(Palette p, DSShared.PathInfo paths)
		{
			currentPalette = p;
			pckHash = new Dictionary<Palette, Dictionary<string, PckFile>>();		

			VarCollection vars = new VarCollection(new StreamReader(File.OpenRead(paths.ToString())));

			Directory.SetCurrentDirectory(paths.Path);

			xConsole.Init(20);
			KeyVal kv = null;

			while((kv=vars.ReadLine())!=null)
			{
				switch (kv.Keyword)
				{					
		/* mapedit */case "mapdata":
						tileInfo = new TilesetDesc(kv.Rest, vars);
						break;
		/* mapedit */case "images": 
						imageInfo = new ImageInfo(kv.Rest, vars); 
						break;
					case "useBlanks":
						Globals.UseBlanks = bool.Parse(kv.Rest);
						break;
					default:
						if (ParseLine != null)
							ParseLine(kv, vars);
						else
							xConsole.AddLine("Error in paths file: " + kv);
						break;
				}
			}

			vars.BaseStream.Close();
		}
Ejemplo n.º 2
0
		protected virtual void OnRISettingsLoad(DSShared.Windows.RegistrySaveLoadEventArgs e) { }
Ejemplo n.º 3
0
		protected override void OnRISettingsSave(DSShared.Windows.RegistrySaveLoadEventArgs e)
		{
			RegistryKey riKey = e.OpenKey;
			foreach (MenuItem mi in visibleHash.Keys)
				riKey.SetValue("vis" + visibleHash[mi].ToString(), mi.Checked);
		}
Ejemplo n.º 4
0
		protected override void OnRISettingsLoad(DSShared.Windows.RegistrySaveLoadEventArgs e)
		{
			bottom.Height = 74;
			RegistryKey riKey = e.OpenKey;

			foreach (MenuItem mi in visibleHash.Keys)
				mi.Checked = bool.Parse((string)riKey.GetValue("vis" + visibleHash[mi].ToString(), "true"));
		}