コード例 #1
0
ファイル: MainFrame.cs プロジェクト: juniwang/rasg
 public MainFrame(User user)
 {
     User = user;
     Data = new SgllData(user);
     SgController = new SgllController(Data);
     MultipleUserCtl.RegisterController(user.GetMultiCtrlKey(), SgController);
     InitializeComponent();
 }
コード例 #2
0
ファイル: MultipleUserCtl.cs プロジェクト: juniwang/rasg
        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);
        }