private void BuildUi() { lock (this.browserMutex) { this.form = new System.Windows.Forms.Form(); this.browser = new System.Windows.Forms.WebBrowser(); this.browser.Dock = System.Windows.Forms.DockStyle.Fill; this.form.Controls.Add(this.browser); this.form.Width = this.width; this.form.Height = this.height; this.form.Text = this.title; this.form.FormClosed += (sender, e) => { NoriHelper.QueueCloseWindowNotification(this); }; this.browser.ObjectForScripting = new JsBridge(this, this.browser); this.browser.AllowNavigation = false; this.browser.AllowWebBrowserDrop = false; this.browser.IsWebBrowserContextMenuEnabled = false; this.browser.ScrollBarsEnabled = false; this.form.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.browser.DocumentText = this.GetHtmlDocument(this.initialUiData); foreach (string value in this.sendUiDataQueue) { this.SendUiDataImplNoMutex(value); } this.sendUiDataQueue.Clear(); } }
/// <summary> /// This method is required for Windows Forms designer support. /// Do not change the method contents inside the source code editor. The Forms designer might /// not be able to load this method if it was changed manually. /// </summary> private void InitializeComponent() { this.webBrowser1 = new System.Windows.Forms.WebBrowser(); this.SuspendLayout(); // // webBrowser1 // this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill; this.webBrowser1.Location = new System.Drawing.Point(0, 0); this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20); this.webBrowser1.Name = "webBrowser1"; this.webBrowser1.Size = new System.Drawing.Size(609, 295); this.webBrowser1.TabIndex = 0; this.webBrowser1.Url = new System.Uri("https://www.youtube.com/watch?v=w76hgcNFu8A#t=198.782647", System.UriKind.Absolute); // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(609, 295); this.Controls.Add(this.webBrowser1); this.Name = "MainForm"; this.Text = "test2"; this.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.webBrowser1 = new System.Windows.Forms.WebBrowser(); this.SuspendLayout(); // // webBrowser1 // this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill; this.webBrowser1.Location = new System.Drawing.Point(0, 0); this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20); this.webBrowser1.Name = "webBrowser1"; this.webBrowser1.Size = new System.Drawing.Size(721, 544); this.webBrowser1.TabIndex = 0; // // SWFViewer // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(721, 544); this.Controls.Add(this.webBrowser1); this.Name = "SWFViewer"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "SWFViewer"; this.WindowState = System.Windows.Forms.FormWindowState.Maximized; this.ResumeLayout(false); }
/// <summary> /// Initializes a new instance of the <see cref="InternetExplorer" /> class /// </summary> /// <param name="winFormsBrowser">The windows forms browser</param> /// <param name="size">The size</param> /// <param name="defaultStyles">The default styles</param> public InternetExplorer(System.Windows.Forms.WebBrowser winFormsBrowser, Size size, DefaultStyleLookup defaultStyles) : base(size, defaultStyles) { _winFormsBrowser = winFormsBrowser; _msDocFactory = new MsHtmlDocumentFactory(defaultStyles); this.ConfigureBrowser(); }
private void ResetCookie(System.Windows.Forms.WebBrowser c_web) { try { System.Diagnostics.Process p = new System.Diagnostics.Process(); p.StartInfo.FileName = "cmd.exe"; // 關閉Shell的使用 p.StartInfo.UseShellExecute = false; // 重定向標準輸入 p.StartInfo.RedirectStandardInput = true; // 重定向標準輸出 p.StartInfo.RedirectStandardOutput = true; //重定向錯誤輸出 p.StartInfo.RedirectStandardError = true; p.StartInfo.CreateNoWindow = true; p.Start(); p.StandardInput.WriteLine("RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8"); p.StandardInput.WriteLine("exit"); } catch (Exception xx) { MessageBox.Show(xx + ""); } try { c_web.Document.Cookie.Remove(0, c_web.Document.Cookie.Length - 1); } catch { } string[] theCookies = System.IO.Directory.GetFiles(Environment.GetFolderPath(Environment.SpecialFolder.Cookies)); foreach (string currentFile in theCookies) { try { System.IO.File.Delete(currentFile); } catch { } } }
/// <summary> /// Instantiates a new IpcEventTreeModelAdapter. /// </summary> /// <param name="formWindow"></param> /// <param name="formTreeView"></param> public IpcEventTreeModelAdapter(Forms.IpcTreeWebWindow formWindow, Forms.IpcEventMonitorMdiWindow mdiWindow, System.Windows.Forms.TreeView formTreeView) { _webURL = "file:///{0}/Html/IpcEventMonitorPane.html"; _formWindow = formWindow; _mdiWindow = mdiWindow; _formTreeView = formTreeView; _webBrowser = _formWindow.WebBrowser1; //create utility bus _utilsBus = new Niawa.Utilities.UtilsServiceBus(); //set up ipc logging for this class (to log events that occur in the tree model) _evtWriter = new Niawa.MsEventIpcEventAdapter.MsEventIpcEventWriter(_utilsBus); _evtWriter.Start(); _evtWriter.AddIpcEventWriter(Niawa.IpcController.IpcFactory.CreateIpcEventWriter("IpcEventMonitor", true, "TreeModel", _utilsBus), "TreeModel"); //instantiate view _view = new TreeModel.TreeModelViewImpl(_formWindow, _formTreeView); //instantiate node view factory _nodeViewFactory = new TreeModel.TreeModelNodeViewFactoryImpl(_webBrowser, _webURL); //instantiate tree model controller _treeModelController = new TreeModelNodeControls.TreeModelController(_view, _nodeViewFactory, _evtWriter.EvtConsumer, "IpcEventMonitor", string.Empty); }
public ChatControl(ref System.Windows.Forms.WebBrowser browser, string pageurl) { wb = browser; wb.ObjectForScripting = this; wb.Navigate(pageurl); wb.AllowNavigation = false; }
/// <summary> /// 生成word,pdf文件(html) /// </summary> /// <param name="fileName"></param> public static void CreateWPFile(string fileName, System.Windows.Forms.WebBrowser webBrowser, string elementName) { try { //存储文件对话框 SaveFileDialog saveFileDialog = new SaveFileDialog(); //保存对话框是否记忆上次打开的目录 saveFileDialog.RestoreDirectory = true; //设置默认文件名(可以不设置) saveFileDialog.FileName = fileName; if (saveFileDialog.ShowDialog() == true) { FileManage.CreateWPFile2(saveFileDialog.FileName, webBrowser, elementName); } } catch (Exception ex) { LogManage.WriteLog(typeof(FileManage), ex); } finally { } }
private async Task HookScript(WebBrowser webBrowser, Uri uri) { var tmp = uri.ToString().Split(new[] { '/', '\\' }); var fileName = tmp[tmp.Length - 1]; tmp = fileName.Split('.'); fileName = tmp[0]; if (WebBrowser.Document.GetElementById($"Hook_{fileName}Script") != null) { return; } var scriptStream = Application.GetResourceStream(uri); StreamReader streamReader = new StreamReader(scriptStream.Stream); var script = await streamReader.ReadToEndAsync(); HtmlElement head = WebBrowser.Document.GetElementsByTagName("head")[0]; HtmlElement scriptEl = WebBrowser.Document.CreateElement("script"); IHTMLScriptElement element = (IHTMLScriptElement)scriptEl.DomElement; ((IHTMLElement)element).id = $"Hook_{fileName}Script"; element.text = script; head.AppendChild(scriptEl); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.wbFacebookLogin = new System.Windows.Forms.WebBrowser(); this.SuspendLayout(); // // wbFacebookLogin // this.wbFacebookLogin.Dock = System.Windows.Forms.DockStyle.Fill; this.wbFacebookLogin.Location = new System.Drawing.Point(0, 0); this.wbFacebookLogin.MinimumSize = new System.Drawing.Size(20, 20); this.wbFacebookLogin.Name = "wbFacebookLogin"; this.wbFacebookLogin.ScrollBarsEnabled = false; this.wbFacebookLogin.Size = new System.Drawing.Size(802, 617); this.wbFacebookLogin.TabIndex = 0; this.wbFacebookLogin.Navigated += new System.Windows.Forms.WebBrowserNavigatedEventHandler(this.wbFacebookLogin_Navigated); // // FacebookExtendedPermission // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(802, 617); this.Controls.Add(this.wbFacebookLogin); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.IsMdiContainer = true; this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "FacebookExtendedPermission"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Facebook Extended Permission"; this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.FacebookAuthentication_FormClosed); this.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.Browser = new System.Windows.Forms.WebBrowser(); this.SuspendLayout(); // // Browser // this.Browser.Dock = System.Windows.Forms.DockStyle.Fill; this.Browser.Location = new System.Drawing.Point(0, 0); this.Browser.MinimumSize = new System.Drawing.Size(20, 20); this.Browser.Name = "Browser"; this.Browser.Size = new System.Drawing.Size(794, 636); this.Browser.TabIndex = 0; this.Browser.Url = new System.Uri("", System.UriKind.Relative); // // ScrapeForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(794, 636); this.Controls.Add(this.Browser); this.Name = "ScrapeForm"; this.Text = "Sammy HTML Scraping"; this.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.webBrowser1 = new System.Windows.Forms.WebBrowser(); this.SuspendLayout(); // // webBrowser1 // this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill; this.webBrowser1.Location = new System.Drawing.Point(0, 0); this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20); this.webBrowser1.Name = "webBrowser1"; this.webBrowser1.Size = new System.Drawing.Size(826, 493); this.webBrowser1.TabIndex = 0; this.webBrowser1.DocumentCompleted += new System.Windows.Forms.WebBrowserDocumentCompletedEventHandler(this.webBrowser1_DocumentCompleted); // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(826, 493); this.Controls.Add(this.webBrowser1); this.Name = "Form1"; this.Text = "Form1"; this.Load += new System.EventHandler(this.Form1_Load); this.ResumeLayout(false); }
static void SetWebBrowserDocumentMode() { var browser = new System.Windows.Forms.WebBrowser(); var version = browser.Version; var keys = new string[] { @"HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION", @"HKEY_CURRENT_USER\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION" }; var processName = Process.GetCurrentProcess().ProcessName + ".exe"; var value = Registry.GetValue(keys[0], processName, null); if (value == null) { int? v = null; switch (version.Major) { case 11: v = 11001; break; case 10: v = 10001; break; case 9: v = 9999; break; case 8: v = 8888; break; } if (v.HasValue) { foreach (var key in keys) Registry.SetValue(key, processName, v.Value, RegistryValueKind.DWord); } } }
public ParsedWebpage(System.Windows.Forms.WebBrowser webBrowser) { this.OriginalDocument = new HtmlDocument(); this.InjectedDocument = new HtmlDocument(); this.OriginalDocument.LoadHtml(webBrowser.DocumentText); this.InjectedDocument.LoadHtml(webBrowser.DocumentText); var children = this.InjectedDocument.DocumentNode.Descendants(); var clean = children.Where(n => n.Name == "header" || n.Name == "footer").ToList(); for (int i = clean.Count() - 1; i >= 0; i--) { clean[i].Remove(); } this.Links = OriginalDocument.DocumentNode.Descendants().Where(e => e.Name == "a").ToList(); this.Url = webBrowser.Url; this.Domain = webBrowser.Document.Domain; this.PageTitle = webBrowser.DocumentTitle; this.Headers = new Dictionary <HeaderType, List <HtmlNode> >(); FindHeaderNodes(); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.webBrowser = new System.Windows.Forms.WebBrowser(); this.SuspendLayout(); // // webBrowser // this.webBrowser.Dock = System.Windows.Forms.DockStyle.Fill; this.webBrowser.Location = new System.Drawing.Point(0, 0); this.webBrowser.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.webBrowser.MinimumSize = new System.Drawing.Size(27, 25); this.webBrowser.Name = "webBrowser"; this.webBrowser.ScrollBarsEnabled = false; this.webBrowser.Size = new System.Drawing.Size(881, 386); this.webBrowser.TabIndex = 0; this.webBrowser.Navigated += new System.Windows.Forms.WebBrowserNavigatedEventHandler(this.webBrowser_Navigated); // // FacebookLoginDialog // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(881, 386); this.Controls.Add(this.webBrowser); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "FacebookLoginDialog"; this.ShowInTaskbar = false; this.Text = "Login to Facebook ..."; this.Load += new System.EventHandler(this.FacebookLoginDialog_Load); this.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.helpBrowser = new System.Windows.Forms.WebBrowser(); this.SuspendLayout(); // // helpBrowser // this.helpBrowser.Dock = System.Windows.Forms.DockStyle.Fill; this.helpBrowser.IsWebBrowserContextMenuEnabled = true; this.helpBrowser.Location = new System.Drawing.Point(0, 0); this.helpBrowser.MinimumSize = new System.Drawing.Size(20, 20); this.helpBrowser.Name = "helpBrowser"; this.helpBrowser.Size = new System.Drawing.Size(1111, 708); this.helpBrowser.TabIndex = 0; // // TitleSetupEditorHelp // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(1111, 708); this.Controls.Add(this.helpBrowser); this.Name = "TitleSetupEditorHelp"; this.Text = "Help: Title Setup"; this.ResumeLayout(false); }
/// <summary> /// Code to show browser based content, applicable for URL's /// If the Header value is not provided, the content is projected in full screen mode /// </summary> /// <param name="Content"></param> /// <param name="header"></param> private void ShowBrowser(String Content, String header) { try { //Check if header is null //Null - Show full screen content if (String.IsNullOrEmpty(header)) { //Show the full screen video control //Display HTML content host = new System.Windows.Forms.Integration.WindowsFormsHost(); browserElement = new System.Windows.Forms.WebBrowser(); browserElement.ScriptErrorsSuppressed = true; helper = new Utilities.ScriptingHelper(this); browserElement.ObjectForScripting = helper; host.Child = browserElement; helper.PropertyChanged += helper_PropertyChanged; FullScreenContentGrid.Children.Clear(); FullScreenContentGrid.Children.Add(host); FullScreenContentGrid.Visibility = Visibility.Visible; FullScreenVideoGrid.Visibility = Visibility.Collapsed; } else { TitleLabel.Text = header; host = new System.Windows.Forms.Integration.WindowsFormsHost(); browserElement = new System.Windows.Forms.WebBrowser(); browserElement.ScriptErrorsSuppressed = true; helper = new Utilities.ScriptingHelper(this); host.Child = browserElement; browserElement.ObjectForScripting = helper; helper.PropertyChanged += helper_PropertyChanged; ContentGrid.Children.Clear(); ContentGrid.Children.Add(host); ContentGrid.Visibility = Visibility.Visible; FullScreenContentGrid.Visibility = Visibility.Collapsed; FullScreenVideoGrid.Visibility = Visibility.Collapsed; VideoGrid.Visibility = Visibility.Collapsed; } String fileLocation = Helper.GetAssetURI(Content); String pageUri = String.Empty; //Local file if (File.Exists(fileLocation)) { String[] PathParts = fileLocation.Split(new char[] { ':' }); pageUri = "file://127.0.0.1/" + PathParts[0] + "$" + PathParts[1]; } //Web hosted file else { pageUri = Content; } browserElement.Navigate(pageUri); this.UpdateLayout(); } catch (Exception ex) { RippleCommonUtilities.LoggingHelper.LogTrace(1, "Went wrong in Show Browser {0}", ex.Message); } }
public Converter() { wb = new System.Windows.Forms.WebBrowser(); wb.Url = new System.Uri(MainForm.url); client = new WebClient(); client.Headers["User-Agent"] = "Mozilla/5.0"; }
public LoginSSO() { // Login to Support CS SSO - just use a browser control to hit the SSO page and then // sniff for the Session Id and use that to login to the API // started with the WPF browser control but was very buggy! searching the internet said // the windows forms one was more stable, switched and seems to be fine // TODO - timeout detection - when salesforce timesout, there is a javascript error from the control // I think when SForce is trying to display the "You are about to be logged out due to inactivity" // this should be trapped and a message shown to the user with a better logout message/process InitializeComponent(); Utility.setTheme(this); RadWindowInteropHelper.SetAllowTransparency(this, false); _d = Globals.ThisAddIn.getData(); _settings = Globals.ThisAddIn.getSettings(); _local = Globals.ThisAddIn.GetLocalSettings(); // try the windows form browser _webBrowser1 = new System.Windows.Forms.WebBrowser(); this.wfh1.Child = _webBrowser1; _webBrowser1.Navigated += _webBrowser1_Navigated; _webBrowser1.DocumentCompleted += _webBrowser1_DocumentCompleted; // stop the reminders - salesforce puts up a reminder window - it doesn't work though // we get an IE window with an error so just cancel it _webBrowser1.NewWindow += _webBrowser1_NewWindow; }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.gradeBrowser = new System.Windows.Forms.WebBrowser(); this.SuspendLayout(); // // gradeBrowser // this.gradeBrowser.Dock = System.Windows.Forms.DockStyle.Fill; this.gradeBrowser.Location = new System.Drawing.Point(0, 0); this.gradeBrowser.MinimumSize = new System.Drawing.Size(20, 20); this.gradeBrowser.Name = "gradeBrowser"; this.gradeBrowser.Size = new System.Drawing.Size(305, 316); this.gradeBrowser.TabIndex = 5; this.gradeBrowser.Url = new System.Uri("", System.UriKind.Relative); // // CcdGradeControl // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.SystemColors.Control; this.Controls.Add(this.gradeBrowser); this.Name = "CcdGradeControl"; this.Size = new System.Drawing.Size(305, 316); this.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { components = new System.ComponentModel.Container(); webBrowser = new System.Windows.Forms.WebBrowser(); SuspendLayout(); // // webBrowser // webBrowser.Location = new System.Drawing.Point(0, 0); webBrowser.MinimumSize = new System.Drawing.Size(20, 20); webBrowser.Name = "webBrowser"; webBrowser.Size = new System.Drawing.Size(619, 415); webBrowser.TabIndex = 11; webBrowser.ScriptErrorsSuppressed = true; webBrowser.DocumentCompleted += new System.Windows.Forms.WebBrowserDocumentCompletedEventHandler(this.webBrowser1_DocumentCompleted); // // Oauth // AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; ClientSize = new System.Drawing.Size(619, 413); Controls.Add(this.webBrowser); Name = "Oauth"; Text = "Автоизация"; FormClosing += Oauth_FormClosing; Load += Form1_Load; ResumeLayout(false); PerformLayout(); }
public UIElement RenderHelp(string htmlHelp, IList <InstantHelpEventArgs.HtmlExample> htmlExamples) { var tabs = new TabControl(); var tab = new TabItem { Header = "Help" }; var host = new System.Windows.Forms.Integration.WindowsFormsHost(); var myBrowser = new WebBrowser { ScriptErrorsSuppressed = true, DocumentText = _instantHelpHtmlTemplate.AsTemplated(new { Styles = _stylesForTemplates, Body = htmlHelp }) }; host.Child = myBrowser; tab.Content = host; tabs.Items.Add(tab); foreach (var example in htmlExamples) { tab = new TabItem { Header = "Example" }; tabs.Items.Add(tab); host = new System.Windows.Forms.Integration.WindowsFormsHost(); myBrowser = new WebBrowser { ScriptErrorsSuppressed = true, DocumentText = GetExampleHtml(example) }; host.Child = myBrowser; tab.Content = host; } return(tabs); }
private void RelhaxWindow_Loaded(object sender, RoutedEventArgs e) { if (Credential == null) { throw new NullReferenceException(nameof(Credential) + " is null"); } databaseClient = new WebClient() { Credentials = Credential }; databaseClient.DownloadProgressChanged += DatabaseClient_DownloadProgressChanged; client.DownloadProgressChanged += Client_DownloadProgressChanged; Logging.Editor("Checking if registry key is set for IE11 for this application"); using (System.Windows.Forms.WebBrowser bro = new System.Windows.Forms.WebBrowser()) SetRegistryKey(System.Diagnostics.Process.GetCurrentProcess().ProcessName, bro.Version.Major); Logging.Editor("Attaching datasources", LogLevel.Debug); PackageNamesListbox.ItemsSource = Packages; //set autoupdate output directory Logging.Editor("Setting update output directory", LogLevel.Debug); UpdateOutputDirectory = Path.Combine(WorkingDirectory, "Output"); if (!Directory.Exists(UpdateOutputDirectory)) { Directory.CreateDirectory(UpdateOutputDirectory); } //attach logfile reporting LogfileTextbox.Clear(); Logging.OnLoggingUIThreadReport += Logging_OnLoggingUIThreadReport; }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UpdateForm)); this.webBrowser1 = new System.Windows.Forms.WebBrowser(); this.SuspendLayout(); // // webBrowser1 // this.webBrowser1.AllowWebBrowserDrop = false; this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill; this.webBrowser1.IsWebBrowserContextMenuEnabled = false; this.webBrowser1.Location = new System.Drawing.Point(0, 0); this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20); this.webBrowser1.Name = "webBrowser1"; this.webBrowser1.ScrollBarsEnabled = false; this.webBrowser1.Size = new System.Drawing.Size(640, 480); this.webBrowser1.TabIndex = 0; this.webBrowser1.WebBrowserShortcutsEnabled = false; // // UpdateForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.ClientSize = new System.Drawing.Size(640, 480); this.Controls.Add(this.webBrowser1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MaximizeBox = false; this.Name = "UpdateForm"; this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; this.Text = "Multiverse Patcher"; this.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.webBrowser1 = new System.Windows.Forms.WebBrowser(); this.SuspendLayout(); // // webBrowser1 // this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill; this.webBrowser1.Location = new System.Drawing.Point(0, 0); this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20); this.webBrowser1.Name = "webBrowser1"; this.webBrowser1.Size = new System.Drawing.Size(372, 272); this.webBrowser1.TabIndex = 0; // // Frm_webbrowser_single // this.Appearance.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(217)))), ((int)(((byte)(218)))), ((int)(((byte)(224))))); this.Appearance.Options.UseBackColor = true; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(372, 272); this.Controls.Add(this.webBrowser1); this.DoubleBuffered = true; this.KeyPreview = true; this.Name = "Frm_webbrowser_single"; this.ShowInTaskbar = false; this.Text = "»» Información"; this.Load += new System.EventHandler(this.Frm_webbrowser_single_Load); this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Frm_webbrowser_single_KeyDown); this.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.WebBrowserExcel=new System.Windows.Forms.WebBrowser(); this.OpenExcelFileDialog=new System.Windows.Forms.OpenFileDialog(); this.SuspendLayout(); // // WebBrowserExcel // this.WebBrowserExcel.Dock=System.Windows.Forms.DockStyle.Fill; this.WebBrowserExcel.Location=new System.Drawing.Point(0,0); this.WebBrowserExcel.MinimumSize=new System.Drawing.Size(20,20); this.WebBrowserExcel.Name="WebBrowserExcel"; this.WebBrowserExcel.Size=new System.Drawing.Size(420,400); this.WebBrowserExcel.TabIndex=0; this.WebBrowserExcel.Navigated+=new System.Windows.Forms.WebBrowserNavigatedEventHandler(this.OnWebBrowserExcelNavigated); // // OpenExcelFileDialog // this.OpenExcelFileDialog.FileName="\"* Excel files | *.xls\""; // // ExcelWrapper // this.AutoScaleDimensions=new System.Drawing.SizeF(6F,13F); this.AutoScaleMode=System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.WebBrowserExcel); this.Name="ExcelWrapper"; this.Size=new System.Drawing.Size(420,400); this.ResumeLayout(false); }
private void AnalyticsTracking() { if (this.DoNotTrack()) { return; } var id = this.GetId(); var ver = ApplicationManager.AppVersion.EmptyToNull() ?? "dev"; this.Dispatcher.Invoke(new Action(() => { try { var wb = new System.Windows.Forms.WebBrowser { ScriptErrorsSuppressed = true }; var url = string.Format("https://bitbucket.org/alienlab/sitecore-instance-manager/wiki/Tracking?version={0}&id={1}", ver, id); wb.Navigate(url, null, null, "User-Agent: Sitecore Instance Manager"); } catch (Exception ex) { Log.Error("Failed to update statistics internal identifier", this, ex); } })); }
private void InitializeComponent() { this.wBrowser = new System.Windows.Forms.WebBrowser(); this.Load += new System.EventHandler(this.Announcement_Load); this.SuspendLayout(); // //wBrowser // this.wBrowser.AllowWebBrowserDrop = false; this.wBrowser.Dock = System.Windows.Forms.DockStyle.Fill; this.wBrowser.Location = new System.Drawing.Point(0, 0); this.wBrowser.MinimumSize = new System.Drawing.Size(20, 20); this.wBrowser.Name = "wBrowser"; this.wBrowser.Size = new System.Drawing.Size(549, 474); this.wBrowser.TabIndex = 0; // //Announcement // this.ClientSize = new System.Drawing.Size(549, 474); this.Controls.Add(this.wBrowser); this.Name = "Announcement"; this.TabText = "Announcement"; this.Text = "Announcement"; this.Icon = global::My.Resources.Resources.News_Icon; this.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.webBrowser1 = new System.Windows.Forms.WebBrowser(); this.SuspendLayout(); // // webBrowser1 // this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill; this.webBrowser1.Location = new System.Drawing.Point(0, 0); this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20); this.webBrowser1.Name = "webBrowser1"; this.webBrowser1.ScriptErrorsSuppressed = true; this.webBrowser1.Size = new System.Drawing.Size(284, 262); this.webBrowser1.TabIndex = 0; // // TestBrowser // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(284, 262); this.Controls.Add(this.webBrowser1); this.Name = "TestBrowser"; this.Text = "TestBrowser"; this.ResumeLayout(false); }
/// <summary> /// This method is required for Windows Forms designer support. /// Do not change the method contents inside the source code editor. The Forms designer might /// not be able to load this method if it was changed manually. /// </summary> private void InitializeComponent() { this.webBrowser1 = new System.Windows.Forms.WebBrowser(); this.SuspendLayout(); // // webBrowser1 // this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill; this.webBrowser1.Location = new System.Drawing.Point(0, 0); this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20); this.webBrowser1.Name = "webBrowser1"; this.webBrowser1.AllowWebBrowserDrop = false; this.webBrowser1.IsWebBrowserContextMenuEnabled = false; // this.webBrowser1.WebBrowserShortcutsEnabled = false; this.webBrowser1.ScriptErrorsSuppressed = true; this.webBrowser1.ObjectForScripting = new ScriptManager(); //this.webBrowser1.Size = new System.Drawing.Size(800, 600); this.webBrowser1.TabIndex = 0; //webBrowser1.Url=new System.Uri(string.Format("http://localhost:{0}/{1}",Program._port,Program.resource)); webBrowser1.DocumentText = Program.html; // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(800, 600); this.Controls.Add(this.webBrowser1); this.Name = "MainForm"; this.Text = Path.GetFileNameWithoutExtension(AppDomain.CurrentDomain.FriendlyName); // this.Icon = System.Drawing.Icon.ExtractAssociatedIcon(Path.Combine(AppDomain.CurrentDomain.BaseDirectory,AppDomain.CurrentDomain.FriendlyName)); //this.Icon = (Icon)Resource1.ORANO_VERTICAL_SEUL_NOIRJAUNE_RVB; // var rm=new ResourceManager("GrapevinePublicFolder.Resource1", typeof(Resource1).Assembly); // this.Icon=(Icon)rm.GetObject("ORANO_VERTICAL_SEUL_NOIRJAUNE_RVB",CultureInfo.InvariantCulture); this.ResumeLayout(false); }
public void search(String s, System.Windows.Forms.WebBrowser b) { if (String.IsNullOrEmpty(s)) { return; } if (s.Equals("about:blank")) { return; } if (!s.StartsWith("http://") && !s.StartsWith("https://")) { s = "http://" + s; } try { b.Navigate(new Uri(s)); } catch (System.UriFormatException) { return; } site_list.Add(s); }
public ucDocs(string docPathDir) { InitializeComponent(); webBrowser1 = new System.Windows.Forms.WebBrowser(); winFormHost.Child = webBrowser1; string[] imgFiles = System.IO.Directory.GetFiles(docPathDir); for (int i = 0; i < imgFiles.Length; i++) { try { FileInfo file = new FileInfo(imgFiles[i]); RadioButton radioBtn = new RadioButton(); radioBtn.Content = file.Name.Replace(file.Extension, ""); radioBtn.FontSize = 18; radioBtn.Tag = file.FullName; radioBtn.Checked += new RoutedEventHandler(btnDoc_Checked); docList.Children.Add(radioBtn); } catch (Exception ex) { MessageBox.Show(ex.Message); } } }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.webBrowser1 = new System.Windows.Forms.WebBrowser(); this.SuspendLayout(); // // webBrowser1 // this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill; this.webBrowser1.Location = new System.Drawing.Point(0, 0); this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20); this.webBrowser1.Name = "webBrowser1"; this.webBrowser1.Size = new System.Drawing.Size(841, 421); this.webBrowser1.TabIndex = 0; this.webBrowser1.Navigated += new System.Windows.Forms.WebBrowserNavigatedEventHandler(this.webBrowser1_Navigated); // // TrelloAuthorizeForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(841, 421); this.Controls.Add(this.webBrowser1); this.Name = "TrelloAuthorizeForm"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Trello 授权"; this.TopMost = true; this.Load += new System.EventHandler(this.TrelloAuthorizeForm_Load); this.ResumeLayout(false); }
public Window1(OverlayStyle style) { InitializeComponent(); if (style == OverlayStyle.WPF) { WebBrowserOverlay wbo = new WebBrowserOverlay(_webBrowserPlacementTarget); WebBrowser wb = wbo.WebBrowser; wb.Navigate(new Uri("http://live.com")); _showOtherButton.Content = "Show WinForms-based overlay"; } else if (style == OverlayStyle.WinForms) { WebBrowserOverlayWF wbo = new WebBrowserOverlayWF(_webBrowserPlacementTarget); System.Windows.Forms.WebBrowser wb = wbo.WebBrowser; wb.Navigate(new Uri("http://live.com")); _showOtherButton.Content = "Show WPF-based overlay"; } _showOtherButton.Click += delegate { new Window1(style == OverlayStyle.WinForms ? OverlayStyle.WPF : OverlayStyle.WinForms).Show(); }; }
private void InitializeComponent() { this.wbAuth = new System.Windows.Forms.WebBrowser(); this.SuspendLayout(); // // wbAuth // this.wbAuth.Dock = System.Windows.Forms.DockStyle.Top; this.wbAuth.Location = new System.Drawing.Point(0, 0); this.wbAuth.MinimumSize = new System.Drawing.Size(20, 20); this.wbAuth.Name = "wbAuth"; this.wbAuth.ScriptErrorsSuppressed = true; this.wbAuth.ScrollBarsEnabled = false; this.wbAuth.Size = new System.Drawing.Size(380, 392); this.wbAuth.TabIndex = 0; this.wbAuth.Navigated += new System.Windows.Forms.WebBrowserNavigatedEventHandler(this.wbAuth_Navigated); // // DlgAuthorization // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScroll = true; this.ClientSize = new System.Drawing.Size(397, 386); this.Controls.Add(this.wbAuth); this.KeyPreview = true; this.Name = "DlgAuthorization"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "DlgAuthorization"; this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.DlgAuthorization_KeyDown); this.ResumeLayout(false); }
public AutomationBrowserForClickOnWebPage(string webInstanceVar) { InitializeComponent(); automation_browser = new System.Windows.Forms.WebBrowser { //disable the default context menu //IsWebBrowserContextMenuEnabled = false }; automation_browser.DocumentCompleted += new System.Windows.Forms.WebBrowserDocumentCompletedEventHandler(web_DocumentCompleted); windowsFormsHost.Child = automation_browser; if (!string.IsNullOrEmpty(webInstanceVar)) { if (!string.IsNullOrEmpty(VariableStorage.Url_tracker[webInstanceVar])) { url_text.Text = VariableStorage.Url_tracker[webInstanceVar]; selenium_url = url_text.Text; automation_browser.Navigate(url_text.Text); } } }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(HelpForm)); this.btnHelp = new System.Windows.Forms.HelpProvider(); this.webBrowser = new System.Windows.Forms.WebBrowser(); this.SuspendLayout(); // // webBrowser // this.webBrowser.Dock = System.Windows.Forms.DockStyle.Fill; this.webBrowser.Location = new System.Drawing.Point(0, 0); this.webBrowser.MinimumSize = new System.Drawing.Size(20, 18); this.webBrowser.Name = "webBrowser"; this.webBrowser.Size = new System.Drawing.Size(844, 592); this.webBrowser.TabIndex = 2; // // HelpForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(844, 592); this.Controls.Add(this.webBrowser); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MaximizeBox = false; this.MaximumSize = new System.Drawing.Size(860, 630); this.MinimizeBox = false; this.MinimumSize = new System.Drawing.Size(860, 630); this.Name = "HelpForm"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "帮助文档"; this.Load += new System.EventHandler(this.HelpFrom_Load); this.ResumeLayout(false); }
/// <summary> /// This method is required for Windows Forms designer support. /// Do not change the method contents inside the source code editor. The Forms designer might /// not be able to load this method if it was changed manually. /// </summary> private void InitializeComponent() { this.wb = new System.Windows.Forms.WebBrowser(); this.SuspendLayout(); // // wb // this.wb.Dock = System.Windows.Forms.DockStyle.Fill; this.wb.Location = new System.Drawing.Point(0, 0); this.wb.MinimumSize = new System.Drawing.Size(20, 20); this.wb.Name = "wb"; this.wb.ScriptErrorsSuppressed = true; this.wb.Size = new System.Drawing.Size(452, 273); this.wb.TabIndex = 0; this.wb.DocumentCompleted += new System.Windows.Forms.WebBrowserDocumentCompletedEventHandler(this.WbDocumentCompleted); // // LoginForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(452, 273); this.Controls.Add(this.wb); this.Name = "LoginForm"; this.ShowIcon = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Login"; this.Load += new System.EventHandler(this.LoginFormLoad); this.ResumeLayout(false); }
/// <summary> /// 设计器支持所需的方法 - 请勿 /// 使用代码编辑器修改此方法的内容。 /// </summary> private void InitializeComponent() { this.webBrowserRss = new System.Windows.Forms.WebBrowser(); this.SuspendLayout(); // // webBrowserRss // this.webBrowserRss.Dock = System.Windows.Forms.DockStyle.Fill; this.webBrowserRss.Location = new System.Drawing.Point(0, 0); this.webBrowserRss.MinimumSize = new System.Drawing.Size(20, 20); this.webBrowserRss.Name = "webBrowserRss"; this.webBrowserRss.Size = new System.Drawing.Size(725, 525); this.webBrowserRss.TabIndex = 0; // // RssPane // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.webBrowserRss); this.Name = "RssPane"; this.Size = new System.Drawing.Size(725, 525); this.FormRegionClosed += new System.EventHandler(this.RssPane_FormRegionClosed); this.FormRegionShowing += new System.EventHandler(this.RssPane_FormRegionShowing); this.ResumeLayout(false); }
private void btn_baidu_login_Click(object sender, RoutedEventArgs a) { var b = new System.Windows.Forms.WebBrowser(); b.Width = 800; b.Height = 600; b.AllowNavigation = true; var w = new System.Windows.Window(); b.Navigated += (s, e) => { try { var m = new Regex("access_token=(.*?)&").Match(e.Url.ToString()); if (m.Success) { Global.AppSettings["baidu_access_token"] = m.Groups[1].Value; w.Close(); } else { } } catch (Exception ex) { Logger.Error(ex); } }; b.Navigate(new PCS_client().GetAccessTokenPage()); var h = new System.Windows.Forms.Integration.WindowsFormsHost(); h.Child = b; w.Content = h; w.ShowDialog(); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.webBrowser1 = new System.Windows.Forms.WebBrowser(); this.SuspendLayout(); // // webBrowser1 // this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill; this.webBrowser1.Location = new System.Drawing.Point(0, 0); this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20); this.webBrowser1.Name = "webBrowser1"; this.webBrowser1.Size = new System.Drawing.Size(284, 262); this.webBrowser1.TabIndex = 0; this.webBrowser1.Navigated += new System.Windows.Forms.WebBrowserNavigatedEventHandler(this.webBrowser1_Navigated); // // Browser // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(284, 262); this.Controls.Add(this.webBrowser1); this.Name = "Browser"; this.Text = "Browser"; this.Load += new System.EventHandler(this.Browser_Load); this.Leave += new System.EventHandler(this.Browser_Leave); this.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.reportBrowser = new System.Windows.Forms.WebBrowser(); this.SuspendLayout(); // // reportBrowser // this.reportBrowser.Dock = System.Windows.Forms.DockStyle.Fill; this.reportBrowser.Location = new System.Drawing.Point(0, 0); this.reportBrowser.MinimumSize = new System.Drawing.Size(20, 20); this.reportBrowser.Name = "reportBrowser"; this.reportBrowser.Size = new System.Drawing.Size(1018, 749); this.reportBrowser.TabIndex = 0; // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(1018, 749); this.Controls.Add(this.reportBrowser); this.Name = "Form1"; this.Text = "Form1"; this.Load += new System.EventHandler(this.Report_Load); this.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.webBrowser = new System.Windows.Forms.WebBrowser(); this.SuspendLayout(); // // webBrowser // this.webBrowser.Dock = System.Windows.Forms.DockStyle.Fill; this.webBrowser.Location = new System.Drawing.Point(0, 0); this.webBrowser.MinimumSize = new System.Drawing.Size(20, 20); this.webBrowser.Name = "webBrowser"; this.webBrowser.Size = new System.Drawing.Size(492, 523); this.webBrowser.TabIndex = 0; this.webBrowser.Navigated += new System.Windows.Forms.WebBrowserNavigatedEventHandler(this.webBrowser_Navigated); // // Loginform // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(492, 523); this.Controls.Add(this.webBrowser); this.Name = "Loginform"; this.Text = "Logging into Facebook"; this.Load += new System.EventHandler(this.Loginform_Load); this.ResumeLayout(false); }
public ucPCBComponent() { InitializeComponent(); webBrowser1 = new System.Windows.Forms.WebBrowser(); winFormHost.Child = webBrowser1; Init("FKD"); Init("SOP14"); Init("YC122"); Init("SL_B"); Init("sot313_2"); Init("led_red"); Init("led_blue"); Init("led_yellow"); Init("lqpf64"); Init("C06x18"); Init("msop_10"); Init("alu_e"); Init("do_214aa"); Init("FUSE_NANO2"); Init("POWERDI_123"); Init("res01005"); Init("sc70_3"); Init("SMD_Capacitor"); Init("SOT_23_3"); Init("SOT_23_5"); Init("SOT23_5_1"); Init("tssop14_2"); }
/// <summary> /// 给JS注入事件 /// </summary> /// <param name="webBrowser">webBrowser对象</param> /// <param name="eventName">JS事件名称</param> /// <param name="objects">对象组</param> public static void AsyncInvokeJavaScript(System.Windows.Forms.WebBrowser webBrowser, string eventName, object[] objects) { LogHelper.WriteMethodLog(true); try { Application.Current.Dispatcher.Invoke(new System.Action(() => { if (!webBrowser.IsDisposed) { webBrowser?.Document?.InvokeScript(eventName, objects); AppSettings.mainForm?.Focus(); AppSettings.mainForm?.Activate(); webBrowser?.Focus(); } //System.Windows.Forms.Application.DoEvents(); })); } catch (System.Exception ex) { LogHelper.WriteErrorInfoLog(ex.Message, ex); } LogHelper.WriteMethodLog(false); }
public FontWindow() { InitializeComponent(); backgroundColorPicker.SelectedColorChanged += new RoutedPropertyChangedEventHandler<Color>(backgroundColorPicker_SelectedColorChanged); genericFontRadioButton.Checked += new RoutedEventHandler(genericFontRadioButton_Checked); genericFontRadioButton.Unchecked += new RoutedEventHandler(genericFontRadioButton_Unchecked); fontFamilyComboBox.SelectionChanged += new SelectionChangedEventHandler(fontFamilyComboBox_SelectionChanged); fontSizeNumericBox.ValueChanged += new EventHandler(fontSizeNumericBox_ValueChanged); fontVariantComboBox.SelectionChanged += new SelectionChangedEventHandler(fontVariantComboBox_SelectionChanged); fontWeightComboBox.SelectionChanged += new SelectionChangedEventHandler(fontWeightComboBox_SelectionChanged); fontStyleComboBox.SelectionChanged += new SelectionChangedEventHandler(fontStyleComboBox_SelectionChanged); fontDecorationComboBox.SelectionChanged += new SelectionChangedEventHandler(fontDecorationComboBox_SelectionChanged); fontTransformComboBox.SelectionChanged += new SelectionChangedEventHandler(fontTransformComboBox_SelectionChanged); previewTextBox.TextChanged += new TextChangedEventHandler(previewTextBox_TextChanged); // even IE version is 9, use polyfill for text shadow var winFormBrowser = new System.Windows.Forms.WebBrowser(); int majorVersion = winFormBrowser.Version.Major; if (majorVersion < 10) { useTextShadowPolyFill = true; } LoadCommonFontFamilies(); SetCopyCss(); SetPreviewSource(); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.webBrowser1 = new System.Windows.Forms.WebBrowser(); this.SuspendLayout(); // // webBrowser1 // this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill; this.webBrowser1.Location = new System.Drawing.Point(0, 0); this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20); this.webBrowser1.Name = "webBrowser1"; this.webBrowser1.Size = new System.Drawing.Size(579, 402); this.webBrowser1.TabIndex = 0; this.webBrowser1.Navigating += new System.Windows.Forms.WebBrowserNavigatingEventHandler(this.webBrowser1_Navigating); this.webBrowser1.FileDownload += new System.EventHandler(this.webBrowser1_FileDownload); this.webBrowser1.ControlAdded += new System.Windows.Forms.ControlEventHandler(this.webBrowser1_ControlAdded); this.webBrowser1.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.webBrowser1_PreviewKeyDown); this.webBrowser1.DocumentCompleted += new System.Windows.Forms.WebBrowserDocumentCompletedEventHandler(this.webBrowser1_DocumentCompleted); this.webBrowser1.Navigated += new System.Windows.Forms.WebBrowserNavigatedEventHandler(this.webBrowser1_Navigated); // // WebPlayer // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(579, 402); this.Controls.Add(this.webBrowser1); this.Name = "WebPlayer"; this.Text = "WebPlayer"; this.Load += new System.EventHandler(this.WebPlayer_Load); this.ResumeLayout(false); }
private void ShowWebUri() { try { if (_winformWebBrowser == null) { //winform _winformWebBrowser = new System.Windows.Forms.WebBrowser() { Url = new Uri(BrowserUriTextBox.Text), AllowWebBrowserDrop = false, WebBrowserShortcutsEnabled = false, IsWebBrowserContextMenuEnabled = false }; _winformWebBrowser.NewWindow += (s, e1) => { e1.Cancel = true; }; _windowsFormsHost.Child = _winformWebBrowser; BrowserGrid.Children.Add(_windowsFormsHost); } _winformWebBrowser.Navigate(BrowserUriTextBox.Text); } catch (Exception exception) { Console.WriteLine(exception); } }
public SmartCrawlerUI() { InitializeComponent(); browser = new WebBrowser(); browser.ScriptErrorsSuppressed = true; windowsFormsHost.Child = browser; }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.BrowserCtrl = new System.Windows.Forms.WebBrowser(); this.SuspendLayout(); // // BrowserCtrl // this.BrowserCtrl.Dock = System.Windows.Forms.DockStyle.Fill; this.BrowserCtrl.Location = new System.Drawing.Point(0, 0); this.BrowserCtrl.MinimumSize = new System.Drawing.Size(20, 20); this.BrowserCtrl.Name = "BrowserCtrl"; this.BrowserCtrl.Size = new System.Drawing.Size(540, 750); this.BrowserCtrl.TabIndex = 0; this.BrowserCtrl.DocumentCompleted += new System.Windows.Forms.WebBrowserDocumentCompletedEventHandler(this.BrowserCtrl_DocumentCompleted); this.BrowserCtrl.Navigating += new System.Windows.Forms.WebBrowserNavigatingEventHandler(this.BrowserCtrl_Navigating); // // Browser // this.ClientSize = new System.Drawing.Size(540, 750); this.Controls.Add(this.BrowserCtrl); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "Browser"; this.ShowIcon = false; this.ShowInTaskbar = false; this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Authenticate"; this.TopMost = true; this.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.webBrowser1 = new System.Windows.Forms.WebBrowser(); this.SuspendLayout(); // // webBrowser1 // this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill; this.webBrowser1.Location = new System.Drawing.Point(0, 0); this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20); this.webBrowser1.Name = "webBrowser1"; this.webBrowser1.ScriptErrorsSuppressed = true; this.webBrowser1.Size = new System.Drawing.Size(898, 594); this.webBrowser1.TabIndex = 0; this.webBrowser1.NewWindow += new System.ComponentModel.CancelEventHandler(this.webBrowser1_NewWindow); // // WebForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(898, 594); this.Controls.Add(this.webBrowser1); this.Name = "WebForm"; this.Text = "WebForm"; this.Load += new System.EventHandler(this.WebForm_Load); this.ResumeLayout(false); }
public void ExchangeChartDashboard_Sub(string Coin, string PriceType, string PriceCode) { InitializeComponent(); web = new System.Windows.Forms.WebBrowser(); this.Loaded += ExchangeChartDashboard_Loaded; this.Closing += ExchangeChartDashboard_Closing; web.ScriptErrorsSuppressed = true; wfh.Child = web; web.DocumentCompleted += web_DocumentCompleted; web.Resize += Web_Resize; NowCoin = Coin; NowPriceType = PriceCode; txtPulbic.Text = PriceType; btnList = new ObservableCollection <btnInfo>(); if (PriceType.Equals(CommonLib.StandardCurcyNm)) { foreach (ResponseGetMkCoinListListtModel item in MainViewModel.CoinList.KRW) { btnList.Add(ViewModelSource.Create(() => new btnInfo(item.curcyNm, item.curcyCd))); } } else if (PriceType.Equals("ETH")) { foreach (ResponseGetMkCoinListListtModel item in MainViewModel.CoinList.ETH) { btnList.Add(ViewModelSource.Create(() => new btnInfo(item.curcyNm, item.curcyCd))); } } else if (PriceType.Equals("USDT")) { foreach (ResponseGetMkCoinListListtModel item in MainViewModel.CoinList.USDT) { btnList.Add(ViewModelSource.Create(() => new btnInfo(item.curcyNm, item.curcyCd))); } } else if (PriceType.Equals("BTC")) { foreach (ResponseGetMkCoinListListtModel item in MainViewModel.CoinList.BTC) { btnList.Add(ViewModelSource.Create(() => new btnInfo(item.curcyNm, item.curcyCd))); } } itemBtnList.ItemsSource = btnList; foreach (btnInfo item in btnList.ToList()) { item.Cancel(); if (item.curcyNm.Equals(StringEnum.ToEnum <EnumLib.ExchangeCurrencyCode>(NowCoin).ToString())) { item.Select(); } } }
private void InitializeComponent() { this.webBrowser = new System.Windows.Forms.WebBrowser(); this.Load += new System.EventHandler(Announcement_Load); this.SuspendLayout(); // //webBrowser // this.webBrowser.Dock = System.Windows.Forms.DockStyle.Fill; this.webBrowser.Location = new System.Drawing.Point(0, 0); this.webBrowser.MinimumSize = new System.Drawing.Size(20, 20); this.webBrowser.Name = "webBrowser"; this.webBrowser.Size = new System.Drawing.Size(549, 474); this.webBrowser.TabIndex = 0; // //Announcement // this.ClientSize = new System.Drawing.Size(549, 474); this.Controls.Add(this.webBrowser); this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, System.Convert.ToByte(0)); this.Icon = Resources.News_Icon; this.Name = "Announcement"; this.TabText = "Announcement"; this.Text = "Announcement"; this.ResumeLayout(false); }
internal AcrolinxPlugin(System.Windows.Forms.WebBrowser webBrowser, AcrolinxSidebar sidebar) { Contract.Requires(webBrowser != null); Contract.Requires(sidebar != null); this.Document = new Document(); this.webBrowser = webBrowser; this.sidebar = sidebar; }
public static void Init() { webBrowser = new System.Windows.Forms.WebBrowser(); var document = DynamicTableJavascript.Document; webBrowser.Navigate("about:blank"); webBrowser.Document.Write(document); }
/// <summary> /// Instantiates a TreeModelNodeViewImpl. /// This contains the implementation of the Tree Model Node View. /// The Tree Model Node View is the detailed view (i.e. web page) of the tree model node (i.e. tree item). /// </summary> /// <param name="browser"></param> public TreeModelNodeViewImpl(System.Windows.Forms.WebBrowser browser, string webURL) { _webURL = webURL; _createdDate = DateTime.Now; _cachedEvents = new List<TreeModelNodeControls.ITreeModelEvent>(); _browser = browser; }
public System.Windows.Forms.WebBrowser Add() { System.Windows.Forms.WebBrowser wb = new System.Windows.Forms.WebBrowser(); wb.Url = new Uri("http://www.bing.com"); browsers.Add(wb); DisableOtherBrowsers(browserCount); browserCount++; return wb; }
private void InitializeComponent() { this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabPage = new System.Windows.Forms.TabPage(); this.browser = new System.Windows.Forms.WebBrowser(); this.chbDisplayAll = new System.Windows.Forms.CheckBox(); this.tabControl1.SuspendLayout(); this.tabPage.SuspendLayout(); this.SuspendLayout(); this.tabControl1.Controls.Add(this.tabPage); this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; this.tabControl1.Location = new System.Drawing.Point(0, 0); this.tabControl1.Name = "tabControl1"; this.tabControl1.SelectedIndex = 0; this.tabControl1.Size = new System.Drawing.Size(300, 300); this.tabControl1.TabIndex = 0; this.tabPage.BackColor = System.Drawing.SystemColors.Control; this.tabPage.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.tabPage.Controls.Add(this.browser); this.tabPage.Controls.Add(this.chbDisplayAll); this.tabPage.Location = new System.Drawing.Point(4, 22); this.tabPage.Name = "tabPage"; this.tabPage.Padding = new System.Windows.Forms.Padding(3); this.tabPage.Size = new System.Drawing.Size(292, 274); this.tabPage.TabIndex = 0; this.tabPage.Text = "Release Notes"; this.browser.AllowWebBrowserDrop = false; this.browser.Dock = System.Windows.Forms.DockStyle.Fill; this.browser.IsWebBrowserContextMenuEnabled = false; this.browser.Location = new System.Drawing.Point(3, 3); this.browser.MinimumSize = new System.Drawing.Size(20, 20); this.browser.Name = "browser"; this.browser.ScriptErrorsSuppressed = true; this.browser.Size = new System.Drawing.Size(282, 240); this.browser.TabIndex = 0; this.browser.WebBrowserShortcutsEnabled = false; this.browser.Navigating += new System.Windows.Forms.WebBrowserNavigatingEventHandler(this.browser_Navigating); this.chbDisplayAll.Dock = System.Windows.Forms.DockStyle.Bottom; this.chbDisplayAll.Location = new System.Drawing.Point(3, 243); this.chbDisplayAll.Name = "chbDisplayAll"; this.chbDisplayAll.Size = new System.Drawing.Size(282, 24); this.chbDisplayAll.TabIndex = 1; this.chbDisplayAll.Text = "Display all"; this.chbDisplayAll.UseVisualStyleBackColor = true; this.chbDisplayAll.CheckedChanged += new EventHandler(this.chbDisplayAll_CheckedChanged); this.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.tabControl1); this.Name = "ReleaseNotesControl"; this.Size = new System.Drawing.Size(300, 300); this.tabControl1.ResumeLayout(false); this.tabPage.ResumeLayout(false); this.ResumeLayout(false); }
public IpcWebWindowFunctions(string ipcEvent , IpcWebWindow window , System.Windows.Forms.ToolStripButton tsbMonitor , System.Windows.Forms.ToolStripStatusLabel tsslStatus) { _ipcEvent = ipcEvent; _window = window; _tsbMonitor = tsbMonitor; _browser = _window.WebBrowser1; _tsslStatus = tsslStatus; }
private void GetAccountToken(Account account) { using (System.Windows.Forms.WebBrowser wb = new System.Windows.Forms.WebBrowser()) { wb.DocumentCompleted += wb_DocumentCompleted; wb.Tag = account; wb.ScriptErrorsSuppressed = true; wb.Url = new Uri(string.Format("file:///{0}", Path.GetFullPath("md.html"))); System.Windows.Forms.Application.Run(); } }