Exemplo n.º 1
0
        public static int Execute(IDictionary <string, IDictionary <string, int> > ships)
        {
            var dialog = new LogonDialog
            {
                ShipNames = ships,
            };

            if (dialog.ShowDialog() != DialogResult.OK)
            {
                return(0);
            }
            return(ships[dialog.comboBoxState.Text][dialog.comboBoxShip.Text]);
        }
Exemplo n.º 2
0
        public static Logon Execute(IDictionary <string, string[]> ships)
        {
            var dialog = new LogonDialog
            {
                ShipNames = ships,
            };

            if (dialog.ShowDialog() != DialogResult.OK)
            {
                return(null);
            }
            return(new Logon
            {
                Nation = dialog.comboBoxState.Text,
                ShipName = dialog.comboBoxShip.Text,
                Password = string.Empty,
            });
        }