예제 #1
0
        public frmNPCEditor(DataTypes.CivilianProfile ThisNPC)
        {
            InitializeComponent();
            ChangeMade = false;

            NPC = ThisNPC;
            PopulateFields();
        }
예제 #2
0
        private void lstNPCs_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (lstNPCs.SelectedIndex > -1)
            {
                DataTypes.CivilianProfile EditCiviy = new DataTypes.CivilianProfile();
                EditCiviy = Event.NPCs[lstNPCs.SelectedIndex];
                frmNPCEditor NewForm = new frmNPCEditor(EditCiviy);
                NewForm.ShowDialog();

                EditCiviy = NewForm.NPC;
                Event.NPCs[lstNPCs.SelectedIndex] = EditCiviy;
                GetAllNPCs();
            }
        }
예제 #3
0
        private void cmdAddNPC_Click(object sender, EventArgs e)
        {
            DataTypes.CivilianProfile NewCiviy = new DataTypes.CivilianProfile();
            frmNPCEditor NewForm = new frmNPCEditor(NewCiviy);

            NewForm.ShowDialog();

            NewCiviy = NewForm.NPC;
            if (NewCiviy.name != null)
            {
                if (Event.NPCs == null)
                {
                    Event.NPCs = new List <DataTypes.CivilianProfile>();
                }
                Event.NPCs.Add(NewCiviy);
            }
            GetAllNPCs();
        }
        private void lstNPCs_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (lstNPCs.SelectedIndex > -1)
            {
                DataTypes.CivilianProfile EditCiviy = new DataTypes.CivilianProfile();
                EditCiviy = Room.Civilians[lstNPCs.SelectedIndex];
                frmNPCEditor NewForm = new frmNPCEditor(EditCiviy);
                NewForm.ShowDialog();

                EditCiviy = NewForm.NPC;
                Room.Civilians[lstNPCs.SelectedIndex] = EditCiviy;
                GetAllNPCs();
            }
        }
        private void cmdAddNPC_Click(object sender, EventArgs e)
        {
            DataTypes.CivilianProfile NewCiviy = new DataTypes.CivilianProfile();
            frmNPCEditor NewForm = new frmNPCEditor(NewCiviy);
            NewForm.ShowDialog();

            NewCiviy = NewForm.NPC;
            if (NewCiviy.name != null)
            {
                if (Room.Civilians == null) Room.Civilians = new List<DataTypes.CivilianProfile>();
                Room.Civilians.Add(NewCiviy);
            }
            GetAllNPCs();
        }