示例#1
0
        public SerializerClient(Socket socket, AppsLIST app)
        {
            this.app = app;

            this.socket = socket;

            messages = new List <Message.Message>();

            var nwStream = new NetworkStream(socket);

            streamWrite = new LZ4Stream(nwStream, System.IO.Compression.CompressionMode.Compress);
            streamRead  = new LZ4Stream(nwStream, System.IO.Compression.CompressionMode.Decompress);

            //streamWrite = new NetworkStream(socket);
            //streamRead = new NetworkStream(socket);

            this.autoResetEvent = new AutoResetEvent(false);
            this.closed         = false;

            this.streamThread = new Thread(new ParameterizedThreadStart(this.StreamWorker));
            this.streamThread.IsBackground = true;
            this.streamThread.Start();

            this.sendThread = new Thread(new ParameterizedThreadStart(this.SendWorker));
            this.sendThread.IsBackground = true;
            this.sendThread.Start();

            this.keepAliveTimer           = new System.Timers.Timer();
            this.keepAliveTimer.Interval  = 1000;
            this.keepAliveTimer.AutoReset = false;
            this.keepAliveTimer.Elapsed  += KeepAliveTimer_Elapsed;

            //
            this.keepAliveTimer.Start();
        }
        public DanhSachBenhNhans(TypeBN type, AppsLIST app)
        {
            this.type    = type;
            this.appList = app;

            InitializeComponent();

            dbHN = new BenhNhanHienNoanDB(app.connString);
            dbHT = new BenhNhanHienTinhDB(app.connString);

            LoadChiMuc();

            switch (type)
            {
            case TypeBN.BNHienTinh:
            {
                LoadDataBNHT();
                break;
            }

            case TypeBN.BNHienNoan:
            {
                LoadDataBNHN();
                break;
            }
            }
        }
示例#3
0
        public QuanLyDanhMuc(AppsLIST app, ChiMucDB cmDB)
        {
            this.app  = app;
            this.cmDB = cmDB;

            InitializeComponent();
            FillDataToForm();
        }
示例#4
0
        public ClientApp(string address, int port, AppsLIST app)
        {
            this.app = app;

            this.address = address;
            this.port    = port;

            this.reconnectTimer           = new System.Timers.Timer();
            this.reconnectTimer.Interval  = 5000;
            this.reconnectTimer.AutoReset = false;
            this.reconnectTimer.Elapsed  += ReconnectTimer_Elapsed;

            this.ConnectToServer();
        }
示例#5
0
        public ConnectDBTT(AppsLIST app, ChiMucDB db)
        {
            this.app = app;
            this.db  = db;
            InitializeComponent();

            UrlTrungTam tt = db.GetUrlTrungTam();

            if (tt != null)
            {
                this.trungtam = tt;
                LoadDataDB();
            }
        }
示例#6
0
        public QuanLyBenhNhanNhanMau(AppsLIST app)
        {
            InitializeComponent();

            this.app = app;
            listNHTs = new List <HT_ThongTinNguoiHienTinh>();
            listNHNs = new List <HN_ThongTinNguoiHienNoan>();

            panel = QL_sgQuanLyNguoiNhan.PrimaryGrid;

            LoadItemSelect();

            dbQL = new QuanLyNguoiNhanDB();

            FillData();
        }
        public TrungTamHTSSDlg(AppsLIST app, ChiMucDB dbCM)
        {
            this.app  = app;
            this.dbCM = dbCM;

            InitializeComponent();
            LoadData();

            if (!app.IsUserAdmin())
            {
                btnSua.Hide();
                txtMaTrungTam.Enabled          = false;
                txtTenTrungTam.Enabled         = false;
                txtEmailTrungTam.Enabled       = false;
                txtDiaChiTrungTam.Enabled      = false;
                txtSoDienThoaiTrungTam.Enabled = false;
                txtWebsiteTrungTam.Enabled     = false;
            }
        }
示例#8
0
 public UserControlBN(AppsLIST app)
 {
     this.app = app;
 }