예제 #1
0
파일: main.cs 프로젝트: hitswa/winforms
		void gui () {
			SuspendLayout ();
			this.StartPosition = FormStartPosition.Manual;
			this.Left = 400;
			this.Top = 100;
			this.Size = new Size (650, 650);

			controls = new controls (this);
			controls.SuspendLayout ();
			controls.Top = 100;
			monitor = new monitor(this);
			monitor.SuspendLayout ();
			monitor.Top = 100;
			controls.Size = new Size(400, 400);
			monitor.Size = new Size(400, 400);
			controls.Left = this.Left - 400;
			monitor.Left = this.Right;
			
			webBrowser = new WebBrowser ();
			webBrowser.Navigating += delegate (object sender, WebBrowserNavigatingEventArgs args) {
				monitor.addEvent ("Navigating");
			};
			webBrowser.Navigated += delegate (object sender, WebBrowserNavigatedEventArgs args) {
				navigated++;
				monitor.addEvent ("Navigated");
			};
			webBrowser.CanGoBackChanged += delegate (object sender, EventArgs args) {
				monitor.addEvent ("CanGoBackChanged");
			};
			webBrowser.CanGoForwardChanged += delegate (object sender, EventArgs args) {
				monitor.addEvent ("CanGoForwardChanged");
			};
			webBrowser.DocumentCompleted  += delegate (object sender, WebBrowserDocumentCompletedEventArgs args) {
				monitor.addEvent ("DocumentCompleted");
			};
			webBrowser.DocumentTitleChanged += delegate (object sender, EventArgs args) {
				monitor.addEvent ("DocumentTitleChanged");
			};
			webBrowser.EncryptionLevelChanged  += delegate (object sender, EventArgs args) {
				monitor.addEvent ("EncryptionLevelChanged");
			};
			webBrowser.FileDownload  += delegate (object sender, EventArgs args) {
				monitor.addEvent ("FileDownload");
			};
			webBrowser.NewWindow += delegate (object sender, CancelEventArgs args) {
				monitor.addEvent ("NewWindow");
			};
			webBrowser.ProgressChanged  += delegate (object sender, WebBrowserProgressChangedEventArgs args) {
				monitor.addEvent ("ProgressChanged");
			};
			webBrowser.StatusTextChanged  += delegate (object sender, EventArgs args) {
				monitor.addEvent ("StatusTextChanged");
			};
			webBrowser.Dock = DockStyle.Fill;
			this.Controls.Add (webBrowser);
			
			monitor.ResumeLayout ();
			controls.ResumeLayout ();
			this.ResumeLayout ();
		}
예제 #2
0
파일: main.cs 프로젝트: wateras/winforms
        void gui()
        {
            SuspendLayout();
            this.StartPosition = FormStartPosition.Manual;
            this.Left          = 400;
            this.Top           = 100;
            this.Size          = new Size(650, 650);

            controls = new controls(this);
            controls.SuspendLayout();
            controls.Top = 100;
            monitor      = new monitor(this);
            monitor.SuspendLayout();
            monitor.Top   = 100;
            controls.Size = new Size(400, 400);
            monitor.Size  = new Size(400, 400);
            controls.Left = this.Left - 400;
            monitor.Left  = this.Right;

            webBrowser             = new WebBrowser();
            webBrowser.Navigating += delegate(object sender, WebBrowserNavigatingEventArgs args) {
                monitor.addEvent("Navigating");
            };
            webBrowser.Navigated += delegate(object sender, WebBrowserNavigatedEventArgs args) {
                navigated++;
                monitor.addEvent("Navigated");
            };
            webBrowser.CanGoBackChanged += delegate(object sender, EventArgs args) {
                monitor.addEvent("CanGoBackChanged");
            };
            webBrowser.CanGoForwardChanged += delegate(object sender, EventArgs args) {
                monitor.addEvent("CanGoForwardChanged");
            };
            webBrowser.DocumentCompleted += delegate(object sender, WebBrowserDocumentCompletedEventArgs args) {
                monitor.addEvent("DocumentCompleted");
            };
            webBrowser.DocumentTitleChanged += delegate(object sender, EventArgs args) {
                monitor.addEvent("DocumentTitleChanged");
            };
            webBrowser.EncryptionLevelChanged += delegate(object sender, EventArgs args) {
                monitor.addEvent("EncryptionLevelChanged");
            };
            webBrowser.FileDownload += delegate(object sender, EventArgs args) {
                monitor.addEvent("FileDownload");
            };
            webBrowser.NewWindow += delegate(object sender, CancelEventArgs args) {
                monitor.addEvent("NewWindow");
            };
            webBrowser.ProgressChanged += delegate(object sender, WebBrowserProgressChangedEventArgs args) {
                monitor.addEvent("ProgressChanged");
            };
            webBrowser.StatusTextChanged += delegate(object sender, EventArgs args) {
                monitor.addEvent("StatusTextChanged");
            };
            webBrowser.Dock = DockStyle.Fill;
            this.Controls.Add(webBrowser);

            monitor.ResumeLayout();
            controls.ResumeLayout();
            this.ResumeLayout();
        }