当前位置: 首页>>代码示例>>C#>>正文


C# Xceed类代码示例

本文整理汇总了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;
        }
开发者ID:erindm,项目名称:route-planner-csharp,代码行数:26,代码来源:QuantityValidationRule.cs

示例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;
		}
开发者ID:hbwjz,项目名称:StockSharp,代码行数:25,代码来源:TaskSettingsWindow.xaml.cs

示例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);
        }
开发者ID:erwin-hamid,项目名称:LogPro,代码行数:36,代码来源:ExportToExcel.cs

示例4: tskCTAnywhere_Click

 private void tskCTAnywhere_Click(object sender, Xceed.SmartUI.SmartItemClickEventArgs e)
 {
     using (CTAnywhere.frmCTADashboard objCTADashboard = new global::CTWebMgmt.CTAnywhere.frmCTADashboard())
     {
         objCTADashboard.ShowDialog();
     }
 }
开发者ID:khallgren,项目名称:CTWebMgmt,代码行数:7,代码来源:frmSwitchboard.cs

示例5: UpdateThemeResources

        internal override void UpdateThemeResources( Xceed.Wpf.AvalonDock.Themes.Theme oldTheme = null )
        {
            base.UpdateThemeResources(oldTheme);

            if (_overlayWindow != null)
                _overlayWindow.UpdateThemeResources(oldTheme);
        }
开发者ID:xbadcode,项目名称:Rubezh,代码行数:7,代码来源:LayoutAnchorableFloatingWindowControl.cs

示例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 );
            //    }
            //}
        }
开发者ID:urmilaNominate,项目名称:mERP-framework,代码行数:33,代码来源:ButtonViewer.cs

示例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);
            }
        }
开发者ID:urmilaNominate,项目名称:mERP-framework,代码行数:33,代码来源:MyCalendar.cs

示例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;
                            }
                    }
                }
            }
        }
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:25,代码来源:ReportWizard.xaml.cs

示例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;
        }
开发者ID:danbystrom,项目名称:VisionQuest,代码行数:29,代码来源:Util.cs

示例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);
 }
开发者ID:urmilaNominate,项目名称:mERP-framework,代码行数:32,代码来源:DateViewer.cs

示例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();
     }
 }
开发者ID:khallgren,项目名称:CTWebMgmt,代码行数:7,代码来源:frmSwitchboard.cs

示例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();
     }
 }
开发者ID:khallgren,项目名称:CTWebMgmt,代码行数:7,代码来源:frmSwitchboard.cs

示例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();
        }
开发者ID:khallgren,项目名称:CTWebMgmt,代码行数:8,代码来源:frmSwitchboard.cs

示例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;
 }
开发者ID:xdzj,项目名称:KlayGE,代码行数:8,代码来源:SliderUserControlEditor.xaml.cs

示例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);
     
 }
开发者ID:noedelarosa,项目名称:SIC,代码行数:9,代码来源:win_seleccion_ejes_reporte_estadistica.xaml.cs


注:本文中的Xceed类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。