Esempio n. 1
0
        public void LoadEvo(string[] parse)
        {
            evolution         = new Evolutions.Evolution();
            evolution.Name    = parse[1];
            evolution.Species = parse[2].ToInt();

            for (int i = 0; i < parse[3].ToInt(); i++)
            {
                evolution.Branches.Add(new Evolutions.EvolutionBranch());
                evolution.Branches[i].Name       = parse[4 + i * 6];
                evolution.Branches[i].NewSpecies = parse[5 + i * 6].ToInt();
                evolution.Branches[i].ReqScript  = parse[6 + i * 6].ToInt();
                evolution.Branches[i].Data1      = parse[7 + i * 6].ToInt();
                evolution.Branches[i].Data2      = parse[8 + i * 6].ToInt();
                evolution.Branches[i].Data3      = parse[9 + i * 6].ToInt();
            }

            pnlEvoList.Visible   = false;
            pnlEvoEditor.Visible = true;
            this.Size            = new System.Drawing.Size(pnlEvoEditor.Width, pnlEvoEditor.Height);

            txtName.Text           = evolution.Name;
            nudSpecies.Value       = evolution.Species;
            nudMaxBranchEvos.Value = evolution.Branches.Count;


            btnEdit.Text = "Edit";
        }
Esempio n. 2
0
 void btnEditorCancel_Click(object sender, SdlDotNet.Widgets.MouseButtonEventArgs e)
 {
     evoNum               = -1;
     evolution            = null;
     pnlEvoEditor.Visible = false;
     pnlEvoList.Visible   = true;
     this.Size            = new System.Drawing.Size(pnlEvoList.Width, pnlEvoList.Height);
 }
Esempio n. 3
0
        void btnEditorOK_Click(object sender, SdlDotNet.Widgets.MouseButtonEventArgs e)
        {
            evolution.Name    = txtName.Text;
            evolution.Species = nudSpecies.Value;

            Messenger.SendSaveEvo(evoNum, evolution, nudMaxBranchEvos.Value);

            evoNum               = -1;
            evolution            = null;
            pnlEvoEditor.Visible = false;
            pnlEvoList.Visible   = true;
            this.Size            = new System.Drawing.Size(pnlEvoList.Width, pnlEvoList.Height);
        }
        void btnEditorOK_Click(object sender, SdlDotNet.Widgets.MouseButtonEventArgs e)
        {
            evolution.Name = txtName.Text;
            evolution.Species = nudSpecies.Value;

            Messenger.SendSaveEvo(evoNum, evolution, nudMaxBranchEvos.Value);

            evoNum = -1;
            evolution = null;
            pnlEvoEditor.Visible = false;
            pnlEvoList.Visible = true;
            this.Size = new System.Drawing.Size(pnlEvoList.Width, pnlEvoList.Height);
        }
 void btnEditorCancel_Click(object sender, SdlDotNet.Widgets.MouseButtonEventArgs e)
 {
     evoNum = -1;
     evolution = null;
     pnlEvoEditor.Visible = false;
     pnlEvoList.Visible = true;
     this.Size = new System.Drawing.Size(pnlEvoList.Width, pnlEvoList.Height);
 }
        public void LoadEvo(string[] parse)
        {
            evolution = new Evolutions.Evolution();
            evolution.Name = parse[1];
            evolution.Species = parse[2].ToInt();

            for (int i = 0; i < parse[3].ToInt(); i++) {
                evolution.Branches.Add(new Evolutions.EvolutionBranch());
                evolution.Branches[i].Name = parse[4 + i * 6];
                evolution.Branches[i].NewSpecies = parse[5 + i * 6].ToInt();
                evolution.Branches[i].ReqScript = parse[6 + i * 6].ToInt();
                evolution.Branches[i].Data1 = parse[7 + i * 6].ToInt();
                evolution.Branches[i].Data2 = parse[8 + i * 6].ToInt();
                evolution.Branches[i].Data3 = parse[9 + i * 6].ToInt();

            }

            pnlEvoList.Visible = false;
            pnlEvoEditor.Visible = true;
            this.Size = new System.Drawing.Size(pnlEvoEditor.Width, pnlEvoEditor.Height);

            txtName.Text = evolution.Name;
            nudSpecies.Value = evolution.Species;
            nudMaxBranchEvos.Value = evolution.Branches.Count;

            btnEdit.Text = "Edit";
        }