private void img_ContextButtonClick(object sender, DevExpress.Utils.ContextItemClickEventArgs e) { // OpenFileDialog ofd = new OpenFileDialog(); /* XtraOpenFileDialog ofd = new XtraOpenFileDialog(); * ofd.Filter = "ملفات الصور |*.JPG; *.PNG ;*.GIF; *.PMB"; * if (ofd.ShowDialog() == DialogResult.OK) * { * img.Image = Image.FromFile(ofd.FileName); * }*/ }
private void tileView1_ContextButtonClick(object sender, DevExpress.Utils.ContextItemClickEventArgs e) { DevExpress.XtraGrid.Views.Tile.TileViewItem tileViewItem = (DevExpress.XtraGrid.Views.Tile.TileViewItem)e.DataItem; string cfmainkey = this.tileView1.GetRowCellValue(tileViewItem.RowHandle, this.tileView1.Columns["cfmainkey"]).ToString(); if (e.Item.Name == "contextButton1") { MessageBox.Show("再次打印"); } else { billController.ConfirmBill(cfmainkey); } }
private void gcPlugins_Gallery_ContextButtonClick(object sender, DevExpress.Utils.ContextItemClickEventArgs e) { Application.DoEvents(); switch (e.Item.Name) { case "cbEdit": EditPlugin(((GalleryItem)e.DataItem).Value as Plugin); break; case "cbDelete": DeletePlugin(((GalleryItem)e.DataItem).Value as Plugin); break; } }
void tileControl1_ContextButtonClick(object sender, DevExpress.Utils.ContextItemClickEventArgs e) { if (e.Item.Name == "removeButton") { TileItem item = e.DataItem as TileItem; if (item != null && item.Tag is ProjectInfo) { RemoveProject(item.Tag as ProjectInfo); } } else if (e.Item.Name == "editButton") { TileItem item = e.DataItem as TileItem; if (item != null && item.Tag is ProjectInfo) { EditProjectSettings(item.Tag as ProjectInfo); } } }
private void tileView1_ContextButtonClick(object sender, DevExpress.Utils.ContextItemClickEventArgs e) { //取值Demo string strNumber = ""; string strFoodName = ""; decimal price = 0; DevExpress.XtraGrid.Views.Tile.TileViewItem tileViewItem = (DevExpress.XtraGrid.Views.Tile.TileViewItem)e.DataItem; strNumber = tileView1.GetRowCellDisplayText(tileViewItem.RowHandle, Number).ToString(); strFoodName = tileView1.GetRowCellDisplayText(tileViewItem.RowHandle, FoodName).ToString(); price = Convert.ToDecimal(tileView1.GetRowCellDisplayText(tileViewItem.RowHandle, Price).ToString().Substring(1)); if (e.Item.Name == "contextButton3") { if ((bool)tileView1.ContextButtons["contextButton3"].Tag) { tileView1.ContextButtons["contextButton3"].ImageOptions.Image = Properties.Resources.finish; tileView1.ContextButtons["contextButton3"].Tag = false; } else { tileView1.ContextButtons["contextButton3"].ImageOptions.Image = Properties.Resources.wait; tileView1.ContextButtons["contextButton3"].Tag = true; } } else if (e.Item.Name == "contextButton1") { //参数需要增加 MyForm.TableSettlement.TuiCai tuiCai = new MyForm.TableSettlement.TuiCai(strNumber.Substring(1)); tuiCai.StartPosition = FormStartPosition.CenterScreen; tuiCai.ShowDialog(); //MessageBox.Show(tuiCai.TuiCaiControl1.TuiCaiDetaile1.Reason); //MessageBox.Show(tuiCai.TuiCaiControl1.TuiCaiDetaile1.Number); //MessageBox.Show(tuiCai.TuiCaiControl1.TuiCaiDetaile1.Solution); } else if (e.Item.Name == "contextButton2") { DianDianClient.MyForm.TableSettlement.SaleForm saleForm = new DianDianClient.MyForm.TableSettlement.SaleForm(price, strFoodName); saleForm.StartPosition = FormStartPosition.CenterScreen; saleForm.ShowDialog(); MessageBox.Show(saleForm.saleControlcs1.Price.ToString()); } }
private void tileView1_ContextButtonClick(object sender, DevExpress.Utils.ContextItemClickEventArgs e) { DevExpress.XtraGrid.Views.Tile.TileViewItem tileViewItem = (DevExpress.XtraGrid.Views.Tile.TileViewItem)e.DataItem; int id = Convert.ToInt32(this.tileView1.GetRowCellValue(tileViewItem.RowHandle, "id")); string str = Convert.ToString(this.tileView1.GetRowCellValue(tileViewItem.RowHandle, "str")); if (e.Item.Name == "contextButton1") { this.tileView1.FocusedRowHandle = tileViewItem.RowHandle; DevExpress.Utils.ContextButton contextButton = e.Item as DevExpress.Utils.ContextButton; if (contextButton.Caption == "呼叫") { MessageBox.Show("你呼叫了第" + str); } } if (e.Item.Name == "contextButton2") { list.Remove(list.Find(o => o.id == id)); this.tileView1.RefreshData(); } }
private void accordionControl1_ContextButtonClick(object sender, DevExpress.Utils.ContextItemClickEventArgs e) { if (e.DataItem != aceNavigator) { return; } if (e.Item.Name == "ZoomFit") { OnZoomFitClick(); } else if (e.Item.Name == "ZoomFill") { OnZoomFillClick(); } else if (e.Item.Name == "ZoomOrigin") { OnZoomOriginClick(); } else if (e.Item.Name == "Zoom") { OnZoomMenuClick(e.ScreenBounds); } }
private void ListBoxControl1_ContextButtonClick(object sender, DevExpress.Utils.ContextItemClickEventArgs e) { var listBoxControl = sender as ListBoxControl; listBoxControl.Items.Remove(e.DataItem); }
private void galleryControl1_Gallery_ContextButtonClick(object sender, DevExpress.Utils.ContextItemClickEventArgs e) { }