本文整理汇总了C#中MainWindow.GenerateListOfTabulationTabCntrlColumns方法的典型用法代码示例。如果您正苦于以下问题:C# MainWindow.GenerateListOfTabulationTabCntrlColumns方法的具体用法?C# MainWindow.GenerateListOfTabulationTabCntrlColumns怎么用?C# MainWindow.GenerateListOfTabulationTabCntrlColumns使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MainWindow
的用法示例。
在下文中一共展示了MainWindow.GenerateListOfTabulationTabCntrlColumns方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CustomQueryAccordion_SelectedItemsChanged
private void CustomQueryAccordion_SelectedItemsChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
{
AccordionItem item = (AccordionItem)CustomQueryAccordion.SelectedItem;
MainWindow mainWindow = new MainWindow();
isAllTabValidated = mainWindow.ValidateAllTabCntrls(this);
if (item != null)
{
switch (item.Name)
{
case "FromTabItem":
break;
case "WhereTabItem":
break;
case "SelectAccordionItem":
if (this.FromTabCntrl.isValidated && (this.TabulationTabCntrl.isValidated && this.TabulationTabCntrl.isTabulation == false) && (this.CrossTabulationTabCntrl.isValidated && this.CrossTabulationTabCntrl.isCrossTabulation == false))
{
this.SelectTabCntrl.lstToSelecteColFrom.IsEnabled = true;
this.SelectTabCntrl.lstToSelecteColFrom.ItemsSource = mainWindow.GenerateListOfSelectTabCntrlColumns(this);
}
break;
case "TabulationAccordionItem":
if (this.FromTabCntrl.isValidated)
{
this.TabulationTabCntrl.Visibility = System.Windows.Visibility.Visible;
this.TabulationTabCntrl.StackPanelTabuLationTabGroupBy.IsEnabled = true;
this.TabulationTabCntrl.StackPanelTabuLationTabSummary.IsEnabled = true;
List<SQLBuilder.Clauses.Column> listOfTabulationTabColumns = mainWindow.GenerateListOfTabulationTabCntrlColumns(this);
//if first drop down is null on Tabulation means all dropdown item source is null
if (((TabulationTabStackPanelGroupByControl)this.TabulationTabCntrl.StackPanelTabuLationTabGroupBy.Children[0]).cmbTabulationTabGroupByColumnsName.Items.Count == 0)
{
// loading groupby columns
for (int i = 0; i < this.TabulationTabCntrl.StackPanelTabuLationTabGroupBy.Children.Count; i++)
{
TabulationTabStackPanelGroupByControl tg = (TabulationTabStackPanelGroupByControl)this.TabulationTabCntrl.StackPanelTabuLationTabGroupBy.Children[i];
tg.cmbTabulationTabGroupByColumnsName.ItemsSource = listOfTabulationTabColumns;
}
// loading summary columns
for (int i = 0; i < this.TabulationTabCntrl.StackPanelTabuLationTabSummary.Children.Count; i++)
{
TabulationTabStackPanelSummaryControl ts = (TabulationTabStackPanelSummaryControl)this.TabulationTabCntrl.StackPanelTabuLationTabSummary.Children[i];
ts.cmbTabulationTabSummaryColumnsName.ItemsSource = listOfTabulationTabColumns;
}
}
else
{
List<SQLBuilder.Clauses.Column> list1 = (List<SQLBuilder.Clauses.Column>)((TabulationTabStackPanelGroupByControl)this.TabulationTabCntrl.StackPanelTabuLationTabGroupBy.Children[0]).cmbTabulationTabGroupByColumnsName.ItemsSource;
IEnumerable<SQLBuilder.Clauses.Column> difference = list1.Except(listOfTabulationTabColumns);
if (list1.SequenceEqual(listOfTabulationTabColumns) == false)
{
// Reloading groupby columns
for (int i = 0; i < this.TabulationTabCntrl.StackPanelTabuLationTabGroupBy.Children.Count; i++)
{
TabulationTabStackPanelGroupByControl tg = (TabulationTabStackPanelGroupByControl)this.TabulationTabCntrl.StackPanelTabuLationTabGroupBy.Children[i];
tg.cmbTabulationTabGroupByColumnsName.ItemsSource = listOfTabulationTabColumns;
}
// Reloading summary columns
for (int i = 0; i < this.TabulationTabCntrl.StackPanelTabuLationTabSummary.Children.Count; i++)
{
TabulationTabStackPanelSummaryControl ts = (TabulationTabStackPanelSummaryControl)this.TabulationTabCntrl.StackPanelTabuLationTabSummary.Children[i];
ts.cmbTabulationTabSummaryColumnsName.ItemsSource = listOfTabulationTabColumns;
}
}
}
}
break;
case "CrossTabulationAccordionItem":
if (this.FromTabCntrl.isValidated)
{
this.CrossTabulationTabCntrl.StackPanelCrossTabuLationTabGroupBy.IsEnabled = true;
this.CrossTabulationTabCntrl.cmbCrossTabulationTabSummaryFirstRowColumnsName.IsEnabled = true;
this.CrossTabulationTabCntrl.cmbCrossTabulationTabSummaryFristRowSort.IsEnabled = true;
this.CrossTabulationTabCntrl.StackPanelCrossTabuLationTabSummary.IsEnabled = true;
List<SQLBuilder.Clauses.Column> listOfTabulationTabColumns = mainWindow.GenerateListOfTabulationTabCntrlColumns(this);
//if first drop down is null on Cross Tabulation means all dropdown item source is null
if (((CrossTabulationTabStackPanelGroupByControl)this.CrossTabulationTabCntrl.StackPanelCrossTabuLationTabGroupBy.Children[0]).cmbCrossTabulationTabGroupByColumnsName.Items.Count == 0)
{
// loading groupby columns
for (int i = 0; i < this.CrossTabulationTabCntrl.StackPanelCrossTabuLationTabGroupBy.Children.Count; i++)
{
CrossTabulationTabStackPanelGroupByControl ctg = (CrossTabulationTabStackPanelGroupByControl)this.CrossTabulationTabCntrl.StackPanelCrossTabuLationTabGroupBy.Children[i];
ctg.cmbCrossTabulationTabGroupByColumnsName.ItemsSource = listOfTabulationTabColumns;
}
//loading summary first row means (column Name and sort) row
this.CrossTabulationTabCntrl.cmbCrossTabulationTabSummaryFirstRowColumnsName.ItemsSource = listOfTabulationTabColumns;
// loading summary columns
for (int i = 0; i < this.CrossTabulationTabCntrl.StackPanelCrossTabuLationTabSummary.Children.Count; i++)
{
CrossTabulationTabStackPanelSummaryControl cts = (CrossTabulationTabStackPanelSummaryControl)this.CrossTabulationTabCntrl.StackPanelCrossTabuLationTabSummary.Children[i];
cts.cmbCrossTabulationTabSummaryColumnsName.ItemsSource = listOfTabulationTabColumns;
}
//.........这里部分代码省略.........
示例2: UpdateCrossTabulationTabCntrl
public void UpdateCrossTabulationTabCntrl(MainWindow mainWindow)
{
if (this.FromTabCntrl.isValidated)
{
this.CrossTabulationTabCntrl.StackPanelCrossTabuLationTabGroupBy.IsEnabled = true;
this.CrossTabulationTabCntrl.cmbCrossTabulationTabSummaryFirstRowColumnsName.IsEnabled = true;
this.CrossTabulationTabCntrl.cmbCrossTabulationTabSummaryFristRowSort.IsEnabled = true;
this.CrossTabulationTabCntrl.StackPanelCrossTabuLationTabSummary.IsEnabled = true;
List<SQLBuilder.Clauses.Column> listOfTabulationTabColumns = mainWindow.GenerateListOfTabulationTabCntrlColumns(this);
//if first drop down is null on Cross Tabulation means all dropdown item source is null
if (((CrossTabulationTabStackPanelGroupByControl)this.CrossTabulationTabCntrl.StackPanelCrossTabuLationTabGroupBy.Children[0]).cmbCrossTabulationTabGroupByColumnsName.Items.Count == 0)
{
// loading groupby columns
for (int i = 0; i < this.CrossTabulationTabCntrl.StackPanelCrossTabuLationTabGroupBy.Children.Count; i++)
{
CrossTabulationTabStackPanelGroupByControl ctg = (CrossTabulationTabStackPanelGroupByControl)this.CrossTabulationTabCntrl.StackPanelCrossTabuLationTabGroupBy.Children[i];
ctg.cmbCrossTabulationTabGroupByColumnsName.ItemsSource = listOfTabulationTabColumns;
}
//loading summary first row means (column Name and sort) row
this.CrossTabulationTabCntrl.cmbCrossTabulationTabSummaryFirstRowColumnsName.ItemsSource = listOfTabulationTabColumns;
// loading summary columns
for (int i = 0; i < this.CrossTabulationTabCntrl.StackPanelCrossTabuLationTabSummary.Children.Count; i++)
{
CrossTabulationTabStackPanelSummaryControl cts = (CrossTabulationTabStackPanelSummaryControl)this.CrossTabulationTabCntrl.StackPanelCrossTabuLationTabSummary.Children[i];
cts.cmbCrossTabulationTabSummaryColumnsName.ItemsSource = listOfTabulationTabColumns;
}
}
else
{
List<SQLBuilder.Clauses.Column> list1 = (List<SQLBuilder.Clauses.Column>)((CrossTabulationTabStackPanelGroupByControl)this.CrossTabulationTabCntrl.StackPanelCrossTabuLationTabGroupBy.Children[0]).cmbCrossTabulationTabGroupByColumnsName.ItemsSource;
IEnumerable<SQLBuilder.Clauses.Column> difference = list1.Except(listOfTabulationTabColumns);
if (list1.SequenceEqual(listOfTabulationTabColumns) == false)
{
// Reloading groupby columns
for (int i = 0; i < this.CrossTabulationTabCntrl.StackPanelCrossTabuLationTabGroupBy.Children.Count; i++)
{
CrossTabulationTabStackPanelGroupByControl ctg = (CrossTabulationTabStackPanelGroupByControl)this.CrossTabulationTabCntrl.StackPanelCrossTabuLationTabGroupBy.Children[i];
ctg.cmbCrossTabulationTabGroupByColumnsName.ItemsSource = listOfTabulationTabColumns;
}
// Reloading summary first row means (column Name and sort) row
this.CrossTabulationTabCntrl.cmbCrossTabulationTabSummaryFirstRowColumnsName.ItemsSource = listOfTabulationTabColumns;
// Reloading summary columns
for (int i = 0; i < this.CrossTabulationTabCntrl.StackPanelCrossTabuLationTabSummary.Children.Count; i++)
{
CrossTabulationTabStackPanelSummaryControl cts = (CrossTabulationTabStackPanelSummaryControl)this.CrossTabulationTabCntrl.StackPanelCrossTabuLationTabSummary.Children[i];
cts.cmbCrossTabulationTabSummaryColumnsName.ItemsSource = listOfTabulationTabColumns;
}
}
}
}
}