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(); }
protected virtual void OnRISettingsLoad(DSShared.Windows.RegistrySaveLoadEventArgs e) { }
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); }
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")); }