public MainFrame(User user) { User = user; Data = new SgllData(user); SgController = new SgllController(Data); MultipleUserCtl.RegisterController(user.GetMultiCtrlKey(), SgController); InitializeComponent(); }
public static void RegisterController(string role, SgllController controller) { if (string.IsNullOrWhiteSpace(role) || controller == null) throw new ArgumentNullException(); if (controllers.ContainsKey(role)) controllers.Remove(role); controllers.Add(role, controller); }