예제 #1
0
        void EditShowDynamicFlagsButton_Click(object sender, EventArgs e)
        {
            CreatureEdit.DynamicFlags dynamic_flags = new CreatureEdit.DynamicFlags(Convert.ToInt32(EditBox_dynamicflags.Text));

            if (dynamic_flags.ShowDialog() == DialogResult.OK)
            {
                EditBox_dynamicflags.Text = dynamic_flags.ToString();
            }
        }
예제 #2
0
        void LocationDynamicFlagsButton_Click(object sender, EventArgs e)
        {
            if (LocationDataGrid.SelectedCells.Count == 0)
            {
                MessageBox.Show("Error: Row is not selected!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                int current_flags = 0;

                if (LocationDataGrid.Rows[LocationDataGrid.CurrentCell.RowIndex].Cells[19].Value != null)
                {
                    current_flags = Convert.ToInt32(LocationDataGrid.Rows[LocationDataGrid.CurrentCell.RowIndex].Cells[19].Value.ToString());
                }

                CreatureEdit.DynamicFlags dynamic_flags = new CreatureEdit.DynamicFlags(current_flags);

                if (dynamic_flags.ShowDialog() == DialogResult.OK)
                {
                    LocationDataGrid.Rows[LocationDataGrid.CurrentCell.RowIndex].Cells[19].Value = dynamic_flags.ToString();
                }
            }
        }