private void editValue() { InterfaceMgr.Instance.setFloatingValueSentDelegate(new InterfaceMgr.FloatingValueSent(this.setTrackCB)); Point point = this.m_parent.PointToScreen(new Point(this.btnEdit.Rectangle.Right, this.btnEdit.Y + 0x22)); FloatingInput.openDisband(point.X, point.Y, this.tbTroopsDisband.Value, this.tbTroopsDisband.Max, this.m_parent); }
public static void close() { if (Instance != null) { Instance.Close(); Instance = null; } }
public static void open(int x, int y, int startingValue, int maxV, Form parent) { close(); Instance = new FloatingInput(); Instance.Location = new Point(x, y); Instance.init(startingValue, maxV); Instance.Show(parent); }
public static void openDisband(int x, int y, int startingValue, int maxV, Form parent) { close(); Instance = new FloatingInput(); Instance.Location = new Point(x, y); Instance.MinimumSize = new Size(60, 0x13); Instance.Size = new Size(60, 0x13); Instance.MaximumSize = new Size(60, 0x13); Instance.textBox1.BackColor = Color.FromArgb(0x4a, 0x56, 0x5c); Instance.textBox1.ForeColor = ARGBColors.White; Instance.BackColor = Color.FromArgb(0x4a, 0x56, 0x5c); Instance.init(startingValue, maxV); Instance.Show(parent); }
private void editSendValue() { CustomSelfDrawPanel.CSDButton clickedControl = (CustomSelfDrawPanel.CSDButton)base.ClickedControl; int num = 0xfc; switch (clickedControl.Data) { case 1: this.currentTrack = this.peasantsTrack; break; case 2: this.currentTrack = this.archerTrack; num += 40; break; case 3: this.currentTrack = this.pikemanTrack; num += 80; break; case 4: this.currentTrack = this.swordsmanTrack; num += 120; break; case 5: this.currentTrack = this.catapultTrack; num += 160; break; } InterfaceMgr.Instance.setFloatingValueSentDelegate(new InterfaceMgr.FloatingValueSent(this.setTrackCB)); Point point = InterfaceMgr.Instance.ParentForm.PointToScreen(new Point(base.Location.X + 680, base.Location.Y + num)); FloatingInput.open(point.X, point.Y, this.currentTrack.Value, this.currentTrack.Max, InterfaceMgr.Instance.ParentForm); }