Inheritance: System.Windows.Forms.Form
Exemplo n.º 1
0
        private void btnSelectProto_Click(object sender, EventArgs e)
        {
            frmSelectObject sp = new frmSelectObject("Select critter proto for NPC.", "");

            foreach (CritterProto cr in CrProtos)
            {
                sp.AddObject((object)cr);
            }
            sp.ShowDialog();
            if (sp.Selected != 0)
            {
                numProto.Value = sp.Selected;
                if (CurrentNpc != null)
                {
                    CurrentNpc.Proto.Id = sp.Selected;
                }
            }
            RefreshNpcList();
        }
Exemplo n.º 2
0
        private void btnSelectFaction_Click(object sender, EventArgs e)
        {
            frmSelectObject sp = new frmSelectObject("Select faction for group.", "");

            foreach (Faction cr in Factions)
            {
                sp.AddObject((object)cr);
            }
            sp.ShowDialog();
            if (sp.Selected != 0)
            {
                numFactionId.Value = sp.Selected;
                if (CurrentGroup != null)
                {
                    CurrentGroup.FactionId = sp.Selected;
                }
            }
            RefreshGroupList();
        }
Exemplo n.º 3
0
        private void btnSelectDialog_Click(object sender, EventArgs e)
        {
            frmSelectObject sp = new frmSelectObject("Select dialog for NPC.", "Double-click on dialog to open it in dialog editor.");

            foreach (ListDialog dlg in DialogParser.GetDialogs(true))
            {
                sp.AddObject((object)dlg);
            }
            sp.ShowDialog();
            if (sp.Selected != 0)
            {
                numDialog.Value = sp.Selected;
                if (CurrentNpc != null)
                {
                    CurrentNpc.Dialog.Id = sp.Selected;
                }
            }
            RefreshNpcList();
        }
Exemplo n.º 4
0
 private void btnSelectProto_Click(object sender, EventArgs e)
 {
     frmSelectObject sp = new frmSelectObject("Select critter proto for NPC.", "");
     foreach (CritterProto cr in CrProtos)
         sp.AddObject((object)cr);
     sp.ShowDialog();
     if (sp.Selected != 0)
     {
         numProto.Value = sp.Selected;
         if (CurrentNpc!=null)
             CurrentNpc.Proto.Id = sp.Selected;
     }
     RefreshNpcList();
 }
Exemplo n.º 5
0
 private void btnSelectFaction_Click(object sender, EventArgs e)
 {
     frmSelectObject sp = new frmSelectObject("Select faction for group.", "");
     foreach (Faction cr in Factions)
         sp.AddObject((object)cr);
     sp.ShowDialog();
     if (sp.Selected != 0)
     {
         numFactionId.Value = sp.Selected;
         if (CurrentGroup != null)
             CurrentGroup.FactionId = sp.Selected;
     }
     RefreshGroupList();
 }
Exemplo n.º 6
0
 private void btnSelectDialog_Click(object sender, EventArgs e)
 {
     frmSelectObject sp = new frmSelectObject("Select dialog for NPC.", "Double-click on dialog to open it in dialog editor.");
     foreach (ListDialog dlg in DialogParser.GetDialogs(true))
         sp.AddObject((object)dlg);
     sp.ShowDialog();
     if (sp.Selected != 0)
     {
         numDialog.Value = sp.Selected;
         if (CurrentNpc != null)
             CurrentNpc.Dialog.Id=sp.Selected;
     }
     RefreshNpcList();
 }