Ejemplo n.º 1
0
        private void menuLoadMap_Click(object sender, EventArgs e)
        {
            IniUtil ini = new IniUtil(Application.StartupPath + "\\option.ini");

            menuLoadMap.Checked = !menuLoadMap.Checked;
            ini.SetIniValue("Option", "Loading_Map", menuLoadMap.Checked.ToString());

            if (menuLoadMap.Checked)
            {
                mapBitmap     = GetMap(listLand.SelectedIndex);
                pbMap.Image   = mapBitmap;
                pbMap.Visible = true;
            }
            else
            {
                pbMap.Visible = false;
            }
        }
Ejemplo n.º 2
0
        private void LandEditor_Load(object sender, EventArgs e)
        {
            pbClickLands[0].Image = landBitmaps[0];
            IniUtil ini = null;

            if (!File.Exists(Application.StartupPath + "\\option.ini"))
            {
                FileStream f = File.Create(Application.StartupPath + "\\option.ini");
                f.Close();

                ini = new IniUtil(Application.StartupPath + "\\option.ini");
                ini.SetIniValue("Option", "Loading_Map", bool.TrueString);
            }

            ini = new IniUtil(Application.StartupPath + "\\option.ini");
            String value = ini.GetIniValue("Option", "Loading_Map");

            menuLoadMap.Checked = bool.Parse(value);
        }