资源简介
该demo 包含42个跟dx相关的项目都在一个解决方案中,是你开发dx时的好帮手。具体demo 有DockingDemo,ApplicationUIMainDemo,BarEditors,BrowserDemo,CacheNode,CacheRoot,ChartsMainDemo,ContactManagement,DataSetServer,EditorsMainDemo,GaugesMainDemo,GridMainDemo,GridTutorials,LayoutMainDemo,LoggerRepeater,MapMainDemo,MDIDemo,MyControls1,NavBarMainDemo,PdfViewerDemo,PhotoViewer,PhotoViewer.MDI,PivotGridMainDemo,PivotGridOlapBrowser,PrintingMainDemo,RibbonSimplePad,RichEditMainDemo,SchedulerMainDemo,SimplePad,SpellCheckerMainDemo,StockMarketWidgets,SpreadsheetMainDemo,TabbedBrowser,TileControlDemo,TreeListMainDemo,TreeListTutorials,VertGridMainDemo,VertGridTutorials,WinRTLiveTileManagerMainDemo,WizardAeroDemo,WizardTourDemo,XpoTutorials。如果在使用过程中遇到找不到数据源的情况,请下载
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
using DevExpress.DXperience.Demos;
using DevExpress.XtraEditors;
using DevExpress.XtraTab;
namespace DevExpress.ApplicationUI.Demos {
public class DemosInfo : ModulesInfo {
public static void ShowModule(string name DevExpress.XtraEditors.GroupControl group DevExpress.Utils.frames.ApplicationCaption caption RibbonMenuManager manager) {
ModuleInfo item = DemosInfo.GetItem(name);
Cursor currentCursor = Cursor.Current;
Cursor.Current = Cursors.WaitCursor;
try {
Control oldTutorial = null;
if(Instance.CurrentModulebase != null) {
if(Instance.CurrentModulebase.Name == name) return;
oldTutorial = Instance.CurrentModulebase.TModule;
}
TutorialControlbase tutorial = item.TModule as TutorialControlbase;
tutorial.Bounds = group.DisplayRectangle;
Instance.CurrentModulebase = item;
tutorial.Visible = false;
group.Controls.Add(tutorial);
tutorial.Dock = Dockstyle.Fill;
//TutorialControl tc = tutorial as TutorialControl;
//if(tc != null)
// manager.AllowExport(tc.ExportControl);
//else manager.AllowExport(null);
tutorial.RibbonMenuManager = manager;
tutorial.TutorialName = name;
tutorial.Caption = caption;
tutorial.Visible = true;
item.WasShown = true;
if(oldTutorial != null)
oldTutorial.Visible = false;
}
finally {
Cursor.Current = currentCursor;
}
RaiseModuleChanged();
}
public static string GetLoremIpsumText(int seed) {
return string.Format(“{0} {1}“ texts[seed % texts.Length] texts[(seed + 2) % texts.Length]);
}
static string[] texts = new string[]{
“Vestibulum sem nunc cursus sit amet placerat id scelerisque at tortor. Nullam sit amet felis eros ac imperdiet quam. Aliquam eu ipsum dui.“
“Cum sociis natoque penatibus et magnis dis parturient montes nascetur ridiculus mus. Curabitur sit amet sapien metus eget pharetra velit.“
“Duis sagittis iaculis nisl sit amet ultricies lectus porttitor nec. Suspendisse id venenatis sem. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.“
“Aliquam erat volutpat. Ut sit amet purus. Nullam a lectus. Duis in elit. Ut nonummy est pellentesque eros. Sed ultrices convallis nulla. Phasellus urna lorem mattis a luctus congue dictum in nunc.“
};
}
//
public class TutorialControl : TutorialControlbase {
public Tutoria
评论
共有 条评论