private void lvVoorraad_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) { geselecteerdePlant = (Plant)e.Item.Tag; }
void OnSelectedRoleChanged(object sender, ListViewItemSelectionChangedEventArgs e) { RefreshUsersForRoleComboBox(); RefreshRolePageButtons(); }
private void listView1_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) { }
private void lvwDownloads_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) { UpdateSegments(); UpdateUI(); }
private void OnItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) { this.RenderLevel(); this.PaintLevel(); }
private void lvAfterCaptureTasks_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) { e.Item.Selected = false; }
private void listView_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) { eventsHandler.OnSelectionChanged(); }
private void OnSelectGame(object sender, ListViewItemSelectionChangedEventArgs e) { this._SelectedGameIndex = e.ItemIndex; }
private void listView_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) { result.Text = "listView item selected - " + e.ItemIndex; }
/// <summary> /// lvwFiles_ItemSelectionChanged /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void lvwFiles_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) { int _count = Func.GetSelectedFilesCount(lvwFiles); lblMsg.Text = "当前选中了" + _count + "个jpg文件。"; }
//////////////////////////////////////////////////////ГРАНИЦА ФУНКЦИИ////////////////////////////////////////////////////////////// private void listView1_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) { listBox1.Items.Clear(); listBox1.Items.AddRange(FuncParser.parserESPESM(pathDataFolder + e.Item.Text).ToArray()); }
private void lstProduct_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) { int soluong = 1; // Số lượng nhận vào luôn > 0 if (e.IsSelected) // Nếu sp đã được chọn thì thực thi lệnh { if (panel6.Visible == false) { MessageBox.Show("Mời bạn tạo hóa đơn trước !"); return; } string Order_Name = lstProduct.Items[e.ItemIndex].SubItems[1].Text; //Biến giữ tạm tên sản phẩm đặt hàng string Order_Size = lstProduct.Items[e.ItemIndex].SubItems[2].Text; //Biến giữ tạm kích cỡ sản phẩm đặt hàng string Order_Price = lstProduct.Items[e.ItemIndex].SubItems[3].Text; //Biến giữ tạm giá sản phẩm đặt hàng // Kiểm tra từ đầu đến cuối danh sách đặt hàng, nếu trùng tên sản phẩm và kích thước thì chỉ // thay đổi [Số lượng] và [Giá tổng]. // (Ý trường hợp này là nếu sản phẩm mình chọn đã có trong danh sách chọn rồi thì sẽ không thêm vào nữa mà chỉ thay // đổi số lượng + tổng giá của sản phẩm trong danh sách chọn ) for (int i = 0; i < lstProductCart.Items.Count; i++) { if (lstProductCart.Items[i].SubItems[1].Text == Order_Name && lstProductCart.Items[i].SubItems[4].Text == Order_Size) { // Chuyển đổi số lượng từ kiểu string sang int int sl = Convert.ToInt32(lstProductCart.Items[i].SubItems[2].Text); // Chuyển đổi giá sản phẩm từ kiểu string sang decimal. // Lí do chuyển thành Decimal là cho hợp với kiểu dữ liệu của [Giá Gốc] trong database. // [Giá gốc] trong database là money <=> với decimal. double gia = Convert.ToDouble(lstProductCart.Items[i].SubItems[3].Text); sl++; // Vì sl hiện giờ đang là 1. Cứ mỗi lần nhấp vào, thì sẽ chạy vòng lặp so sánh rồi tăng số lượng lên soluong = sl; // Ta dùng biến [soluong] cho ListView nên phải đổi để còn dùng ở dưới lstProductCart.Items[i].SubItems[2].Text = soluong.ToString(); double tong = sl * gia; // Tổng tiền = số lượng * giá gốc lstProductCart.Items[i].SubItems[5].Text = tong.ToString(); // Thay đổi tổng tiền //Tổng tiến toàn sản phẩm sẽ được tăng lên dựa vào giá sản phẩm vừa chọn. // Vì click 1 lần nên tổng tiền tăng lên dựa vào chính giá sản phẩm mình chọn tongtien = tongtien + Convert.ToDouble(Order_Price); txttotalPrice.Text = tongtien.ToString(); txtTongTien.Text = txttotalPrice.Text; return; // } } // Trường hợp dưới đây xảy ra khi sản phẩm mình chọn là mới hoàn toàn so với những sản phẩm đã có // trong danh sách chọn. => Thêm vào danh sách chọn order_index++; // số lượng đặt hàng luôn tăng 1 khi ta nhấp vào lstProductCart.Items.Add(order_index.ToString()); // Thêm Item chính (là STT) bên bảng ds đặt hàng lstProductCart.Items[order_index - 1].SubItems.Add(Order_Name); lstProductCart.Items[order_index - 1].SubItems.Add(soluong.ToString()); lstProductCart.Items[order_index - 1].SubItems.Add(Order_Price); lstProductCart.Items[order_index - 1].SubItems.Add(Order_Size); lstProductCart.Items[order_index - 1].SubItems.Add(Order_Price); tongtien = tongtien + Convert.ToDouble(Order_Price); txttotalPrice.Text = tongtien.ToString(); txtTongTien.Text = txttotalPrice.Text; } }
// Nếu nhấp vào sản phẩm hiện có trên danh sách đặt hàng thì sẽ mở form mới để chọn số lượng hoặc hủy chọn sản phẩm // Sau khi chọn xong thì Tổng tiền sẽ tự cập nhật. // Sau khi hủy sản phẩm đã chọn thì danh sách đặt hàng sẽ tự động cập nhật lại. private void lstProductCart_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) { int soluong = 0; if (e.IsSelected) { // Nếu nhấp vào sản phẩm hiện có trên danh sách đặt hàng thì sẽ mở form mới để chọn số lượng hoặc hủy chọn sản phẩm soluong = Convert.ToInt32(e.Item.SubItems[2].Text); // Truyền qua form Frm_themSoluong_Mon số lượng của sản phẩm mình nhấp vào Frm_themSoluong_Mon f = new Frm_themSoluong_Mon(soluong); f.ShowDialog(); this.Show(); Cursor.Current = Cursors.Arrow; // Nếu ta chọn hủy bên form kia (Frm_themSoluong_Mon) thì biến huychọnSP sẽ == 1. Ta phải ưu tiên nó trước. if (f.huychonSP == 1) { // Khi hủy chọn thì tổng tiền giảm, các textbox khác cũng tự cập nhật. int sothutu = e.ItemIndex; tongtien -= Convert.ToDouble(e.Item.SubItems[5].Text); txttotalPrice.Text = tongtien.ToString(); txtTongTien.Text = txttotalPrice.Text; // Vd: Khi hủy chọn ở vị trí thứ 3 thì trong danh sách đặt hàng: // Các số thứ từ vị trí thứ 4 đến vị trí cuối cùng sẽ giảm xuống để lấp ô trống mà sản phẩm ta đã hủy. for (int i = sothutu + 1; i < lstProductCart.Items.Count; i++) { lstProductCart.Items[i].Text = i.ToString(); } lstProductCart.Items[e.ItemIndex].Selected = false; lstProductCart.Items.RemoveAt(e.ItemIndex); order_index--; } else { // Nếu không hủy món mà đã chọn số lượng ở form kia (Frm_themSoluong_Mon) thì sẽ nhận giá trị về form // Banghang này và cập nhật tổng giá sản phẩm e.Item.SubItems[2].Text = f.soluongSP_Text.ToString(); double gia_lucdau = Convert.ToDouble(e.Item.SubItems[5].Text) * soluong; double gia_update = f.soluongSP_Text * Convert.ToDouble(e.Item.SubItems[3].Text); e.Item.SubItems[5].Text = gia_update.ToString(); // Vd : trước khi thay đổi số lượng sản phẩm thì // Bánh kem A có số lượng :5 || Giá : 50000 => Tổng tiền lúc đó là : 250 000 // Sau khi thay đổi thì số lượng hiện giờ là : 10 => Tổng tiền hiện giờ là : 500 000 // Tổng tiền toàn bộ sẽ = tổng tiền sau khi thay sl của sp - tổng tiền trước đó của sp. if (gia_lucdau > gia_update) { tongtien += gia_lucdau - gia_update; } else { tongtien += gia_update - gia_lucdau; } txttotalPrice.Text = tongtien.ToString(); txtTongTien.Text = txttotalPrice.Text; } } }
private void lvPortraits_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) { }
// Map name selected private void mapslist_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) { if (!e.IsSelected) { return; //mxd. Don't want to trigger this twice } DataLocationList locations; DataLocationList listedlocations; string scriptconfig = string.Empty; //mxd // Map previously selected? if (!string.IsNullOrEmpty(selectedmapname)) { // Get locations from previous selected map settings locations = new DataLocationList(mapsettings, "maps." + selectedmapname + ".resources"); listedlocations = datalocations.GetResources(); // Remove data locations that this map has in its config foreach (DataLocation dl in locations) { listedlocations.Remove(dl); } // Set new data locations datalocations.EditResourceLocationList(listedlocations); // Done selectedmapname = null; } // Anything selected? if (mapslist.SelectedItems.Count > 0) { // Get the map name selectedmapname = mapslist.SelectedItems[0].Text; options = new MapOptions(mapsettings, selectedmapname, longtexturenames.Enabled); // Get locations from previous selected map settings locations = new DataLocationList(mapsettings, "maps." + selectedmapname + ".resources"); listedlocations = datalocations.GetResources(); // Add data locations that this map has in its config foreach (DataLocation dl in locations) { if (!listedlocations.Contains(dl)) { listedlocations.Add(dl); } } // Set new data locations datalocations.EditResourceLocationList(listedlocations); //mxd. Select script compiler ConfigurationInfo info = config.SelectedItem as ConfigurationInfo; if (info != null) { if (!string.IsNullOrEmpty(options.ScriptCompiler) && General.CompiledScriptConfigs.ContainsKey(options.ScriptCompiler)) { scriptconfig = options.ScriptCompiler; } else if (!string.IsNullOrEmpty(info.DefaultScriptCompiler) && General.CompiledScriptConfigs.ContainsKey(info.DefaultScriptCompiler)) { scriptconfig = info.DefaultScriptCompiler; } } } //mxd. Select proper script compiler if (!string.IsNullOrEmpty(scriptconfig)) { scriptcompiler.Enabled = true; scriptcompiler.SelectedItem = General.CompiledScriptConfigs[scriptconfig]; scriptcompilerlabel.Enabled = true; } else { scriptcompiler.Enabled = false; scriptcompiler.SelectedIndex = -1; scriptcompilerlabel.Enabled = false; } }
private void OnMusicListViewItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs listViewItemSelectionChangedEventArgs) { ToogleToolStripItems(); }
private void OnSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) { EventsHelper.Fire(_selectionChanged, this, EventArgs.Empty); }
private void lvCLA_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) { if (lvCLAItemSelectionChanged != null) lvCLAItemSelectionChanged(sender, e); }
private void ListView_Modules_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) { this.textBoxDescription.Text = e.Item.Tag.ToString(); }
private void DmbIssuesLV_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) { this.SetStatusLB(); }
void ListViewResultItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) { m_parent.DoSearch(e.Item.Text); }
private void listView_main_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) => SelectText(e.Item.Group.Name, int.Parse(e.Item.Text), false);
private void listView1_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) { loadReservationCarDetails(); }
/// <summary> /// Update Edit and Remove buttons when new item is selected from the list. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void OBISCodesList_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) { EditBtn.Enabled = RemoveBtn.Enabled = OBISCodesList.SelectedItems.Count == 1; }
void OnSelectedUserAssignChanged(object sender, ListViewItemSelectionChangedEventArgs e) { RefreshRolesForUserComboBox(); RefreshRolePageButtons(); }
protected override void OnItemSelectionChanged(ListViewItemSelectionChangedEventArgs e) { base.OnItemSelectionChanged(e); Invalidate(); }
private void listView1_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) { openPath = path + @"\" + e.Item.Text; }
private void listView_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) { var item = e.Item as CustomListViewItem <T>; RaiseSelectionChanged(item.Definition, e.IsSelected); }
private void LsvRepair_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) { _userRowIndex = e.ItemIndex; }
//--- private void lvClientes_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) { LimpiarVentana(); }