Esempio n. 1
0
        private void InitData()
        {
            bUS_Schedule = new BUS_Schedule();

            myScheduleWorker = new BackgroundWorker();
            myScheduleWorker.WorkerSupportsCancellation = true;
            myScheduleWorker.DoWork             += MyScheduleWorker_DoWork;
            myScheduleWorker.RunWorkerCompleted += MyScheduleWorker_RunWorkerCompleted;

            getScheduleWorker = new BackgroundWorker();
            getScheduleWorker.WorkerSupportsCancellation = true;
            getScheduleWorker.DoWork             += GetScheduleWorker_DoWork;
            getScheduleWorker.RunWorkerCompleted += GetScheduleWorker_RunWorkerCompleted;

            delScheduleWorker = new BackgroundWorker();
            delScheduleWorker.WorkerSupportsCancellation = true;
            delScheduleWorker.DoWork             += DelScheduleWorker_DoWork;
            delScheduleWorker.RunWorkerCompleted += DelScheduleWorker_RunWorkerCompleted;


            if (this.mode == EType.WindowMode.ADD_MODE)
            {
                btDelete.IsEnabled = false;
            }
            else
            {
                btDelete.IsEnabled = true;
            }
        }
Esempio n. 2
0
        public LaunchWindow(DTO_CardHolder loginUser)
        {
            InitializeComponent();
            this.loginUser = loginUser;

            bus_Card       = new BUS_Card();
            bus_CardHolder = new BUS_CardHolder();
            bus_Device     = new BUS_Device();
            bus_Schedule   = new BUS_Schedule();
            bus_Door       = new BUS_Door();
            bus_DoorMode   = new BUS_DoorMode();
            bUS_Right      = new BUS_Right();
            bUS_Department = new BUS_Department();

            lstDataType = new List <string>()
            {
                "CARD", "HOLDER", "DEVICE", "SCHEDULE", "DOOR", "DOOR_MODE", "RIGHT", "DEPARTMENT", "LOADHOLDERDEPT"
            };

            wokerLoadAllData = new BackgroundWorker();
            wokerLoadAllData.WorkerReportsProgress = true;
            wokerLoadAllData.DoWork             += WokerLoadAllData_DoWork;
            wokerLoadAllData.ProgressChanged    += WokerLoadAllData_ProgressChanged;
            wokerLoadAllData.RunWorkerCompleted += WokerLoadAllData_RunWorkerCompleted;

            wokerLoadAllData.RunWorkerAsync();
        }
Esempio n. 3
0
        public MainWindow()
        {
            InitializeComponent();
            bus_Card         = new BUS_Card();
            bus_CardHolder   = new BUS_CardHolder();
            bus_Device       = new BUS_Device();
            bUS_DeviceSocket = new BUS_DeviceSocket();
            bUS_Schedule     = new BUS_Schedule();
            bUS_Door         = new BUS_Door();
            bus_Right        = new BUS_Right();

            lstFilterCard       = new List <DTO_Card>();
            lstFilterDepartment = new List <DTO_Department>();
            lstFilterDevice     = new List <DTO_Device>();
            lstFilterDoor       = new List <DTO_Door>();
            lstFilterSchedule   = new List <DTO_Schedule>();
            lstFilterRight      = new List <DTO_UserRight>();


            this.DataContext = this;
        }