亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? form.cs

?? mpi并行計(jì)算的c++代碼 可用vc或gcc編譯通過(guò) 可以用來(lái)搭建并行計(jì)算試驗(yàn)環(huán)境
?? CS
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
/* -*- Mode: C; c-basic-offset:4 ; -*- *//* *  (C) 2001 by Argonne National Laboratory. *      See COPYRIGHT in top-level directory. */using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Data;using System.Net;using System.Net.Sockets;using System.IO;using System.Threading;using System.Text;using System.Collections.Specialized;namespace MandelViewer{	public class MandelViewerForm : System.Windows.Forms.Form	{		private System.Windows.Forms.Button connect_button;		private System.Windows.Forms.TextBox host;		private System.Windows.Forms.TextBox port;		private System.Windows.Forms.PictureBox outputBox;		private bool bConnected = false;		private TcpClient sock = null;		private static BinaryWriter sock_writer = null;		private static BinaryReader sock_reader = null;		private static Bitmap bitmap = null;		private int nWidth, nHeight;		private static int nNumColors = 100;		private static int nMax = 100;		private static Color [] colors = null;		private static double xmin = -1.0, ymin = -1.0, xmax = 1.0, ymax = 1.0;		private static bool bDrawing = false;		private static PictureBox pBox = null;		private Point p1, p2;		private Thread thread = null;		private System.Windows.Forms.Button demo_button;		private System.Windows.Forms.ComboBox points_comboBox;		private Rectangle rBox;		private System.Windows.Forms.Button go_stop_button;		private static ArrayList demo_list = null;		private static bool bDemoMode = false;		private static int demo_iter = 0;		private static MandelViewerForm form = null;		static void work_thread()		{			int [] temp = new int[4];			int [] buffer = null;			int size;			int i, j, k;			Graphics g;			do			{				try				{					g = Graphics.FromImage(bitmap);					g.Clear(Color.Black);					g.Dispose();					g = null;					pBox.Invalidate();					if (bDemoMode)					{						if (demo_list != null)						{							if (demo_list.Count > demo_iter)							{								xmin = ((ExamplePoint)demo_list[demo_iter]).xmin;								ymin = ((ExamplePoint)demo_list[demo_iter]).ymin;								xmax = ((ExamplePoint)demo_list[demo_iter]).xmax;								ymax = ((ExamplePoint)demo_list[demo_iter]).ymax;								nMax = ((ExamplePoint)demo_list[demo_iter]).max_iter;								if (((ExamplePoint)demo_list[demo_iter]).name != null)									form.Text = "Mandelbrot Viewer - " + ((ExamplePoint)demo_list[demo_iter]).name;								else									form.Text = String.Format("Mandelbrot Viewer - {0}", demo_iter);								colors = new Color[nMax+1];								ColorRainbow.Make_color_array(nNumColors, colors);								colors[nMax] = Color.FromKnownColor(KnownColor.Black); // add one on the top to avoid edge errors							}							demo_iter++;							if (demo_iter >= demo_list.Count)								demo_iter = 0;						}					}					if (colors.Length != nMax + 1)					{						colors = new Color[nMax+1];						ColorRainbow.Make_color_array(nNumColors, colors);						colors[nMax] = Color.FromKnownColor(KnownColor.Black); // add one on the top to avoid edge errors					}					sock_writer.Write(xmin);					sock_writer.Write(ymin);					sock_writer.Write(xmax);					sock_writer.Write(ymax);					sock_writer.Write(nMax);					for (;;)					{						temp[0] = sock_reader.ReadInt32();						temp[1] = sock_reader.ReadInt32();						temp[2] = sock_reader.ReadInt32();						temp[3] = sock_reader.ReadInt32();						if (temp[0] == 0 && temp[1] == 0 && temp[2] == 0 && temp[3] == 0)						{							if (bDemoMode)							{								Thread.Sleep(5000);								break;							}							bDrawing = false;							return;						}						size = (temp[1] + 1 - temp[0]) * (temp[3] + 1 - temp[2]);						buffer = new int[size];						for (i=0; i<size; i++)							buffer[i] = sock_reader.ReadInt32();						int max_color = colors.Length;						Random rand = new Random();						try						{							lock (bitmap)							{								k = 0;								for (j=temp[2]; j<=temp[3]; j++)								{									for (i=temp[0]; i<=temp[1]; i++)									{										//bitmap.SetPixel(i, j, colors[buffer[k]]);																				if (buffer[k] >= 0 && buffer[k] < max_color)											bitmap.SetPixel(i, j, colors[buffer[k]]);										else										{											bitmap.SetPixel(i, j, Color.FromArgb(rand.Next(0, 255), rand.Next(0, 255), rand.Next(0,255)));										}																				k++;									}								}							}						}						catch (Exception e)						{							MessageBox.Show("exception thrown while accessing bitmap: " + e.Message, "Error");						}						pBox.Invalidate();					}				}				catch (Exception e)				{					// do something with the exception					MessageBox.Show("Exception thrown in worker thread: " + e.Message, "Error");					break;				}			} while (bDemoMode);			bDrawing = false;		}		/// <summary>		/// Required designer variable.		/// </summary>		private System.ComponentModel.Container components = null;		public MandelViewerForm()		{			InitializeComponent();			try			{				// This throws a security exception if you are on a network share or				// running from the web.				host.Text = System.Environment.MachineName;			} 			catch (Exception)			{				host.Text = "localhost";			}			port.Text = "7470";			p1 = new Point(0,0);			p2 = new Point(0,0);			rBox = new Rectangle(0,0,0,0);			go_stop_button.Enabled = false;		}		/// <summary>		/// Clean up any resources being used.		/// </summary>		protected override void Dispose( bool disposing )		{			if( disposing )			{				if (components != null) 				{					components.Dispose();				}			}			base.Dispose( disposing );		}		#region Windows Form Designer generated code		/// <summary>		/// Required method for Designer support - do not modify		/// the contents of this method with the code editor.		/// </summary>		private void InitializeComponent()		{			this.connect_button = new System.Windows.Forms.Button();			this.host = new System.Windows.Forms.TextBox();			this.port = new System.Windows.Forms.TextBox();			this.outputBox = new System.Windows.Forms.PictureBox();			this.demo_button = new System.Windows.Forms.Button();			this.points_comboBox = new System.Windows.Forms.ComboBox();			this.go_stop_button = new System.Windows.Forms.Button();			this.SuspendLayout();			// 			// connect_button			// 			this.connect_button.Location = new System.Drawing.Point(8, 8);			this.connect_button.Name = "connect_button";			this.connect_button.Size = new System.Drawing.Size(56, 23);			this.connect_button.TabIndex = 0;			this.connect_button.Text = "Connect";			this.connect_button.Click += new System.EventHandler(this.connect_button_Click);			// 			// host			// 			this.host.Location = new System.Drawing.Point(72, 8);			this.host.Name = "host";			this.host.TabIndex = 1;			this.host.Text = "host";			// 			// port			// 			this.port.Location = new System.Drawing.Point(176, 8);			this.port.Name = "port";			this.port.Size = new System.Drawing.Size(40, 20);			this.port.TabIndex = 2;			this.port.Text = "7470";			// 			// outputBox			// 			this.outputBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 				| System.Windows.Forms.AnchorStyles.Left) 				| System.Windows.Forms.AnchorStyles.Right)));			this.outputBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;			this.outputBox.Location = new System.Drawing.Point(8, 40);			this.outputBox.Name = "outputBox";			this.outputBox.Size = new System.Drawing.Size(760, 760);			this.outputBox.TabIndex = 3;			this.outputBox.TabStop = false;			this.outputBox.Paint += new System.Windows.Forms.PaintEventHandler(this.outputBox_Paint);			this.outputBox.MouseUp += new System.Windows.Forms.MouseEventHandler(this.outputBox_MouseUp);			this.outputBox.MouseMove += new System.Windows.Forms.MouseEventHandler(this.outputBox_MouseMove);			this.outputBox.MouseDown += new System.Windows.Forms.MouseEventHandler(this.outputBox_MouseDown);			// 			// demo_button			// 			this.demo_button.Location = new System.Drawing.Point(224, 8);			this.demo_button.Name = "demo_button";			this.demo_button.Size = new System.Drawing.Size(88, 23);			this.demo_button.TabIndex = 4;			this.demo_button.Text = "Demo Points";			this.demo_button.Click += new System.EventHandler(this.demo_button_Click);			// 			// points_comboBox			// 			this.points_comboBox.Location = new System.Drawing.Point(320, 8);			this.points_comboBox.MaxDropDownItems = 20;			this.points_comboBox.Name = "points_comboBox";			this.points_comboBox.Size = new System.Drawing.Size(400, 21);			this.points_comboBox.TabIndex = 5;			this.points_comboBox.Text = "points";			this.points_comboBox.DropDown += new System.EventHandler(this.points_comboBox_DropDown);			this.points_comboBox.SelectedValueChanged += new System.EventHandler(this.points_comboBox_SelectedValueChanged);			// 			// go_stop_button			// 			this.go_stop_button.Location = new System.Drawing.Point(728, 8);			this.go_stop_button.Name = "go_stop_button";			this.go_stop_button.Size = new System.Drawing.Size(40, 23);			this.go_stop_button.TabIndex = 6;			this.go_stop_button.Text = "Go";			this.go_stop_button.Click += new System.EventHandler(this.go_stop_button_Click);			// 			// MandelViewerForm			// 			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);			this.ClientSize = new System.Drawing.Size(776, 811);			this.Controls.Add(this.go_stop_button);			this.Controls.Add(this.points_comboBox);			this.Controls.Add(this.demo_button);			this.Controls.Add(this.outputBox);			this.Controls.Add(this.port);			this.Controls.Add(this.host);			this.Controls.Add(this.connect_button);			this.Name = "MandelViewerForm";			this.Text = "Mandelbrot Viewer";			this.Resize += new System.EventHandler(this.MandelViewerForm_Resize);			this.ResumeLayout(false);		}		#endregion		/// <summary>		/// The main entry point for the application.		/// </summary>		[STAThread]		static void Main() 		{			double d = 0.0;			int i = 0;			form = new MandelViewerForm();			Application.Run(form);			try			{				// tell the mpi program to stop				MandelViewerForm.sock_writer.Write(d);				MandelViewerForm.sock_writer.Write(d);				MandelViewerForm.sock_writer.Write(d);				MandelViewerForm.sock_writer.Write(d);				MandelViewerForm.sock_writer.Write(i);			}			catch (Exception)			{				// Do nothing.  It just means that the socket connection to the pmandel program is broken.			}		}		private void connect_button_Click(object sender, System.EventArgs e)		{			if (bConnected)			{				MessageBox.Show("You may only connect once", "Note");				return;			}			try			{				sock = new TcpClient(host.Text, Convert.ToInt32(port.Text));				if (sock == null)				{					MessageBox.Show("Unable to connect to " + host.Text + " on port " + port.Text, "Error");					return;				}			}			catch(SocketException exception)			{				MessageBox.Show("Unable to connect to " + host.Text + " on port " + port.Text + ", " + exception.Message, "Error");				return;			}			bConnected = true;			sock_writer = new BinaryWriter(sock.GetStream());			sock_reader = new BinaryReader(sock.GetStream());			nWidth = sock_reader.ReadInt32();			nHeight = sock_reader.ReadInt32();			nNumColors = sock_reader.ReadInt32();			nMax = sock_reader.ReadInt32();			//MessageBox.Show(String.Format("Width: {0}, Height: {1}, num_colors: {2}", nWidth, nHeight, nNumColors), "Note");			// validate input values			if (nWidth > 2048)				nWidth = 2048;			if (nWidth < 1)				nWidth = 768;			if (nHeight > 2048)				nHeight = 2048;			if (nHeight < 1)				nHeight = 768;			if (nNumColors > 1024)				nNumColors = 1024;			if (nNumColors < 1)				nNumColors = 128;			if (nMax < 1)				nMax = 100;			if (nMax > 5000)				nMax = 5000;			colors = new Color[nMax+1];			ColorRainbow.Make_color_array(nNumColors, colors);			colors[nMax] = Color.FromKnownColor(KnownColor.Black); // add one on the top to avoid edge errors			bitmap = new Bitmap(nWidth, nHeight, System.Drawing.Imaging.PixelFormat.Format24bppRgb);			Graphics g;			g = Graphics.FromImage(bitmap);			g.Clear(Color.FromKnownColor(KnownColor.Black));			g.Dispose();			/*			Rectangle rButton = connect_button.Bounds;			Rectangle rBox = outputBox.Bounds;			outputBox.SetBounds(rButton.Left, rButton.Top, rBox.Width, rBox.Height + (rBox.Top - rButton.Top));			connect_button.Hide();			host.Hide();			port.Hide();			outputBox.Invalidate();			*/			connect_button.Enabled = false;			host.ReadOnly = true;			port.ReadOnly = true;			if (demo_list != null && demo_list.Count > 0)			{				go_stop_button.Enabled = true;			}			bDrawing = true;			pBox = outputBox;			ThreadStart threadProc = new ThreadStart(work_thread);		    thread = new Thread(threadProc);			thread.Start();		}		private void outputBox_Paint(object sender, System.Windows.Forms.PaintEventArgs e)		{			if (bConnected && bitmap != null)			{				lock (bitmap)				{					e.Graphics.DrawImage(bitmap, 0, 0, outputBox.Size.Width, outputBox.Size.Height);					if (rBox.Width > 0 && rBox.Height > 0)					{						SolidBrush brush = new SolidBrush(Color.FromArgb(198,255,255,0));						e.Graphics.FillRectangle(brush, rBox);					}				}			}		}		private void MandelViewerForm_Resize(object sender, System.EventArgs e)		{			if (bConnected)			{				outputBox.Invalidate();			}		}		private void outputBox_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)		{			if (!bDrawing && e.Button == MouseButtons.Left)			{				p1 = new Point(e.X, e.Y);				rBox = new Rectangle(p1.X, p1.Y, 0, 0);			}		}		private void outputBox_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)		{			if (!bDrawing && e.Button == MouseButtons.Left)			{				int x, y;				p2 = new Point(e.X, e.Y);				x = Math.Min(p1.X, p2.X);				y = Math.Min(p1.Y, p2.Y);				rBox = new Rectangle(x, y, Math.Max(p1.X, p2.X) - x, Math.Max(p1.Y, p2.Y) - y);				outputBox.Invalidate();			}		}		private void outputBox_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)		{			if (e.Button == MouseButtons.Left)			{				if (!bDrawing && thread != null)				{					Rectangle r;					double x1,y1,x2,y2;					double width, height, pixel_width, pixel_height;					int x, y;					if (p1.X == e.X && p1.Y == e.Y)					{						return;					}					p2 = new Point(e.X, e.Y);					x = Math.Min(p1.X, p2.X);					y = Math.Min(p1.Y, p2.Y);					thread.Join();					r = new Rectangle(x, y, Math.Max(p1.X, p2.X) - x, Math.Max(p1.Y, p2.Y) - y);					width = xmax - xmin;					height = ymax - ymin;					pixel_width = outputBox.Width;					pixel_height = outputBox.Height;					x1 = xmin + ((double)r.Left * width / pixel_width);					x2 = xmin + ((double)r.Right * width / pixel_width);					y2 = ymin + ((double)(pixel_height - r.Top) * height / pixel_height);					y1 = ymin + ((double)(pixel_height - r.Bottom) * height / pixel_height);					xmin = x1;					xmax = x2;					ymin = y1;					ymax = y2;					ExamplePoint ep = new ExamplePoint(xmin, ymin, xmax, ymax, nMax, "dragged");					Text = "Mandelbrot Viewer" + ep.ToShortString();					bDrawing = true;					ThreadStart threadProc = new ThreadStart(work_thread);					thread = new Thread(threadProc);					thread.Start();					rBox = new Rectangle(x, y, 0, 0);					outputBox.Invalidate();				}			}			if (e.Button == MouseButtons.Right)			{				if (!bDrawing && thread != null)				{					thread.Join();					xmin = -1.0;					xmax = 1.0;					ymin = -1.0;					ymax = 1.0;					bDrawing = true;					ThreadStart threadProc = new ThreadStart(work_thread);					thread = new Thread(threadProc);					thread.Start();					rBox = new Rectangle(0, 0, 0, 0);					outputBox.Invalidate();				}			}		}		private void demo_button_Click(object sender, System.EventArgs e)		{			if (demo_list == null)				demo_list = new ArrayList();			OpenFileDialog dlg = new OpenFileDialog();			dlg.InitialDirectory = "c:\\";			dlg.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*";			dlg.FilterIndex = 1;			dlg.RestoreDirectory = true;			if(dlg.ShowDialog() == DialogResult.OK)			{

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产大片一区二区| 成人美女视频在线看| 麻豆freexxxx性91精品| 久久国产精品第一页| 色久优优欧美色久优优| 欧美一区二区网站| 中文字幕精品—区二区四季| 蜜桃视频一区二区| 色综合久久久久网| 国产精品免费视频一区| 午夜视频一区二区三区| 蜜臀精品一区二区三区在线观看| 色视频成人在线观看免| 久久综合九色欧美综合狠狠| 婷婷开心激情综合| av影院午夜一区| 精品国产人成亚洲区| 亚洲综合999| 国产福利精品导航| 色婷婷av久久久久久久| 亚洲国产成人一区二区三区| 亚洲国产日韩综合久久精品| 91视频在线观看| 国产色产综合色产在线视频| 久久国产生活片100| 一本色道**综合亚洲精品蜜桃冫| 国产精品毛片无遮挡高清| 日本美女一区二区| 欧美中文字幕一区二区三区亚洲| 亚洲色图一区二区三区| 国产成人99久久亚洲综合精品| 久久综合精品国产一区二区三区| 日韩激情在线观看| 国产91丝袜在线18| 综合欧美一区二区三区| 国产一区二区三区久久悠悠色av| 337p粉嫩大胆噜噜噜噜噜91av| 亚洲成在人线免费| 欧美一级黄色片| 天天综合色天天| 97精品久久久午夜一区二区三区 | 91在线你懂得| 91精品国产综合久久精品| 中文字幕亚洲电影| 国产盗摄精品一区二区三区在线 | 国产真实乱对白精彩久久| 在线观看网站黄不卡| 中文字幕在线播放不卡一区| 日本乱人伦aⅴ精品| 亚洲免费av在线| 欧美人狂配大交3d怪物一区 | 99精品视频一区| 亚洲人成网站在线| 91丨九色porny丨蝌蚪| 香蕉影视欧美成人| 欧美日韩一区不卡| 亚洲欧美国产77777| 欧美日韩免费观看一区三区| 亚洲影视在线观看| 日韩午夜电影在线观看| 麻豆久久一区二区| 国产精品不卡视频| 在线观看视频一区二区| 国产精品麻豆一区二区| 91久久精品国产91性色tv| 久久久蜜臀国产一区二区| 国产99久久久国产精品潘金| 精品国产乱码久久久久久闺蜜| av激情亚洲男人天堂| 亚洲欧洲av在线| 日韩区在线观看| 国产精品一品二品| 亚洲一区二区三区自拍| 欧美老年两性高潮| 不卡影院免费观看| 亚洲自拍偷拍欧美| 精品国精品自拍自在线| 欧美私模裸体表演在线观看| 琪琪久久久久日韩精品| 最新欧美精品一区二区三区| 欧美日韩一二三区| av在线播放成人| 另类小说图片综合网| 成人手机电影网| 一区二区三区.www| 制服丝袜亚洲播放| 国产传媒一区在线| 午夜久久久影院| 中文字幕第一区第二区| 欧美精品在线一区二区三区| 国产在线精品一区二区不卡了| 一区二区三区在线不卡| 精品国产一区二区三区久久久蜜月| 日本福利一区二区| 国产专区欧美精品| 午夜视频久久久久久| 国产精品麻豆网站| 日本一区二区三区久久久久久久久不 | 亚洲欧美一区二区三区久本道91 | 中文字幕亚洲区| 成人精品国产免费网站| 久久99国产精品久久99| 亚洲色图都市小说| 国产精品久久久爽爽爽麻豆色哟哟| 欧美一区二区视频网站| 欧美日韩一二三| 不卡视频一二三| 国产成人免费视频网站| 五月天亚洲婷婷| 婷婷六月综合亚洲| 亚洲激情一二三区| 一区二区三区四区中文字幕| 久久久久久麻豆| 欧美日韩激情一区二区| 欧美综合一区二区三区| 成人毛片视频在线观看| 成人免费视频视频| 国产精一品亚洲二区在线视频| 久草在线在线精品观看| 日本不卡123| 狠狠色丁香九九婷婷综合五月| 丝袜美腿亚洲综合| 免费观看在线色综合| 午夜精品久久久久| 麻豆freexxxx性91精品| 日韩电影免费在线看| 偷拍一区二区三区四区| 亚洲成av人**亚洲成av**| 国产精品久久久久久久久动漫| 综合欧美亚洲日本| 国产精品色哟哟| 亚洲免费三区一区二区| 亚洲人成小说网站色在线| 亚洲v中文字幕| 亚洲va在线va天堂| 久久99精品国产麻豆不卡| 另类小说综合欧美亚洲| 国产成人在线视频网址| 国v精品久久久网| 国产aⅴ精品一区二区三区色成熟| 国产成a人亚洲| 国产一区二区在线免费观看| jlzzjlzz亚洲女人18| 91亚洲精品久久久蜜桃网站| 欧美日韩不卡一区二区| 91精品国产高清一区二区三区| 国产亚洲欧美激情| 国产精品久久久久久久浪潮网站| 亚洲午夜免费福利视频| 午夜精品久久久久久久99樱桃| 狠狠狠色丁香婷婷综合激情 | 日韩精品中文字幕一区| 久久久久久久久岛国免费| 一卡二卡三卡日韩欧美| 亚洲123区在线观看| 粉嫩嫩av羞羞动漫久久久| 91麻豆.com| 亚洲精品一区二区三区福利| 国产精品久久一级| 免费av网站大全久久| 国产精品亚洲一区二区三区妖精 | 天堂久久久久va久久久久| 视频精品一区二区| 国产自产v一区二区三区c| av午夜精品一区二区三区| 在线播放一区二区三区| 欧美电影精品一区二区| 中文字幕综合网| 日韩成人免费电影| 成人国产一区二区三区精品| 日本久久电影网| 欧美精品一区二区三| 亚洲专区一二三| 国产做a爰片久久毛片| 666欧美在线视频| 国产精品黄色在线观看| 国产剧情av麻豆香蕉精品| 欧美在线免费观看亚洲| 日韩毛片高清在线播放| 亚洲综合丝袜美腿| 一本色道久久综合亚洲91| 欧美一区二区精品在线| 亚洲图片一区二区| 久久精品国产亚洲一区二区三区| 欧美三级欧美一级| 精品国产123| 麻豆一区二区在线| 一本大道久久a久久综合婷婷| 国产精品久久久久久久久久久免费看 | 91美女精品福利| 久久婷婷成人综合色| 极品少妇xxxx精品少妇| 色狠狠综合天天综合综合| 亚洲日韩欧美一区二区在线| 国产精品一二一区| 国产精品入口麻豆九色| 国产乱子伦视频一区二区三区 | 日韩电影网1区2区| 制服丝袜av成人在线看| 中文字幕一区二区三区乱码在线 |