//end sinh btn park //sinh btn wash private void sinhbtnWash() { //design Guna.UI.WinForms.GunaGradientButton btnWash = new Guna.UI.WinForms.GunaGradientButton(); btnWash.Text = "WASH"; btnWash.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; btnWash.Font = new System.Drawing.Font("Times New Roman", 15F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); btnWash.ForeColor = Color.DarkGreen; btnWash.Radius = 4; btnWash.Image = null; btnWash.BaseColor1 = Color.White; btnWash.BaseColor2 = Color.Gray; btnWash.OnHoverBaseColor1 = Color.Gray; btnWash.OnHoverBaseColor2 = Color.White; //design this.flpService.Controls.Add(btnWash); btnWash.Click += new System.EventHandler(this.btnWash_Click); }
private void btnBike_Click(object sender, EventArgs e) { Guna.UI.WinForms.GunaGradientButton btn = sender as Guna.UI.WinForms.GunaGradientButton; string id = btn.Text; finfoXeGui form = new finfoXeGui(formQuanLyXeGui, "BaiXe"); DataTable table = this.VehicleBUS.getVehicleByID(id); form.pBHinh1.Image = Image.FromStream(this.picture(table, "Image 1")); form.pBHinh1.SizeMode = PictureBoxSizeMode.StretchImage; form.pBHinh2.Image = Image.FromStream(this.picture(table, "Image 2")); form.pBHinh2.SizeMode = PictureBoxSizeMode.StretchImage; form.txtID.Text = id.ToString(); form.txtLoaiXe.Text = "Xe Đạp"; form.lbHinh1.Text = "Hình Xe"; form.lbHinh2.Text = "Người Gửi"; //Xác định thứ trong tuần int thu = this.xacDinhThu(); String loaiGui = this.LoaiGui(id); form.txtLoaiGui.Text = loaiGui; int phi_theo_thu = 0; if (loaiGui != "") { phi_theo_thu = this.VehicleBUS.layTienTheoThu(thu, loaiGui); } form.txtDTGui.Text = table.Rows[0]["Time in"].ToString(); form.txtTongTien.Text = phi_theo_thu.ToString(); this.formQuanLyXeGui.openChildForm(form); }
//end button Fix //sinh button Park private void sinhbtnPark() { //design Guna.UI.WinForms.GunaGradientButton btnPark = new Guna.UI.WinForms.GunaGradientButton(); btnPark.Text = "PARK"; btnPark.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; btnPark.Font = new System.Drawing.Font("Times New Roman", 15F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); btnPark.ForeColor = Color.DarkGreen; btnPark.Radius = 4; btnPark.Image = null; btnPark.BaseColor1 = Color.FromArgb(((int)(((byte)(248)))), ((int)(((byte)(165)))), ((int)(((byte)(194))))); btnPark.BaseColor2 = Color.FromArgb(((int)(((byte)(241)))), ((int)(((byte)(242)))), ((int)(((byte)(246))))); btnPark.OnHoverBaseColor1 = Color.FromArgb(((int)(((byte)(241)))), ((int)(((byte)(242)))), ((int)(((byte)(246))))); btnPark.OnHoverBaseColor2 = Color.FromArgb(((int)(((byte)(248)))), ((int)(((byte)(165)))), ((int)(((byte)(194))))); //end design //thêm vào panel và tạo event click this.flpService.Controls.Add(btnPark); btnPark.Click += new System.EventHandler(this.btnPark_Click); }
private void fBaiXe_Load(object sender, EventArgs e) { //danh sach xe dap List <string> IDbicycle = VehicleBUS.danhSachID(0); if (IDbicycle.Count != 0) { foreach (var item in IDbicycle) { vScrollHelper1 = new Guna.UI.Lib.ScrollBar.PanelScrollHelper(this.flpKhuA, this.gunaVScrollBar1, true); Guna.UI.WinForms.GunaGradientButton btnBike = new Guna.UI.WinForms.GunaGradientButton(); btnBike.Text = item.ToString(); //design button btnBike.Width = 160; btnBike.Height = 40; btnBike.Font = new System.Drawing.Font("Times New Roman", 15F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); btnBike.BaseColor1 = Color.AntiqueWhite; btnBike.BaseColor2 = Color.LightPink; btnBike.Image = null; btnBike.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; btnBike.ForeColor = Color.Black; btnBike.Radius = 3; btnBike.OnHoverBaseColor1 = Color.LightPink; btnBike.OnHoverBaseColor2 = Color.AntiqueWhite; btnBike.BorderSize = 2; btnBike.BorderColor = Color.Black; //end //event click //this.ID = item; btnBike.Click += new System.EventHandler(this.btnBike_Click); //end this.flpKhuA.Controls.Add(btnBike); } } //danh sach motor List <string> IDmotor = VehicleBUS.danhSachID(1); if (IDmotor.Count != 0) { foreach (var item in IDmotor) { vScrollHelper1 = new Guna.UI.Lib.ScrollBar.PanelScrollHelper(this.flpKhuB, this.gunaVScrollBar2, true); Guna.UI.WinForms.GunaGradientButton btnMotor = new Guna.UI.WinForms.GunaGradientButton(); btnMotor.Text = item.ToString(); //design button btnMotor.Width = 160; btnMotor.Height = 40; btnMotor.Font = new System.Drawing.Font("Times New Roman", 15F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); btnMotor.BaseColor1 = Color.AntiqueWhite; btnMotor.BaseColor2 = Color.LightPink; btnMotor.Image = null; btnMotor.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; btnMotor.ForeColor = Color.Black; btnMotor.Radius = 5; btnMotor.OnHoverBaseColor1 = Color.LightPink; btnMotor.OnHoverBaseColor2 = Color.AntiqueWhite; btnMotor.BorderSize = 2; btnMotor.BorderColor = Color.Black; //end //event click btnMotor.Click += new System.EventHandler(this.btnMotor_Click); //end this.flpKhuB.Controls.Add(btnMotor); } } //danh sach xe hoi List <string> IDcar = VehicleBUS.danhSachID(2); if (IDcar.Count != 0) { foreach (var item in IDcar) { vScrollHelper1 = new Guna.UI.Lib.ScrollBar.PanelScrollHelper(this.flpKhuC, this.gunaVScrollBar3, true); Guna.UI.WinForms.GunaGradientButton btnCar = new Guna.UI.WinForms.GunaGradientButton(); btnCar.Text = item.ToString(); //design button btnCar.Width = 160; btnCar.Height = 40; btnCar.Font = new System.Drawing.Font("Times New Roman", 15F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); btnCar.BaseColor1 = Color.AntiqueWhite; btnCar.BaseColor2 = Color.LightPink; btnCar.Image = null; btnCar.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; btnCar.ForeColor = Color.Black; btnCar.Radius = 5; btnCar.OnHoverBaseColor1 = Color.LightPink; btnCar.OnHoverBaseColor2 = Color.AntiqueWhite; btnCar.BorderSize = 2; btnCar.BorderColor = Color.Black; //end //event click btnCar.Click += new System.EventHandler(this.btnCar_Click); //end this.flpKhuC.Controls.Add(btnCar); } } //Hien thi trạng thái bãi giữ xe string str = "Khu A còn: "; this.hienThiTrangThaiBaiGiuXe(str, this.lbStatusA, 0); str = "Khu B còn: "; this.hienThiTrangThaiBaiGiuXe(str, this.lbStatusB, 1); str = "Khu C còn: "; this.hienThiTrangThaiBaiGiuXe(str, this.lbStatusC, 2); }