本文整理汇总了C#中System.Windows.Controls.SelectedCellsChangedEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# SelectedCellsChangedEventArgs类的具体用法?C# SelectedCellsChangedEventArgs怎么用?C# SelectedCellsChangedEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SelectedCellsChangedEventArgs类属于System.Windows.Controls命名空间,在下文中一共展示了SelectedCellsChangedEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: grid_SelectedCellsChanged
private void grid_SelectedCellsChanged(object sender, SelectedCellsChangedEventArgs e)
{
if (e.AddedCells.Count == 0)
return;
//进入编辑模式 这样单击一次就可以打勾了
existedLayerGrid.BeginEdit();
}
开发者ID:meikeyuan,项目名称:main,代码行数:7,代码来源:SelDBLayerWindow.xaml.cs
示例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;
}
开发者ID:momo16542,项目名称:DarbWareERP,代码行数:7,代码来源:搜尋頁面.xaml.cs
示例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();
}
开发者ID:Vsailor,项目名称:ProjectManager,代码行数:7,代码来源:TeamsDetails.xaml.cs
示例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);
}
开发者ID:hrmKoal,项目名称:HRMdiplArbeit_Pilz,代码行数:7,代码来源:BookingsToMatchPage.xaml.cs
示例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);
}
}
开发者ID:DVitinnik,项目名称:UniversityApps,代码行数:34,代码来源:MainWindow.xaml.cs
示例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);
}
}
开发者ID:xbadcode,项目名称:Rubezh,代码行数:8,代码来源:MonitorLayoutsView.xaml.cs
示例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);
}
开发者ID:rwlamont,项目名称:AllItUp,代码行数:9,代码来源:CustomDataGrid.cs
示例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();
}
}
开发者ID:nXqd,项目名称:University_Projects,代码行数:10,代码来源:MainWindow.xaml.cs
示例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);
}
}
开发者ID:espilioto,项目名称:TFOI,代码行数:11,代码来源:PageRuns.xaml.cs
示例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());
}
开发者ID:VladasZ,项目名称:Homework,代码行数:11,代码来源:MainWindow.xaml.cs
示例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;
}
}
}
开发者ID:barbarossia,项目名称:CWF,代码行数:12,代码来源:ReviewActivityView.xaml.cs
示例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();
}
开发者ID:ByteMachineTechnology,项目名称:CCCRRM,代码行数:12,代码来源:frm_FetchContactCustomerDetailsxaml.xaml.cs
示例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;
}
}
开发者ID:pedone,项目名称:DecisionTableAnalizer,代码行数:12,代码来源:DecisionTableView.xaml.cs
示例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");
}
开发者ID:hrmKoal,项目名称:HRMdiplArbeit_Pilz,代码行数:52,代码来源:BillPage.xaml.cs
示例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;
}
开发者ID:brandonc,项目名称:amazonsqs,代码行数:13,代码来源:MainWindow.xaml.cs
示例16: DataGridSelectionChanged
private static void DataGridSelectionChanged(SelectedCellsChangedEventArgs args, RecordsCollection data)
{
if (!args.AddedCells.Any())
{
data.SelectedRow = -1;
data.SelectedHeader = -1;
return;
}
data.SelectedRow = data.Records.IndexOf((ObservableCollection<string>)args.AddedCells[0].Item);
data.SelectedHeader = args.AddedCells[0].Column.DisplayIndex;
ServiceLocator.Current.GetInstance<Messenger>().Send(new DataGridSelectionChangedMessage(data));
}
开发者ID:AndreyPetrov1991,项目名称:SP,代码行数:15,代码来源:GenericDataGridColumnsBinder.cs
示例17: dgrdFEmployeeDetails_SelectedCellsChanged
private void dgrdFEmployeeDetails_SelectedCellsChanged(object sender, SelectedCellsChangedEventArgs e)
{
try
{
var id1 = (DataRowView)dgrdFEmployeeDetails.SelectedItem; //get specific ID from DataGrid after click on Edit button in DataGrid
PK_ID = Convert.ToInt32(id1.Row["ID"].ToString());
con.Open();
//string sqlquery = "SELECT * FROM Pre_Products where ID='" + PK_ID + "' ";
string sqlquery = "SELECT [ID],[EmployeeFirstName] + ' ' + [EmployeeLastName] AS [EmpName] FROM [tbl_Employee] WHERE [ID]= '" + PK_ID + "'";
SqlCommand cmd = new SqlCommand(sqlquery, con);
SqlDataAdapter adp = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
adp.Fill(dt);
if (dt.Rows.Count > 0)
{
txtFEmpID.Text = dt.Rows[0]["ID"].ToString();
txtFEmpName.Text = dt.Rows[0]["EmpName"].ToString();
}
frmCRM_Adm_Dashbord obj = new frmCRM_Adm_Dashbord();
obj.femp(txtFEmpID.Text, txtFEmpName.Text);
}
catch
{
throw;
}
finally
{
con.Close();
}
// object item = dgrdFEmployeeDetails .SelectedItem;
// FEmpID = Convert.ToInt32((dgrdFEmployeeDetails.SelectedCells[0].Column.GetCellContent(item) as TextBlock).Text);
// FEName=(dgrdFEmployeeDetails.SelectedCells[2].Column.GetCellContent(item) as TextBlock).Text;
// FEName2 = (dgrdFEmployeeDetails.SelectedCells[3].Column.GetCellContent(item) as TextBlock).Text;
// cmbname = FEName + FEName2;
// //loadStockProducts();
// frmCRM_Adm_Dashbord ad = new frmCRM_Adm_Dashbord();
//// ad.FEmpID = FEmpID;
//// ad.cmbname = cmbname;
//// ad.Show();
// eid = FEmpID.ToString();
// ad.femp(eid);
}
开发者ID:ByteMachineTechnology,项目名称:CCCRRM,代码行数:44,代码来源:frm_FetchEmployeeDetails.xaml.cs
示例18: dg_SelectedCellsChanged
private void dg_SelectedCellsChanged(object sender, SelectedCellsChangedEventArgs e)
{
if (!Validator.IsValid(dg))
{
DataGridRow dr = (Validator.GetErrorElement(dg) as DataGridRow);
if (dr != null)
{
dg.SelectedItem = dr.Item;
UIElement eu = dr as UIElement;
eu.MoveFocus(new TraversalRequest(FocusNavigationDirection.Left));
dg.BeginEdit();
}
else
{
MessageBox.Show(sender.GetType().ToString());
}
}
tbPosElem.Text = (dg.SelectedIndex+1).ToString() + " из " + (dg.Items.Count).ToString();
}
开发者ID:versussun,项目名称:git-ato-base_client,代码行数:19,代码来源:PeoplesCollectionDataGrid.xaml.cs
示例19: OnResourceSelected
/// <summary>
/// 资源库中资源选中状态变化了,预览窗口也跟着变化
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnResourceSelected(object sender, SelectedCellsChangedEventArgs e)
{
ResItem item = resourceDataGrid.SelectedItem as ResItem;
BitmapImage bi = null;
switch (item.ResType)
{
case ResourceType.image:
bi = new BitmapImage(new Uri(projectPath + "/resource/" + item.url, UriKind.Absolute));
break;
case ResourceType.sheet:
bi = new BitmapImage(new Uri(projectPath + "/resource/" + item.Image.url, UriKind.Absolute));
break;
default:
break;
}
img.Source = bi;
if (bi != null)
{
img.Width = bi.PixelWidth;
img.Height = bi.PixelHeight;
}
}
开发者ID:Eddie104,项目名称:LibraEditor,代码行数:27,代码来源:ResourceTool.xaml.cs
示例20: dgSharedSteps_SelectedCellsChanged
/// <summary>
/// Handles the SelectedCellsChanged event of the dgTestCases control. Disable Preview and Duplicate buttons if more than one row is selected.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="SelectedCellsChangedEventArgs"/> instance containing the event data.</param>
private void dgSharedSteps_SelectedCellsChanged(object sender, SelectedCellsChangedEventArgs e)
{
this.UpdateButtonsStatus();
}
开发者ID:ypupo2002,项目名称:tfs-testcasemanager,代码行数:9,代码来源:SharedStepsInitialView.xaml.cs
注:本文中的System.Windows.Controls.SelectedCellsChangedEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论