static void Main() { AttachConsole(ATTACH_PARENT_PROCESS); Application.SetHighDpiMode(HighDpiMode.SystemAware); Application.EnableVisualStyles(); EventAggregator ea = new EventAggregator(); MyForm form = new MyForm(ea); Controller controller = new Controller(form); ea.RegisterSubscriber <TreeViewClicked>(controller); ea.RegisterSubscriber <UserFileEditClicked>(controller); ea.RegisterSubscriber <UserFileEditingFinished>(controller); ea.RegisterSubscriber <UserFileAddClicked>(controller); ea.RegisterSubscriber <UserFileAddingFinished>(controller); Application.Run(form); }
public Controller(MyForm f) { form = f; }