Exemple #1
0
 public MainFrame(User user)
 {
     User = user;
     Data = new SgllData(user);
     SgController = new SgllController(Data);
     MultipleUserCtl.RegisterController(user.GetMultiCtrlKey(), SgController);
     InitializeComponent();
 }
Exemple #2
0
        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);
        }