public void ShowEditProtocolWindow(Protocol protocol)
 {
     var window = new ProtocolPropertiesWindow(protocol);
     window.ShowDialog();
 }
 public void CreateProtocol()
 {
     var protocol = new Protocol {
         Name = "New protocol",
         Packets = new List<Packet>()
     };
     Protocols = Protocols ?? new List<Protocol>();
     var window = new ProtocolPropertiesWindow(protocol);
     var showDialog = window.ShowDialog();
     if (showDialog != null && (bool) showDialog)
         Protocols.Add(protocol);
 }