예제 #1
0
 private void btn_DragDrop(Button btn, NumericLeftRight nlr, DragEventArgs e)
 {
     Data.ModData modData = ((Data.ModData)e.Data.GetData(typeof(Data.ModData))).Clone();
     lastDragBtn.Tag  = btn.Tag;
     lastDragBtn.Text = btn.Text;
     lastDragNlr.NumericUpDown.Maximum = nlr.NumericUpDown.Maximum;
     lastDragNlr.NumericUpDown.Value   = nlr.NumericUpDown.Value;
     btn.Tag  = modData;
     btn.Text = modData.description;
     nlr.NumericUpDown.Maximum = modData.mod.maxLevel;
     nlr.NumericUpDown.Value   = modData.level;
     ShowStats();
 }
예제 #2
0
 private void btnMod_Click(Button btn, NumericLeftRight nlr, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left)
     {
         return;
     }
     if (!btn.ClientRectangle.Contains(e.Location))
     {
         return;
     }
     Data.ModData modData = (Data.ModData)btn.Tag;
     if (modData.name == "")
     {
         return;
     }
     ((BindingSource)cbbModList.DataSource).Add(new KeyValuePair <string, Mod>(modData.name, modData.mod));
     btn.Tag  = new Data.ModData(new Mod(), "", "", 0);
     btn.Text = "";
     nlr.NumericUpDown.Value = nlr.NumericUpDown.Maximum = 0;
     ShowStats();
 }
예제 #3
0
 private void nlrMod_Click(NumericLeftRight nlr, Button btn)
 {
     Data.ModData modData = (Data.ModData)btn.Tag;
     btn.Tag = new Data.ModData(modData.mod, modData.name, modData.description, (int)nlr.NumericUpDown.Value);
     ShowStats();
 }