private void MainForm_Load(object sender, EventArgs e) { vp.GridLevel = 10; this.Connect = new ConnectDelegate(ShowConnection); this.DrawPixel = new DrawPixelDelegate(DrawPixel3DView); this.DrawChunk = new DrawChunkDelegate(DrawChunk3DView); this.Monitor = new MonitorDelegate(UpdateMonitor); this.antialias.SelectedIndex = 0; td_bitmap = new Bitmap(view_3d.Width, view_3d.Height); empty_bitmap(td_bitmap); view_3d.Image = td_bitmap; this.client = new ConClient(); this.listenerWorker = new ListenerWorker(client, this); this.listenerWorker.WorkerSupportsCancellation = true; this.listenerWorker.Offline = false; this.calculusWorker.Offline = false; calculusWorker.Connection = client; calculusWorker.DestinationImage = view_3d.Image; ol.Add(new Camera()); ol.Selected = ol.Collection[0]; redraw(); show_server_mapping.Enabled = false; }
public ListenerWorker(ConClient con, MainForm form) { this.Connection = con; _form = form; this.DoWork += new DoWorkEventHandler(doListen); }