コード例 #1
0
ファイル: AdminForm.cs プロジェクト: Systemic33/Intracker
        public AdminForm(UnitOfWork unitOfWork)
        {
            if (unitOfWork == null)
            {
                throw new NullReferenceException();
            }

            UnitOfWork = unitOfWork;
            InitializeComponent();
            SetElementSize();

            Users = new BindingList<User>();
            UserList.DataSource = Users;
            UserList.DisplayMember = "Name";

            Items = new BindingList<Item>();
            ItemList.DataSource = Items;
            ItemList.DisplayMember = "Name";

            RefreshLogo();
            RefreshUsers();
            RefreshItems();

            AddLogMessage(1, "This is the admin interface, use with caution!");
        }
コード例 #2
0
        public AdminLoginForm(UnitOfWork unitOfWork)
        {
            if (unitOfWork == null)
            {
                throw new NullReferenceException();
            }

            UnitOfWork = unitOfWork;
            InitializeComponent();
        }
コード例 #3
0
ファイル: IdleForm.cs プロジェクト: Systemic33/Intracker
        public IdleForm(UnitOfWork unitOfWork)
        {
            if (unitOfWork == null)
            {
                throw new NullReferenceException();
            }

            UnitOfWork = unitOfWork;
            InitializeComponent();
            SetElementSize();
            RefreshLogo();
        }
コード例 #4
0
ファイル: LoggedInForm.cs プロジェクト: Systemic33/Intracker
        public LoggedInForm(UnitOfWork unitOfWork, User loggedInUser, IdleForm idleForm)
        {
            if (unitOfWork == null)
            {
                throw new NullReferenceException();
            }

            UnitOfWork = unitOfWork;
            IdleForm = idleForm;
            PurchaseHistory = new BindingList<string>();
            CheckOutList = new BindingList<Purchase>();
            Multipliers = new Dictionary<string, int>();
            logLevel = 3;
            generateMultipliers();
            LoggedInUser = loggedInUser;
            InitializeComponent();
            SetElementSize();
            AddLogMessage(1, String.Format("--- Welcome to InTracker! Current time is {0:HH:mm}", DateTime.Now));
            UpdateElements(loggedInUser);
            UpdateHistoryList();
            RefreshLogo();
        }