Load() публичный статический Метод

public static Load ( string name ) : byte[]
name string
Результат byte[]
Пример #1
0
 private void frmEditMaps_Load(object sender, EventArgs e)
 {
     lstMaps.SetObjects(parser.GetMaps());
     lstMaps.RestoreState(TableSerializer.Load("lstMaps"));
 }
Пример #2
0
        private void frmEditLocation_Load(object sender, EventArgs e)
        {
            this.olvMusic.AspectToStringConverter = delegate(object x)
            {
                List <String> MusicNames = (List <String>)x;
                return(String.Format("{0}", Utils.ToCSV(", ", MusicNames)));
            };

            if (!NewLoc)
            {
                this.Text              = "Location - " + Loc.Name + ", PID = " + Loc.Pid;
                txtName.Text           = Loc.Name;
                txtWMName.Text         = Loc.WorldMapName;
                txtDescription.Text    = Loc.WorldMapDescription;
                txtEntranceScript.Text = Loc.EntranceScript;
                txtEntrance.Text       = Loc.Entrance;
                txtSignImagePath.Text  = Loc.WorldMapSignImagePath;
                txtTownImagePath.Text  = Loc.WorldMapTownImagePath;
                numXPos.Value          = Loc.X;
                numYPos.Value          = Loc.Y;
                numSize.Value          = Loc.Size;
                numPID.Value           = Loc.Pid;
                numMaxCopies.Value     = Loc.MaxPlayers;
                chkGeck.Checked        = Loc.GeckVisible;

                chkVisible.Checked   = Loc.Visible;
                chkEncounter.Checked = Loc.AutoGarbage;

                numPID.Enabled       = false;
                btnAssignPID.Enabled = false;

                txtFlags.Lines = Loc.Flags.ToArray();

                if (String.IsNullOrEmpty(txtTownImagePath.Text))
                {
                    btnEditTownMap.Enabled = false;
                }

                if (!Loc.OnWorldmap)
                {
                    btnRemoveFromWM.Visible = false;
                }
            }
            else
            {
                this.Text = "Location";
                btnRemoveFromWM.Visible = false;
                Loc           = new Location();
                numPID.Value  = LocParser.GetFreeLocationPID(1);
                numSize.Value = 24;
                if (chkEncounter.Checked)
                {
                    numMaxCopies.Enabled = false;
                    txtEntrance.Enabled  = false;
                }
                numMaxCopies.Value = 1;
                txtEntrance.Text   = "1";

                Loc.Modified = true;
                Loc.Maps     = new List <Map>();
            }

            lstMaps.RestoreState(TableSerializer.Load("lstMaps"));
            lstMaps.Items.Clear();
            if (Loc.Maps == null)
            {
                return;
            }
            lstMaps.SetObjects(Loc.Maps);
        }
Пример #3
0
 private void frmLocationEditor_Load(object sender, EventArgs e)
 {
     lstLocations.RestoreState(TableSerializer.Load("lstLocations"));
     lstLocations.SetObjects(Locations);
 }