示例#1
0
        void fileDialog_FileDialogFoundHandler(object sender, EventArgs e)
        {
            ActionFileDialog fileDialog = sender as ActionFileDialog;

            //AddAction(fileDialog);
            AppContext.ActionModel.AddAction(fileDialog);
        }
示例#2
0
        //ActionFileDialog fileDialog = null;
        /// <summary>
        /// Sets a timer to watch for a file dialog box
        /// </summary>
        /// <param name="browser">Browser running this dialog</param>
        /// <param name="activeElement">Element to check after dialog is found</param>
        public void WatchFileUploadBox(BrowserWindow browser, IHTMLElement activeElement)
        {
            var fileDialog = new ActionFileDialog {
                ActiveElement = activeElement
            };

            fileDialog.SetFindMethod(activeElement);
            fileDialog.WaitForFileDialog(activeElement);
            fileDialog.FileDialogFoundHandler += new EventHandler(fileDialog_FileDialogFoundHandler);
        }