private void onMouseMove(object sender, MouseEventArgs e) { if (selectedMode == ObjectMode.Tile) { tilemode.OnMouseMove(e); } else if (selectedMode == ObjectMode.Exits) { exitmode.onMouseMove(e); } else if (selectedMode == ObjectMode.OWDoor) { doorMode.onMouseMove(e); } else if (selectedMode == ObjectMode.Entrances) { entranceMode.onMouseMove(e); } else if (selectedMode == ObjectMode.Itemmode) { itemMode.onMouseMove(e); } else if (selectedMode == ObjectMode.Spritemode) { spriteMode.onMouseMove(e); } else if (selectedMode == ObjectMode.Flute) { transportMode.onMouseMove(e); } }
private void onMouseMove(object sender, MouseEventArgs e) { Stopwatch sw = new Stopwatch(); sw.Start(); if (selectedMode == ObjectMode.Tile) { tilemode.OnMouseMove(e); } else if (selectedMode == ObjectMode.Overlay) { overlayMode.OnMouseMove(e); } else if (selectedMode == ObjectMode.Exits) { exitmode.onMouseMove(e); } else if (selectedMode == ObjectMode.OWDoor) { doorMode.onMouseMove(e); } else if (selectedMode == ObjectMode.Entrances) { entranceMode.onMouseMove(e); } else if (selectedMode == ObjectMode.Itemmode) { itemMode.onMouseMove(e); } else if (selectedMode == ObjectMode.Spritemode) { spriteMode.onMouseMove(e); } else if (selectedMode == ObjectMode.Flute) { transportMode.onMouseMove(e); } else if (selectedMode == ObjectMode.Gravestone) { gravestoneMode.onMouseMove(e); } if (lowEndMode) { int x = ow.allmaps[selectedMap].parent % 8; int y = ow.allmaps[selectedMap].parent / 8; if (!ow.allmaps[ow.allmaps[selectedMap].parent].largeMap) { Invalidate(new Rectangle(x * 512, y * 512, 512, 512)); } else { Invalidate(new Rectangle(x * 512, y * 512, 1024, 1024)); } } else { Invalidate(new Rectangle(owForm.splitContainer1.Panel2.HorizontalScroll.Value, owForm.splitContainer1.Panel2.VerticalScroll.Value, owForm.splitContainer1.Panel2.Width, owForm.splitContainer1.Panel2.Height)); } sw.Stop(); Console.WriteLine("Entire OW Draw ms : " + sw.ElapsedMilliseconds); }