本文整理汇总了C#中Xceed类的典型用法代码示例。如果您正苦于以下问题:C# Xceed类的具体用法?C# Xceed怎么用?C# Xceed使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Xceed类属于命名空间,在下文中一共展示了Xceed类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Validate
public override System.Windows.Controls.ValidationResult Validate(object value, System.Globalization.CultureInfo culture, Xceed.Wpf.DataGrid.CellValidationContext context)
{
if (value == null)
return ValidationResult.ValidResult;
Cell cell = context.Cell;
OrderQuantity checkingObject = cell.DataContext as OrderQuantity;
double minValue = checkingObject.MinValue;
double maxValue = checkingObject.MaxValue;
if (value is string)
value = double.Parse((string)value);
if (cell.FieldName == OrderQuantity.PROP_NAME_MinValue)
minValue = (double)value;
else if (cell.FieldName == OrderQuantity.PROP_NAME_MaxValue)
maxValue = (double)value;
else
System.Diagnostics.Debug.Assert(false);
string newValue = value.ToString();
if (minValue > maxValue)
return new ValidationResult(false, (string)App.Current.FindResource("NotValidRangeText"));
return ValidationResult.ValidResult;
}
示例2: TaskSettings_PropertyValueChanged
private void TaskSettings_PropertyValueChanged(object sender, Xceed.Wpf.Toolkit.PropertyGrid.PropertyValueChangedEventArgs e)
{
if (TaskSettings.SelectedPropertyItem == null)
return;
_isError = false;
// Х.з. как по уму обновить PropertyGrid.
var pdc = TypeDescriptor.GetProperties(_clonnedSettings);
if (!pdc
.Cast<PropertyDescriptor>()
.Any(propertyDescriptor => propertyDescriptor
.Attributes
.OfType<DisplayNameAttribute>()
.Select(a => a.DisplayName)
.Contains(TaskSettings.SelectedPropertyItem.DisplayName) &&
propertyDescriptor
.Attributes
.OfType<AuxiliaryAttribute>()
.Count() != 0)) return;
TaskSettings.SelectedObject = new object();
TaskSettings.SelectedObject = _clonnedSettings;
}
示例3: dataGridView2ExcelDinamico
/// <summary>
/// Exporta la información de un dataGridView a Excel de manera dinamica
/// </summary>
/// <param name="dataGridView">DataGridView de origen</param>
/// <param name="pFullPath_toExport">Ruta del archivo exportado</param>
/// <param name="nameSheet">Nombre de la hoja</param>
public void dataGridView2ExcelDinamico(Xceed.Wpf.DataGrid.DataGridControl dataGridView, string pFullPath_toExport, string nameSheet)
{
System.Data.DataTable dt = new System.Data.DataTable();
ExcelExport myExcel = new ExcelExport();
myExcel.CreateWorksheet(nameSheet);
//Recorro el DataGrid para buscar las columnas
foreach (Xceed.Wpf.DataGrid.Column Column in dataGridView.Columns)
{
dt.Columns.Add(Column.Title.ToString());
}
foreach (DataRow DataRow in dataGridView.Items)
{
DataRow dr = dt.NewRow();
foreach (Xceed.Wpf.DataGrid.Column Column in dataGridView.Columns)
{
dr[Column.Title.ToString()] = DataRow[Column.Title.ToString()];
}
dt.Rows.Add(dr);
}
myExcel.PopulateFromDataTable(nameSheet, dt);
myExcel.SaveToFile(pFullPath_toExport);
//dataTable2ExcelDinamico(dt, dataGridView, pFullPath_toExport, nameSheet);
}
示例4: tskCTAnywhere_Click
private void tskCTAnywhere_Click(object sender, Xceed.SmartUI.SmartItemClickEventArgs e)
{
using (CTAnywhere.frmCTADashboard objCTADashboard = new global::CTWebMgmt.CTAnywhere.frmCTADashboard())
{
objCTADashboard.ShowDialog();
}
}
示例5: UpdateThemeResources
internal override void UpdateThemeResources( Xceed.Wpf.AvalonDock.Themes.Theme oldTheme = null )
{
base.UpdateThemeResources(oldTheme);
if (_overlayWindow != null)
_overlayWindow.UpdateThemeResources(oldTheme);
}
示例6: PaintCellForeground
/// <summary>
///
/// </summary>
/// <param name="cell"></param>
/// <param name="e"></param>
/// <param name="handled"></param>
protected override void PaintCellForeground(Xceed.Grid.Cell cell, Xceed.Grid.GridPaintEventArgs e, ref bool handled)
{
if ((Control.MouseButtons == MouseButtons.Left) &&
(cell.RectangleToScreen(e.ClientRectangle).Contains(Control.MousePosition)))
{
ControlPaint.DrawButton(e.Graphics, e.DisplayRectangle, ButtonState.Pushed);
}
else
{
ControlPaint.DrawButton(e.Graphics, e.DisplayRectangle, ButtonState.Normal);
}
//using (SolidBrush brush = new SolidBrush(cell.GetDisplayVisualStyle(VisualGridElementState.Idle).ForeColor))
//{
// Rectangle textRectangle = e.DisplayRectangle;
// textRectangle.Inflate(-2, -2);
// if ((textRectangle.Height > 0) && (textRectangle.Width > 0))
// {
// // Paint a fixed text
// e.Graphics.DrawString(m_text, cell.Font, brush, textRectangle);
// // For text that follows the value of the cell, you could do someting like the following :
// // e.Graphics.DrawString( this.GetTextToPaint(), this.Font, brush, textRectangle );
// }
//}
}
示例7: MyCalendar
/// <summary>
/// Constructor
/// </summary>
public MyCalendar(Xceed.Editors.WinCalendar template)
: base(template)
{
this.DayMargins = new Xceed.Editors.Margins(10, 10, 0, 0);
this.EnableMultipleMonths = false;
this.WeekDaysHeader.DayNames = new string[]
{
"һ",
"��",
"��",
"��",
"��",
"��",
"��"
};
if (this.TodayButton != null)
{
this.TodayButton.Text = "����";
this.TodayButton.Height = 20;
this.TodayButton.Location = new System.Drawing.Point(65, 123);
}
if (this.NoneButton != null)
{
this.NoneButton.Text = "��";
this.NoneButton.Height = 20;
this.NoneButton.Location = new System.Drawing.Point(160, 123);
}
}
示例8: _wizard_Next
void _wizard_Next(object sender, Xceed.Wpf.Toolkit.Core.CancelRoutedEventArgs e)
{
var current = this._wizard.CurrentPage;
if (current.Name.Equals("BaseSettingsPage")) {
var hasContext = current as IHasContext;
if (hasContext != null) {
var pushPullModel = ((PageOneContext)hasContext.Context).DataModel;
switch (pushPullModel) {
case PushPullModel.PushData: {
current.NextPage = (WizardPage)_wizard.Items[2];
break;
}
case PushPullModel.PullData: {
current.NextPage = (WizardPage)_wizard.Items[3];
break;
}
case PushPullModel.FormSheet: {
break;
}
}
}
}
}
示例9: switch
bool ICellViewer.PaintCellValue(
Xceed.Grid.GridPaintEventArgs e,
Xceed.Grid.Cell cell )
{
/*
if ( !(cell.Value is int) )
return false;
int nVal = (int)cell.Value;
if ( nVal<100 )
{
GruppNumrering gn = (GruppNumrering)nVal;
Rectangle rect = PlataDM.vdUsr.ImgHelper.adaptProportionalRect( e.ClientRectangle, 100, 100 );
e.Graphics.FillEllipse( PlataDM.Global.GruppNumreringTillFärg(gn), rect );
switch ( gn )
{
case GruppNumrering.EjNamnsättning:
case GruppNumrering.EjNumrering:
e.Graphics.DrawString( "ej", cell.Font, Brushes.Black, rect, vdUsr.Util.sfCenter );
break;
}
}
*/
PlataDM.Util.paintGroupNumberingSymbol(
e.Graphics,
cell.Font,
cell.ParentRow.Tag as PlataDM.Grupp,
vdUsr.ImgHelper.adaptProportionalRect( e.ClientRectangle, e.ClientRectangle.Height - 2, e.ClientRectangle.Height - 2 ) );
return true;
}
示例10: GetTextCore
/// <summary>
/// GetTextCore
/// </summary>
/// <param name="value"></param>
/// <param name="formatInfo"></param>
/// <param name="gridElement"></param>
/// <returns></returns>
protected override string GetTextCore(object value, Xceed.Grid.CellTextFormatInfo formatInfo,
Xceed.Grid.GridElement gridElement)
{
DateTime minValue;
DateTime time = this.GetDate(value, formatInfo, gridElement);
object nullValue = formatInfo.NullValue;
if (nullValue is DateTime)
{
minValue = (DateTime) nullValue;
}
else
{
minValue = DateTime.MinValue;
}
if (time == minValue)
{
return formatInfo.NullText;
}
string formatSpecifier = formatInfo.FormatSpecifier;
if (string.IsNullOrEmpty(formatSpecifier))
{
formatSpecifier = "d";
}
return time.ToString(formatSpecifier, m_format);
}
示例11: tskBatchWebCamperDetailRpt_Click
private void tskBatchWebCamperDetailRpt_Click(object sender, Xceed.SmartUI.SmartItemClickEventArgs e)
{
using (Ind.Reports.frmBatchWebCamperDetailSetup objBatchWebCamperDetailSetup = new global::CTWebMgmt.Ind.Reports.frmBatchWebCamperDetailSetup())
{
objBatchWebCamperDetailSetup.ShowDialog();
}
}
示例12: mnuDiscounts_Click
private void mnuDiscounts_Click(object sender, Xceed.SmartUI.SmartItemClickEventArgs e)
{
using (Ind.Setup.frmDiscounts objDiscounts = new global::CTWebMgmt.Ind.Setup.frmDiscounts())
{
objDiscounts.ShowDialog();
}
}
示例13: tskCustomFlagFieldDefs_Click
private void tskCustomFlagFieldDefs_Click(object sender, Xceed.SmartUI.SmartItemClickEventArgs e)
{
Admin.frmSyncCustomFlags objSyncCustomFlags = new global::CTWebMgmt.Admin.frmSyncCustomFlags();
objSyncCustomFlags.MdiParent = this;
objSyncCustomFlags.Show();
}
示例14: ResolveEditor
public FrameworkElement ResolveEditor(Xceed.Wpf.Toolkit.PropertyGrid.PropertyItem property_item)
{
Binding binding = new Binding("Value");
binding.Source = property_item;
binding.Mode = property_item.IsReadOnly ? BindingMode.OneWay : BindingMode.TwoWay;
BindingOperations.SetBinding(this, OpenTexUserControlEditor.ValueProperty, binding);
return this;
}
示例15: win_seleccion_ejes_reporte_estadistica
public win_seleccion_ejes_reporte_estadistica(Xceed.Wpf.DataGrid.DataGridControl grid)
{
ValoresEjes = new List<Empresa.Comun.valores_dependientes_independientes>();
InitializeComponent();
this.__grid = grid;
__valores_item();
//_datos(__grid);
}