// The DLLEntry method must receive two arguments as shown below public void DLLEntry(string[] ClipboardText, string dllCfgFilePath) { XMLRecord xrec = new XMLRecord(dllCfgFilePath); ADObjectSearcherWindow MainDLLWindow = new ADObjectSearcherWindow(ClipboardText, xrec) { // Set display parameters of the new DLL window //MainDLLWindow.Left = 0; //MainDLLWindow.Top = 0; //MainDLLWindow.Topmost = true; Owner = Application.Current.MainWindow, ShowInTaskbar = false }; // NOTE: Do not call any GUI stuff here, it will break the loading of the DLL //MessageBox.Show("dllCfgFilePath: " + dllCfgFilePath); // Show the window of the DLL as a dialog instead of a regular window //MainDLLWindow.Show(); MainDLLWindow.ShowDialog(); }
public ADObjectSearcherWindow(string[] ClipboardText, XMLRecord xmlRecord) { InitializeComponent(); textBlockWildcardWarning.Visibility = Visibility.Hidden; // Put the domain name into the textbox textBoxDomainName.Text = SearchADO.GetCurrentDomain(); foreach (string cs in ClipboardText) { //MainDataGridEntry tempData = new MainDataGridEntry { LookupName = cs, LdapQueryString = $"(samaccountname={cs})" }; MainDataGridEntry tempData = new MainDataGridEntry { LookupName = cs, LdapQueryString = $"(|(sAMAccountName={cs})(cn={cs})(mail={cs}))" }; gridDataEntries.Add(tempData); } dataGrid.ItemsSource = gridDataEntries; dataGrid.SelectionMode = DataGridSelectionMode.Extended; dataGrid.SelectionUnit = DataGridSelectionUnit.CellOrRowHeader; }