Пример #1
0
        public CommandForm(string id)
        {
            InitializeComponent();
            List <string> commands = ServerCommands.GetCommandsList();

            foreach (var cmd in commands)
            {
                combo_command.Items.Add(cmd);
            }
            this.Text      += id;
            label_cmd.Text += id;
        }
Пример #2
0
        private void button_ok_Click(object sender, EventArgs e)
        {
            List <string> cmds      = ServerCommands.GetCommandsList();
            bool          isCorrect = cmds.Any(cmd => combo_command.Text.Contains((cmd)));

            if (isCorrect)
            {
                Command           = combo_command.Text;
                this.DialogResult = DialogResult.OK;
                this.Close();
            }
            else
            {
                MessageBox.Show("Niepoprawna komenda");
            }
        }
Пример #3
0
        public MainForm()
        {
            InitializeComponent();
            this.statusLabel_status.Text = "Bezczynny";
            ImageList imgList = new ImageList();

            imgList.Images.Add("connected", Resources.user_available);
            imgList.Images.Add("disconnected", Resources.user_invisible);
            lv_clients.SmallImageList = imgList;
            List <string> commands = ServerCommands.GetCommandsList();

            foreach (string cmd in commands)
            {
                combo_command.Items.Add(cmd);
            }
        }