Beispiel #1
0
 private void newToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (TextDialog textDialog = new TextDialog("Port selection", "Specify the ports for this capture:", string.Empty))
         if (textDialog.ShowDialog() == DialogResult.OK)
             NewSession(textDialog.Result == string.Empty ? Enumerable.Empty<string>() : textDialog.Result.Split(' '));
 }
Beispiel #2
0
        private void changeNameToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (streamsList.SelectedItems.Count == 1)
            {
                StreamListItem streamListItem = (StreamListItem)streamsList.SelectedItems[0].Tag;

                using (TextDialog textDialog = new TextDialog("Stream Name", "Please enter the new name for the stream", streamListItem.Stream.Name))
                    if (textDialog.ShowDialog() == DialogResult.OK)
                        SetName(streamsList.SelectedItems[0], textDialog.Result);
            }
        }