当前位置: 首页>>代码示例>>C#>>正文


C# WebBrowser.Show方法代码示例

本文整理汇总了C#中System.Windows.Forms.WebBrowser.Show方法的典型用法代码示例。如果您正苦于以下问题:C# WebBrowser.Show方法的具体用法?C# WebBrowser.Show怎么用?C# WebBrowser.Show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Forms.WebBrowser的用法示例。


在下文中一共展示了WebBrowser.Show方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ApplyWebBrowserStyle

        public void ApplyWebBrowserStyle(WebBrowser browser)
        {
            browser.Hide();

            while (browser.ReadyState != WebBrowserReadyState.Complete)
            { Application.DoEvents(); }

            if (browser.Document != null)
                browser.Document.BackColor = this.BackgroundColor;
            browser.Document.Body.Style = String.Format("font-size:{0}pt;", this.FontSize);

            browser.Show();
        }
开发者ID:saneksem,项目名称:vm-algem-guide,代码行数:13,代码来源:Settings.cs

示例2: button_source_Click

 private void button_source_Click(object sender, EventArgs e)
 {
     wb = new WebBrowser();
     wb.Size = new Size(findControl("console_panel").Size.Width, Size.Height - sizeManager_console.Location.Y);
     wb.Location = sizeManager_console.Location;
     wb.Name = "wb";
     Controls.Add(wb);
     modVisible(new Control[] { getTBox("console"), getTBox("editor"), findControl("console_panel"), findControl("editor_panel") }, false);
     wb.Show();
     wb.BringToFront();
     wb.Url = new Uri("https://github.com/lyokofirelyte/PseudoCompiler");
     modVisible(new Control[] { button_refresh, panel_refresh, button_run_code, panel_run_code, button_open_new_file, panel_open_new_file, panel_stop_code, button_stop_code }, false);
     modVisible(new Control[] { panel_save, button_save }, false);
 }
开发者ID:lyokofirelyte,项目名称:PseudoCompiler,代码行数:14,代码来源:Form1.cs

示例3: Application


//.........这里部分代码省略.........
                    //    where f != null
                    //    select f
                    //);

                    #region DataTable
                    if (evt.dataTransfer.items != null)
                    {
                        // X:\jsc.svn\examples\javascript\DragDataTableIntoCSVFile\DragDataTableIntoCSVFile\Application.cs

                        evt.dataTransfer.items.AsEnumerable().Where(
                            x =>

                                x.type.ToLower() ==

                                // let jsc type system sort it out?
                                // how much reflection does jsc give us nowadays?
                                typeof(DataTable).Name.ToLower()

                        ).WithEach(
                            async x =>
                            {
                                // http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#dfnReturnLink-0
                                var DataTable_xml = await x.getAsString();

                                var DataTable = StringConversionsForDataTable.ConvertFromString(DataTable_xml);

                                var ff = new Form { Text = new { typeof(DataTable).Name }.ToString() };

                                var g = new DataGridView { DataSource = DataTable, Dock = DockStyle.Fill };

                                ff.Controls.Add(g);


                                ff.Show();

                            }
                        );
                    }
                    #endregion

                    #region files
                    evt.dataTransfer.files.AsEnumerable().WithEachIndex(
                        (f, index) =>
                        {
                            Console.WriteLine(
                                new
                                {

                                    f.name,
                                    f.size,
                                    f.lastModifiedDate
                                }
                            );

                            var ff = new Form();
                            ff.PopupInsteadOfClosing(HandleFormClosing: false);



                            ff.Text = new { f.type, f.name, f.size }.ToString();


                            ff.Show();

                            ff.MoveTo(
                                evt.CursorX + 32 * index,
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:67,代码来源:Application.cs

示例4: button15_Click

        // saving in both (localy and archive)
        private void button15_Click(object sender, EventArgs e)
        {     
            button16_Click(sender, e); // saving locally

            if (this._photoFormState != PhotoFormStates.SAVED_LOCALY_OK)
                return;

            // saving in SQL Server Table_Photos
            FileInfo imageInfo = new FileInfo(FormEditArtical._photoPath);
            System.Drawing.Bitmap myBitmap = new System.Drawing.Bitmap(FormEditArtical._photoPath);
            StreamReader rd = new StreamReader(imageInfo.FullName);
            string content = rd.ReadToEnd();
            UpLoadImageFile(imageInfo);
            
            // getting the file from SQL , browse it (--> saves small copies)
            WebBrowser wb = new WebBrowser();
            //string filePath = FormEditArtical._photoPath;
            int fileId = 2;
            string url = String.Format("http://www.kan-naim.co.il/SavingPhoto.aspx?id={0}", fileId) ;
            wb.Navigate(url);
            wb.Show(); wb.Visible = true;
            //wb.Document.Write("Please Wait...");
        }
开发者ID:haimon74,项目名称:KanNaim,代码行数:24,代码来源:Copy+of+FormEditArtical.cs

示例5: OnOpenWindow

 void OnOpenWindow(string _target, string _uri)
 {
     WebBrowser wb = new WebBrowser();
     wb.Location = new Point(10, 10);
     wb.Size = new Size(300, 300);
     wb.Url = new Uri(_uri);
     wb.Show();
 }
开发者ID:caocao,项目名称:3di-viewer-rei,代码行数:8,代码来源:OpenViewerHost.cs

示例6: SavePhotosCopiesAtDomainDirectory

 private static void SavePhotosCopiesAtDomainDirectory()
 {
     var wb = new WebBrowser();
     //string filePath = FormEditArtical._photoPath;
     const int fileId = 2;
     string url = String.Format("http://www.kan-naim.co.il/SavingPhoto.aspx?id={0}", fileId);
     //byte[] imageData = _tblOriginalPhotos.ImageData.ToArray();
     //Image image = Conversions.ByteArrayToImage(imageData).GetThumbnailImage(width, height, GetThumbnailCallback, IntPtr.Zero);
     //imageData = Conversions.ImageToByteArray(image);
     wb.Navigate(url);
     wb.Show(); wb.Visible = true;
 }
开发者ID:haimon74,项目名称:KanNaim,代码行数:12,代码来源:FormEditArtical.cs

示例7: ShowInfoPage

        public void ShowInfoPage()
        {
            this.SuspendLayout();
            WebBrowser webStart = new WebBrowser();
            PNLlist.Controls.Add(webStart);
            webStart.Visible = false;
            webStart.ScriptErrorsSuppressed = true;
            webStart.ScrollBarsEnabled = false;
            webStart.Dock = DockStyle.Fill;
            webStart.BringToFront();

            Button btnClose = new Button();
            this.Controls.Add(btnClose);
            btnClose.Visible = false;
            btnClose.Size = new Size(PNLlist.Width - 6, 35);
            btnClose.Location = new Point(15, PNLlist.Height - 39 + 39);
            btnClose.FlatAppearance.BorderColor = Color.Gray;
            btnClose.BackColor = Color.FromArgb(64, 64, 64);
            btnClose.ForeColor = Color.WhiteSmoke;
            btnClose.Text = "Close";
            btnClose.FlatStyle = FlatStyle.Flat;
            btnClose.BringToFront();
            this.ResumeLayout();

            btnClose.Click += (e, s) =>
            {
                PNLlist.Controls.Remove(webStart);
                this.Controls.Remove(btnClose);
            };
            webStart.Navigated += (e, s) =>
            {
                if (!webStart.Document.ToString().ToLower().Contains("checking your"))
                {
                    webStart.Show();
                    btnClose.Show();
                }
            };
            webStart.Navigate("http://www.realmbot.xyz/hello.html");
        }
开发者ID:kristjan0,项目名称:RealmBotEventNotifier,代码行数:39,代码来源:frmMain.cs

示例8: SaveNewPhotosClick

        // saving in both (localy and archive)
        private void SaveNewPhotosClick(object sender, EventArgs e)
        {
            ucUploadPhoto1.SavePhotosLocally(); // saving locally

            if (!ucUploadPhoto1.IsStateEqual(UserControlUploadPhoto.UploadState.SavedLocalyOk))
                return;

            if (ucUploadPhoto1.radioButtonSavePhotosToArchive.Checked)
            {
                // saving in SQL Server Table_Photos
                var imageInfo = new FileInfo(ucUploadPhoto1._photoPath);
                // var myBitmap = new Bitmap(_ucUploadPhoto1._photoPath);
                // var rd = new StreamReader(imageInfo.FullName);
                // string content = rd.ReadToEnd();
                UpLoadImageFileAndSaveToDatabase(imageInfo);

                // getting the file from SQL , browse it (--> saves small copies)
                var wb = new WebBrowser();
                //string filePath = FormEditArtical._photoPath;
                const int fileId = 2;
                string url = String.Format("http://www.kan-naim.co.il/SavingPhoto.aspx?id={0}", fileId);
                wb.Navigate(url);
                wb.Show(); wb.Visible = true;
                //wb.Document.Write("Please Wait...");

                //reseting the form
                ucUploadPhoto1.Clear();
            }
        }
开发者ID:haimon74,项目名称:KanNaim,代码行数:30,代码来源:FormAddNewPhotos.cs


注:本文中的System.Windows.Forms.WebBrowser.Show方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。