Ejemplo n.º 1
0
 //Handles message sending from server
 public void BtnSend_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrWhiteSpace(InputTextbox.Text))
     {
         MessageBox.Show(Properties.strings.enterMessage, Properties.strings.error, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
     else
     {
         WriteToAllClients("|| " + Properties.strings.server + "@" + serverIep.Address + " >> " + InputTextbox.Text);
         InputTextbox.Clear();
     }
 }
Ejemplo n.º 2
0
        private void InputButton_Click(object sender, EventArgs e)
        {
            OpenFileDialog inputFileDialog = new OpenFileDialog();

            inputFileDialog.Filter      = "Image files (*.webp)|*.webp|All files (*.*)|*.*";
            inputFileDialog.Multiselect = true;
            inputFileDialog.Title       = "Select file(s)";

            if (inputFileDialog.ShowDialog() == DialogResult.OK)
            {
                InputTextbox.Clear(); //Clear previous selection / files.
                foreach (string filePath in inputFileDialog.FileNames)
                {
                    InputTextbox.Text   += filePath + ";";
                    convertTextbox.Text += filePath.Replace(".webp", $".{outputType.SelectedItem.ToString()};");
                    //MessageBox.Show(filePath);
                }
            }
        }