public MainFrame(LoginUser loginInfo) { LoginInfo = loginInfo; Data = new SGLLData(LoginInfo); SGLL = new SGLLController(new IPadBridge(), Data); MultipleUserCtl.RegisterController(loginInfo.Username, SGLL); InitializeComponent(); }
public static void RegisterController(string userName, SGLLController controller) { if (string.IsNullOrWhiteSpace(userName) || controller == null) throw new ArgumentNullException(); if (controllers.ContainsKey(userName)) controllers.Remove(userName); controllers.Add(userName, controller); }