void Adapter(string name, IntPtr hWnd, Form f) { if (name == null) { return; } if (name == string.Empty) { name = "Unnamed"; } // Vista 64 hack if (name == "Save as" || name == "Enregistrer sous") { name = FileDialogTester.InitialFileDialogName; } Handler namedHandler = handlers[name] as Handler; if (namedHandler == null) { namedHandler = Add(name, (ModalFormActivatedHwnd) Delegate.CreateDelegate(typeof(ModalFormActivatedHwnd), this, "UnexpectedModal"), 0); } namedHandler.Invoke(hWnd); this.FormHandler = Adapter; }
private void Invoke(string name, IntPtr hWnd, Form form) { if (name == null) { return; } if (name == string.Empty) { name = "Unnamed"; } ModalFormHandler h = formHandler; formHandler = null; if (h == null) { h = UnexpectedModal; } h(name, hWnd, form); }
public static void SetModalFormHandler(NUnitFormTest formTest, ModalFormHandler modalFormHandler) { fFormTest = formTest; fFormTest.ModalFormHandler = modalFormHandler; }
public static void SetCreateItemHandler(NUnitFormTest formTest, ModalFormHandler createHandler) { RSD_SubHandler = createHandler; SetModalFormHandler(formTest, RSD_CreateItem_Handler); }
private void Invoke(string name, IntPtr hWnd, Form form) { if (name == null) return; if (name == string.Empty) name = "Unnamed"; ModalFormHandler h = formHandler; formHandler = null; if (h == null) h = UnexpectedModal; h(name, hWnd, form); }
void Adapter(string name, IntPtr hWnd, Form f) { if (name == null) return; if (name == string.Empty) name = "Unnamed"; // Vista 64 hack if (name == "Save as" || name == "Enregistrer sous") name = FileDialogTester.InitialFileDialogName; Handler namedHandler = handlers[name] as Handler; if (namedHandler == null) { namedHandler = Add(name, (ModalFormActivatedHwnd) Delegate.CreateDelegate(typeof(ModalFormActivatedHwnd), this, "UnexpectedModal"), 0); } namedHandler.Invoke(hWnd); this.FormHandler = Adapter; }
public void ExpectModal(string name, ModalFormActivated handler, bool expected) { this.FormHandler = Adapter; handlers[name] = new Handler(handler, (expected ? 1 : 0), name); }
public void ExpectModal(string name, ModalFormActivated handler, bool expected) { this.FormHandler = Adapter; handlers[name] = new Handler(handler, (expected ? 1 : 0), name); }