private void AddCipherDelegates(ToolStripMenuItem item, ICipherAdapter cipher, bool ignoreDecrypt, bool ignoreEncrypt) { if (!ignoreDecrypt) { var decItem = new ToolStripMenuItem("Decrypt"); decItem.Click += DecItem_Click; decItem.Tag = cipher; item?.DropDownItems.Add(decItem); } if (!ignoreEncrypt) { var encItem = new ToolStripMenuItem("Encrypt"); encItem.Click += EncItem_Click; encItem.Tag = cipher; item?.DropDownItems.Add(encItem); } }
public EncryptProcessor(ICipherAdapter cipherAdapter) { _cipherAdapter = cipherAdapter ?? throw new ArgumentNullException(nameof(cipherAdapter)); }