本文整理汇总了C#中System.Windows.Controls.SelectedCellsChangedEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# SelectedCellsChangedEventArgs类的具体用法?C# SelectedCellsChangedEventArgs怎么用?C# SelectedCellsChangedEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SelectedCellsChangedEventArgs类属于System.Windows.Controls命名空间,在下文中一共展示了SelectedCellsChangedEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: grid_SelectedCellsChanged
private void grid_SelectedCellsChanged(object sender, SelectedCellsChangedEventArgs e)
{
if (e.AddedCells.Count == 0)
return;
//进入编辑模式 这样单击一次就可以打勾了
existedLayerGrid.BeginEdit();
}
示例2: dg_SelectedCellsChanged
private void dg_SelectedCellsChanged(object sender, SelectedCellsChangedEventArgs e)
{
txtb查詢欄位.Text = dg.CurrentCell.Column.Header.ToString();
DataGridCellInfo cell = e.AddedCells[0];
TextBlock text = cell.Column.GetCellContent(e.AddedCells[0].Item) as TextBlock;
txt查詢值.Text = text.Text;
}
示例3: DataGrid_SelectedCellsChanged
private void DataGrid_SelectedCellsChanged(object sender, SelectedCellsChangedEventArgs e)
{
var order = OrdersDataGrid.SelectedItem as OrderVM;
EmptyWindow ew = new EmptyWindow(order.Name);
ew.Body.Children.Add(new ProjectsUserControl(order.Order));
ew.Show();
}
示例4: ReservierungData_SelectedCellsChanged
private void ReservierungData_SelectedCellsChanged(object sender, SelectedCellsChangedEventArgs e)
{
ColumnData data = ReservierungData.SelectedItem as ColumnData;
this.cbZimmerEdit.Text = "--Bitte Zimmer wählen--";
FillData(data);
}
示例5: dataGridOlympiads_SelectedCellsChanged
private void dataGridOlympiads_SelectedCellsChanged(object sender, SelectedCellsChangedEventArgs e)
{
try
{
int oldOlyID = OlympiadID;
UpdateOlympiadID();
if (oldOlyID == OlympiadID)
{
return;
}
if (tabItemMain.IsSelected)
{
UpdateMainTab();
}
else if(tabItemOlympiads.IsSelected)
{
UpdateOlympiadsTab();
}
else if (tabItemOlympiads2.IsSelected)
{
UpdateOlympiadsTab2();
}
else if(tabItemQuery.IsSelected)
{
UpdateQueries();
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
示例6: DataGrid_SelectedCellsChanged
private void DataGrid_SelectedCellsChanged(object sender, SelectedCellsChangedEventArgs e)
{
DataGrid dataGrid = sender as DataGrid;
if (dataGrid != null && dataGrid.SelectedItem != null && !dataGrid.IsMouseOver)
{
dataGrid.ScrollIntoView(dataGrid.SelectedItem);
}
}
示例7: OnSelectedCellsChanged
protected override void OnSelectedCellsChanged(SelectedCellsChangedEventArgs e)
{
foreach (var dataGridCellInfo in e.AddedCells.Where(dataGridCellInfo => (string) dataGridCellInfo.Column.Header == "Timestamp"))
{
SelectedCells.Remove(dataGridCellInfo);
}
base.OnSelectedCellsChanged(e);
}
示例8: StudentGridSelectedCellsChanged
private void StudentGridSelectedCellsChanged(object sender, SelectedCellsChangedEventArgs e)
{
foreach (DataGridCellInfo item in e.AddedCells) {
var student = (StudentDTO) item.Item;
tbAvg.Text = student.Avg.ToString();
tbCode.Text = student.Code;
tbFullname.Text = student.Fullname;
dpBirthday.Text = DateTime.Parse(student.Birthday.ToString()).ToString();
}
}
示例9: dataGrid_SelectedCellsChanged
private void dataGrid_SelectedCellsChanged(object sender, SelectedCellsChangedEventArgs e)
{
if (dataGrid.SelectedItems.Count > 0)
for (int i = 0; i < dataGrid.SelectedItems.Count; i++)
{
System.Data.DataRowView selectedFile = (System.Data.DataRowView)dataGrid.SelectedItems[i];
selectedRunId = selectedFile.Row.ItemArray[0].ToString();
recreateArchivedRun(selectedRunId);
}
}
示例10: dataGrid_SelectedCellsChanged
private void dataGrid_SelectedCellsChanged(object sender, SelectedCellsChangedEventArgs e)
{
if (dataGrid.SelectedItem != null)
{
CurrentProcess = (from proc in processes
where proc.Id == ((GridObject)dataGrid.SelectedItem).ID
select proc).FirstOrDefault();
}
//MessageBox.Show(CurrentProcess.Id.ToString());
}
示例11: DataGrid_SelectedCellChanged
private void DataGrid_SelectedCellChanged(object sender, SelectedCellsChangedEventArgs e)
{
var viewModel = DataContext as ReviewActivityViewModel;
if (viewModel != null)
{
if (viewModel.SelectedActivityItem != null)
{
activityItemView.SelectedCategory = viewModel.SelectedActivityItem.Category;
}
}
}
示例12: dgvAdm_FinalProcurement_SelectedCellsChanged
private void dgvAdm_FinalProcurement_SelectedCellsChanged(object sender, SelectedCellsChangedEventArgs e)
{
object item = dgvSale_ContactCustDetails.SelectedItem;
ContactCID = Convert.ToInt32((dgvSale_ContactCustDetails.SelectedCells[0].Column.GetCellContent(item) as TextBlock).Text);
//loadStockProducts();
frmCRM_Adm_Dashbord ad2 = new frmCRM_Adm_Dashbord();
txtCCDID.Text = ContactCID.ToString();
ad2.ContactCDname(txtCCDID.Text);
DialogResult = true;
this.Close();
}
示例13: DataGrid_SelectedCellsChanged
private void DataGrid_SelectedCellsChanged(object sender, SelectedCellsChangedEventArgs e)
{
DataGrid dataGrid = (DataGrid)sender;
if (dataGrid.SelectedCells.Count == 0)
return;
DecisionTableViewModel viewModel = DataContext as DecisionTableViewModel;
if (viewModel != null)
{
viewModel.SelectedRuleIndex = dataGrid.SelectedCells[0].Column.DisplayIndex - 1;
}
}
示例14: ReservierungData_SelectedCellsChanged
private void ReservierungData_SelectedCellsChanged(object sender, SelectedCellsChangedEventArgs e)
{
Microsoft.Office.Interop.Excel.Application app = new Microsoft.Office.Interop.Excel.Application();
app.Visible = true;
app.WindowState = XlWindowState.xlMaximized;
// Workbook wb = app.Workbooks.Add(XlWBATemplate.xlWBATWorksheet);
//Für Install version
//string path = ".\\Excel\\RechnungZimmer.xltx";
string path = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)+"\\Excel\\RechnungZimmer.xltx";
Workbook wb = app.Workbooks.Open(path);
Worksheet ws = wb.Worksheets[1];
DateTime currentDate = DateTime.Now;
ColumnData data = ReservierungData.SelectedItem as ColumnData;
ZimmerTyp zimmerT = hm.repZimmerTyp.GetById(data.buchung.idZimmerTyp);
//Anpassung an Rechnungsvorlage
ws.Range["A19"].Value = "="+data.buchung.erwachseneBuchung + "+" + data.buchung.kinderBuchung;
ws.Range["A20"].Value = data.buchung.erwachseneBuchung;
ws.Range["I9"].Value = currentDate.ToShortDateString();
ws.Range["E14:F14"].Value = data.buchung.vonBuchung;
ws.Range["I14"].Value = data.buchung.bisBuchung;
if(data.buchung.preisBuchung != null)
ws.Range["I19"].Value = data.buchung.preisBuchung;
else
ws.Range["I19"].Value = zimmerT.preis;
ws.Range["I20"].Value = "="+data.buchung.erwachseneBuchung+"*1";
ws.Range["I22"].Value = "=I19+I20";
ws.Range["I25"].Value = "=I22-I23";
ws.Range["I30"].Value = "=I20";
ws.Range["D30:E30"].Value = "=I30";
ws.Range["B19"].Value = "Übernachtung " + zimmerT.typBezeichnung;
//<ORTSTAXE Lösung Überlegen>
//SaveDialog
Stream myStream;
SaveFileDialog saveFileDialog1 = new SaveFileDialog();
saveFileDialog1.Filter = "Excel Datei (*.xlsx)|*.xlsx|All files (*.*)|*.*";
saveFileDialog1.FilterIndex = 0;
saveFileDialog1.RestoreDirectory = true;
if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{
wb.SaveAs(saveFileDialog1.FileName);
}
// wb.SaveAs("D:\\Schule\\GIT_Projects\\HRM_Diplomarbeit\\vitoshacademy11.xlsx");
}
示例15: gridQueues_SelectedCellsChanged
private void gridQueues_SelectedCellsChanged(object sender, SelectedCellsChangedEventArgs e)
{
if (this.gridQueues.SelectedItem is QueueDescription) {
QueueDescription qd = (QueueDescription)this.gridQueues.SelectedItem;
this.gridMessages.ItemsSource = this.queueAdmin.ListTop10Messages(qd.Url);
this.buttonDeleteQueue.IsEnabled = true;
return;
}
this.buttonDeleteQueue.IsEnabled = false;
}