This is a master class of how not to design something. move it to MVVM.