Save() public static méthode

public static Save ( string name, byte bytes ) : void
name string
bytes byte
Résultat void
        private void btnOk_Click(object sender, EventArgs e)
        {
            SaveProperties();
            TableSerializer.Save("lstMaps", lstMaps.SaveState());

            if ((Loc.Pid != LoadedPid) && !LocParser.IsFreeLocationPID(Loc.Pid))
            {
                Message.Show("Location PID is already in use.", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            if (string.IsNullOrEmpty(Loc.Name))
            {
                Message.Show("You have to select a name for the location.", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            if (Loc.Maps.Count == 0)
            {
                Message.Show("The location has no maps.", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            if (Loc.Size == 0)
            {
                Message.Show("Location has no size.", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            this.Close();
        }
Exemple #2
0
 private void btnDone_Click(object sender, EventArgs e)
 {
     TableSerializer.Save("lstMaps", lstMaps.SaveState());
     this.Close();
 }