public void GetOrganizationStructure(int ExpandedRoot = 1, int ExpandedFilials = 1, int ExpandedGroups = 0, int ExpandedRoleJob = 0, string OnlyCurentFillial = "NULL") { if (sender.Nodes.Count != 0) { Filling_ndList(); } mdVariables.EventChangedControl = false; ImageCol.Clear(); ImageCol.AddImage(global::My.Resources.Resources.company_16x16); ImageCol.AddImage(global::My.Resources.Resources.organization_16x16); ImageCol.AddImage(global::My.Resources.Resources.group_people_16x16); ImageCol.AddImage(global::My.Resources.Resources.performer_16x16); ImageCol.AddImage(global::My.Resources.Resources.current_16x16); sender.ClearNodes(); sender.DataSource = mdQuery.iDataSet.Tables[TableName]; sender.KeyFieldName = "Id"; sender.ParentFieldName = "ParentId"; sender.StateImageList = ImageCol; sender.PopulateColumns(); mdHidenAllColumns.HidenAllColumns_TreeList(sender); sender.Columns["Name"].Visible = sender.Columns.Count != 0; }
private void Form1_Load(object sender, System.EventArgs e) { gridControl1.DataSource = CreateTable(); RepositoryItemCheckEdit checkEdit = gridControl1.RepositoryItems.Add("CheckEdit") as RepositoryItemCheckEdit; checkEdit.PictureChecked = GetImageFromResource("Image0"); checkEdit.PictureUnchecked = GetImageFromResource("Image1"); checkEdit.CheckStyle = DevExpress.XtraEditors.Controls.CheckStyles.UserDefined; gridView1.Columns["CheckEdit"].ColumnEdit = checkEdit; RepositoryItemImageComboBox imageCombo = gridControl1.RepositoryItems.Add("ImageComboBoxEdit") as RepositoryItemImageComboBox; DevExpress.Utils.ImageCollection images = new DevExpress.Utils.ImageCollection(); images.AddImage(GetImageFromResource("Image2")); images.AddImage(GetImageFromResource("Image3")); images.AddImage(GetImageFromResource("Image4")); imageCombo.SmallImages = images; imageCombo.Items.Add(new ImageComboBoxItem("Minor", 1, 0)); imageCombo.Items.Add(new ImageComboBoxItem("Moderate", 2, 1)); imageCombo.Items.Add(new ImageComboBoxItem("Severe", 3, 2)); imageCombo.GlyphAlignment = DevExpress.Utils.HorzAlignment.Center; gridControl1.RepositoryItems.Add(imageCombo); gridView1.Columns["ImageComboBox"].ColumnEdit = imageCombo; RepositoryItemPictureEdit pictureEdit = gridControl1.RepositoryItems.Add("PictureEdit") as RepositoryItemPictureEdit; pictureEdit.SizeMode = PictureSizeMode.Zoom; pictureEdit.NullText = " "; gridView1.Columns["PictureEdit"].ColumnEdit = pictureEdit; gridControl1.RepositoryItems.Add(pictureEdit); RepositoryItemTextEdit textEdit = new RepositoryItemTextEdit(); //textEdit.ContextImageOptions.Image = GetImageFromResource("Image6"); gridView1.Columns["ContextImage"].ColumnEdit = textEdit; gridControl1.RepositoryItems.Add(textEdit); RepositoryItemButtonEdit buttonEdit = new RepositoryItemButtonEdit(); buttonEdit.TextEditStyle = TextEditStyles.DisableTextEditor; buttonEdit.AllowHtmlDraw = DevExpress.Utils.DefaultBoolean.True; var collection = new DevExpress.Utils.ImageCollection(); collection.AddImage(GetImageFromResource("Image7")); collection.Images.SetKeyName(0, "Image7.png"); buttonEdit.HtmlImages = collection; gridView1.Columns["HTMLImage"].ColumnEdit = buttonEdit; gridControl1.RepositoryItems.Add(buttonEdit); }
/// <summary> /// Carrega todos os itens da barra de ferramentas de modulos. /// </summary> public void Carregar_Barra_Ferramenta(DevExpress.XtraBars.Ribbon.RibbonControl ribbon) { string sQuery = "select * from vw_retornar_modulos_acessos where usuario = {0}"; sQuery = string.Format(sQuery , Propriedades.CodigoUsuario); DataTable dt = SQL.Select(sQuery, "x", false); Propriedades.FormMain.cmdToolModulos.DropDownControl = ts_Modulos; DevExpress.Utils.ImageCollection ic = (DevExpress.Utils.ImageCollection)ribbon.Images; //-- Carrega itens do menu. foreach (DataRow row in dt.Select("", "descricao_modulo")) { DevExpress.XtraBars.BarButtonItem bbi = new DevExpress.XtraBars.BarButtonItem(); bbi.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(Propriedades.FormMain.bbi_ItemClick); bbi.Caption = row["Descricao_Modulo"].ToString(); bbi.Description = row["Descricao_Modulo"].ToString(); bbi.Tag = row["Modulo"]; //-- Carrega imagem. DataTable dt_imagem = SQL.Select("Select imagem from Modulos where modulo = " + row["Modulo"].ToString(), "x", false); if (dt_imagem.Rows.Count > 0 && dt_imagem.Rows[0][0] != DBNull.Value) { MemoryStream ms = new MemoryStream((byte[])dt_imagem.Rows[0][0]); ic.AddImage(Image.FromStream(ms)); bbi.ImageIndex = ic.Images.Count - 1; } ribbon.Items.Add(bbi); ts_Modulos.ItemLinks.Add(bbi); } dt.Dispose(); dt = null; }
public static void RetrieveMarkerImages() { if (markerImagesTable == null) { markerImageList = new DevExpress.Utils.ImageCollection(); markerImagesTable = new XPCollection <UIMarkerIcons>(XpoDefault.Session); markerImagesTable.Load(); foreach (var dr in markerImagesTable) { Image img = GlobalMethods.byteArrayToImage(dr.SymbolImage); markerImageList.AddImage(img, dr.SymbolName); } } }
public static void RetrieveMarkerImages() { var imagesNames = new List <string>() { "images/setup/properties_16x16.png" , "images/status/error_16x16.png" , "images/status/warning_16x16.png" , "images/support/article_16x16.png" , "images/support/suggestion_16x16.png" , "images/tasks/edittask_16x16.png" , "images/tasks/status_16x16.png" , "images/toolbox%20items/checkbox2_16x16.png" , "images/scheduling/dayview_16x16.png" , "images/scheduling/monthview_16x16.png" , "images/scheduling/switchtimescalesto_16x16.png" , "images/scheduling/weekview_16x16.png" , "images/setup/loadpagesetup_16x16.png" , "images/sort/sortgroupheader_16x16.png" , "images/spreadsheet/allowuserstoeditranges_16x16.png" , "images/spreadsheet/showdetail_16x16.png" , "images/spreadsheet/useinformula_16x16.png" , "images/math/showformulas_16x16.png" , "images/media/media_16x16.png" , "images/media/youtube_16x16.png" , "images/miscellaneous/colors_16x16.png" , "images/miscellaneous/currency_16x16.png" , "images/miscellaneous/design_16x16.png" , "images/miscellaneous/wizard_16x16.png" , "images/mode/touchmode_16x16.png" , "images/navigation/backward_16x16.png" , "images/navigation/documentmap_16x16.png" , "images/navigation/forward_16x16.png" , "images/navigation/home_16x16.png" , "images/navigation/navigationbar_16x16.png" , "images/navigation/next_16x16.png" , "images/navigation/previous_16x16.png" , "images/navigation/up_16x16.png" , "devav/actions/about_16x16.png" , "devav/actions/buy_16x16.png" , "devav/actions/delete_16x16.png" , "devav/actions/edit_16x16.png" , "devav/contacts/mail3_16x16.png" , "devav/contacts/mobilephone_16x16.png" , "devav/opportunities/hight_16x16.png" , "devav/opportunities/low_16x16.png" , "devav/opportunities/medium_16x16.png" , "devav/people/employeeaward_16x16.png" , "devav/people/employeeexcellence_16x16.png" , "devav/people/employeenotice_16x16.png" , "devav/people/employeethank_16x16.png" , "devav/people/miss_16x16.png" , "devav/people/mr_16x16.png" , "devav/people/mrs_16x16.png" , "devav/people/ms_16x16.png" , "devav/people/people_16x16.png" , "images/business%20objects/bocontact_16x16.png" , "images/business%20objects/borole_16x16.png" , "images/business%20objects/bosale_16x16.png" , "images/business%20objects/boscheduler_16x16.png" }; if (markerImageList.Images.Count == 0) { foreach (var item in imagesNames) { Image img = DevExpress.Images.ImageResourceCache.Default.GetImage(item); markerImageList.AddImage(img); } } }
private void SetControls() { this.layoutControl1.AllowCustomizationMenu = false; DevExpress.Utils.ImageCollection stateImages = new DevExpress.Utils.ImageCollection(); stateImages.ImageSize = new System.Drawing.Size(16, 16); stateImages.AddImage(Properties.Resources.loader); tcgView.Images = stateImages; worker = new BackgroundWorker(); worker.WorkerSupportsCancellation = true; worker.DoWork += new DoWorkEventHandler(worker_DoWork); BPContext = new BrightPlatformEntities(UserSession.EntityConnection); ccbeSubcampaign.Properties.ReadOnly = true; this.GetCampaigns(); bbiExportXLSX.Enabled = true; bbiExportXLS.Enabled = true; bbiExportCSV.Enabled = true; }