Exemplo n.º 1
0
        private void EditETableButton_Click(object sender, EventArgs e)
        {
            if (CurrentTile.ETableId > 0)
            {
                ETableForm form = new ETableForm();
                form.Setup(Context, Zone, Zone.ETables[CurrentTile.ETableId - 1]);

                if (form.ShowDialog() == DialogResult.OK)
                {
                    form.Apply();
                    Context.UnsavedChanges = true;
                    Context.UpdateEncounters();
                }
            }
        }
Exemplo n.º 2
0
        private void Edit()
        {
            if (Options.SelectedIndex == -1)
            {
                return;
            }

            ETable et = Zone.ETables[Options.SelectedIndex];

            using (ETableForm child = new ETableForm())
            {
                child.Setup(Context, Zone, et);

                if (child.ShowDialog() == DialogResult.OK)
                {
                    child.Apply();
                    Context.UnsavedChanges = true;
                    Context.UpdateEncounters();
                }
            }
        }
Exemplo n.º 3
0
        public static ushort AddETable(Context context, Zone zone)
        {
            ETable et = new ETable();

            using (ETableForm child = new ETableForm())
            {
                child.Setup(context, zone, et);

                if (child.ShowDialog() == DialogResult.OK)
                {
                    child.Apply();
                    zone.ETables.Add(et);

                    context.UnsavedChanges = true;
                    context.UpdateEncounters();

                    return(zone.ETableCount);
                }
                else
                {
                    return(0);
                }
            }
        }