fork download
  1. class MyListView : ListView
  2. {
  3. public bool Scflag = false;
  4. public double Speed = 1.0f;
  5. ListViewItem _scrItm;
  6. int _index;
  7. public async Task AutoScrollAsync()
  8. {
  9. Scflag = !Scflag;
  10. while (Scflag)
  11. {
  12. mv(mvP());
  13. await Task.Delay(16);
  14. }
  15. Scflag = false;
  16. }
  17.  
  18. private double mvP()
  19. {
  20. _index = (int)_sv.VerticalOffset - 2;
  21. _scrItm = this.ContainerFromIndex(_index) as ListViewItem;
  22. return Speed / _scrItm.ActualHeight;
  23. }
  24.  
  25. private void mv(double p)
  26. {
  27. _sv.ChangeView(null, _sv.VerticalOffset + p, null);
  28. _sv.UpdateLayout();
  29. }
  30. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(7,41): error CS1519: Unexpected symbol `AutoScrollAsync' in class, struct, or interface member declaration
prog.cs(7,27): error CS1520: Class, struct, or interface method must have a return type
prog.cs(13,26): error CS1525: Unexpected symbol `.', expecting `,', `;', or `='
Compilation failed: 3 error(s), 0 warnings
stdout
Standard output is empty