private Gfx() { var images = new ImageCollection(); // walls images.AddImage("walls", "Resources/gfx/blocks/green-wall.png"); images.AddImage("trees", "Resources/gfx/blocks/tree-wall.png"); // players images.AddImage("player-movement", "Resources/gfx/tanks/tank.png"); images.AddImage("enemy-movement", "Resources/gfx/tanks/enemy.png"); images.AddImage("player-bullet-flight", "Resources/gfx/bullets/bullet.png"); // menu images.AddImage("game-menu-background", "Resources/gfx/menu/title.png"); images.AddImage("game-ground", "Resources/gfx/menu/title.png"); // bonus images.AddImage("bonus-boom", "Resources/gfx/bonus/boom.png"); images.AddImage("bonus-health", "Resources/gfx/bonus/health.png"); images.AddImage("bonus-life", "Resources/gfx/bonus/life.png"); m_worldTexture = new Texture(images, PixelFormat.DefaultAlpha); UnitExplosion = new ParticleEffect("Resources/gfx/particles/rocket-explosion-smoke.peff"); RocketExplosionParticleEffect = new ParticleEffect("Resources/gfx/particles/rocket-explosion.peff"); }
private static void LoadImages() { if (imageList == null) { imageList = new ImageCollection(); imageList.AddImage(DevExpress.Images.ImageResourceCache.Default.GetImage("images/actions/additem_16x16.png")); imageList.AddImage(DevExpress.Images.ImageResourceCache.Default.GetImage("images/edit/delete_16x16.png")); } }
//LOGO lấy từ FrameworkParams.ReportHeaderImage public CompanyInfoHeaderStartTitleGridEndFooter() { CompanyInfo info = DACompanyInfo.Instance.load(); //Lấy logo ImageConverter ic = new ImageConverter(); Image img = (Image)ic.ConvertFrom(info.logo); ImageCollection images = new ImageCollection(); images.ImageSize = new Size(48, 48); images.AddImage(img); ReportHeaderImage = images.Images[0]; //Lay Info String blank = " "; StringBuilder str = new StringBuilder(""); if (info.name != null) str.AppendLine(blank + info.name); if (info.address != null) str.AppendLine(blank + "Địa chỉ: " + info.address); if (info.phone != null) str.Append(blank + "Điện thoại: " + info.phone); if (info.fax != null) str.Append(" Fax: " + info.fax); str.AppendLine(); if (info.email != null) str.Append(blank + "Email: " + info.email); if (info.website != null) str.Append(" Website: " + info.website); RichTextBox r = new RichTextBox(); r.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); r.Text = str.ToString(); rtfGridHeader = r.Rtf; }
private void FillupItems(ColorName[] colors) { ImageCollection imgCollection = new ImageCollection(); foreach (ColorName color in colors) { Image img = new Bitmap(20, 20); Graphics g = Graphics.FromImage(img); g.FillRectangle(new SolidBrush(color.Color), new Rectangle(0, 0, 20, 20)); g.Dispose(); imgCollection.AddImage(img); } this.Properties.SmallImages = imgCollection; int i = 0; foreach (ColorName color in colors) { ImageComboBoxItem item = new ImageComboBoxItem(color.Name, color.Color, i); item.Value = color.Color; this.Properties.Items.Add(item); //colors[i].Item3)); i++; } }
public static void InitTitleComboBox(RepositoryItemImageComboBox edit) { ImageCollection iCollection = new ImageCollection(); iCollection.AddImage(Properties.Resources.Doctor); iCollection.AddImage(Properties.Resources.Miss); iCollection.AddImage(Properties.Resources.Mr); iCollection.AddImage(Properties.Resources.Mrs); iCollection.AddImage(Properties.Resources.Ms); iCollection.AddImage(Properties.Resources.Professor); edit.Items.Add(new ImageComboBoxItem(string.Empty, ContactTitle.None, -1)); edit.Items.Add(new ImageComboBoxItem(GetTitleNameByContactTitle(ContactTitle.Dr), ContactTitle.Dr, 0)); edit.Items.Add(new ImageComboBoxItem(GetTitleNameByContactTitle(ContactTitle.Miss), ContactTitle.Miss, 1)); edit.Items.Add(new ImageComboBoxItem(GetTitleNameByContactTitle(ContactTitle.Mr), ContactTitle.Mr, 2)); edit.Items.Add(new ImageComboBoxItem(GetTitleNameByContactTitle(ContactTitle.Mrs), ContactTitle.Mrs, 3)); edit.Items.Add(new ImageComboBoxItem(GetTitleNameByContactTitle(ContactTitle.Ms), ContactTitle.Ms, 4)); edit.Items.Add(new ImageComboBoxItem(GetTitleNameByContactTitle(ContactTitle.Prof), ContactTitle.Prof, 5)); edit.SmallImages = iCollection; }
public static void InitPersonComboBox(RepositoryItemImageComboBox edit) { ImageCollection iCollection = new ImageCollection(); iCollection.AddImage(Properties.Resources.Mr); iCollection.AddImage(Properties.Resources.Ms); edit.Items.Add(new ImageComboBoxItem(Properties.Resources.Male, ContactGender.Male, 0)); edit.Items.Add(new ImageComboBoxItem(Properties.Resources.Female, ContactGender.Female, 1)); edit.SmallImages = iCollection; }
private void configGridColumns(DataView dataView) { var view = grdTransfer.MainView as GridView; if (view == null) { return; } var maxOldExpression = getPercentageMax(dataView, RelativeExpressionOldPercentage); var maxNewExpression = getPercentageMax(dataView, RelativeExpressionNewPercentage); var itemProgressBarOldExpression = initProgressBarEditor(maxOldExpression); itemProgressBarOldExpression.CustomDisplayText += OnProgressBarCustomDisplayText; var itemProgressBarNewExpression = initProgressBarEditor(maxNewExpression); itemProgressBarNewExpression.CustomDisplayText += OnProgressBarCustomDisplayText; foreach (GridColumn col in view.Columns) { col.OptionsColumn.AllowEdit = false; if (col.FieldName == ColumnNamesOfTransferTable.Container) { col.Visible = true; col.Caption = COL_CONTAINER; var itemImageComboBox = new RepositoryItemImageComboBox { ReadOnly = true }; var smallImages = new ImageCollection(); itemImageComboBox.SmallImages = smallImages; itemImageComboBox.Items.BeginUpdate(); var dv = view.DataSource as DataView; if (dv != null) { var dt = dv.ToTable(); foreach (DataRow dr in dt.Rows) { string container = dr[ColumnNamesOfTransferTable.Container].ToString(); string displayName = dr[DisplayName].ToString(); ApplicationIcon icon = ApplicationIcons.IconByName(container); if (icon != null && icon != ApplicationIcons.EmptyIcon) { smallImages.AddImage(icon.ToImage()); itemImageComboBox.Items.Add(new ImageComboBoxItem(displayName, container, smallImages.Images.Count - 1)); } else { itemImageComboBox.Items.Add(new ImageComboBoxItem(displayName, container)); } } } itemImageComboBox.Items.EndUpdate(); col.ColumnEdit = itemImageComboBox; col.SortOrder = ColumnSortOrder.Ascending; } else if (col.FieldName == DisplayName) { col.Visible = false; } else if (col.FieldName == RelativeExpressionOld) { col.Visible = false; } else if (col.FieldName == ExpressionValue) { col.Visible = false; } else if (col.FieldName == Unit) { col.Visible = false; } else if (col.FieldName == RelativeExpressionOldPercentage) { col.Caption = COL_OLDVALUE; col.Visible = _presenter.ShowOldValues; col.OptionsColumn.AllowEdit = false; col.ColumnEdit = itemProgressBarOldExpression; } else if (col.FieldName == RelativeExpressionNew) { col.Visible = false; } else if (col.FieldName == RelativeExpressionNewPercentage) { col.Caption = COL_NEWVALUE; col.OptionsColumn.AllowEdit = false; col.ColumnEdit = itemProgressBarNewExpression; } } }
private void ConfigGridColumns() { var view = grdTransfer.MainView as GridView; if (view == null) { return; } var itemProgressBar = new RepositoryItemProgressBar { ReadOnly = true, Enabled = false, BorderStyle = BorderStyles.NoBorder, Maximum = 100, Minimum = 0, NullText = string.Empty, PercentView = false, ShowTitle = true }; itemProgressBar.DisplayFormat.FormatType = FormatType.Numeric; itemProgressBar.CustomDisplayText += OnProgressBarCustomDisplayText; foreach (GridColumn col in view.Columns) { col.OptionsColumn.AllowEdit = false; if (col.FieldName == ColumnNamesOfTransferTable.Container.ToString()) { col.Visible = true; col.Caption = PKSimConstants.ProteinExpressions.ColumnCaptions.Transfer.COL_CONTAINER; var itemImageComboBox = new RepositoryItemImageComboBox { ReadOnly = true }; var smallImages = new ImageCollection(); itemImageComboBox.SmallImages = smallImages; itemImageComboBox.Items.BeginUpdate(); var dv = view.DataSource as DataView; if (dv != null) { var dt = dv.ToTable(); foreach (DataRow dr in dt.Rows) { string container = dr[ColumnNamesOfTransferTable.Container.ToString()].ToString(); string displayName = dr[ColumnNamesOfTransferTable.DisplayName.ToString()].ToString(); ApplicationIcon icon = ApplicationIcons.IconByName(container); if (icon != null && icon != ApplicationIcons.EmptyIcon) { smallImages.AddImage(icon.ToImage()); itemImageComboBox.Items.Add(new ImageComboBoxItem(displayName, container, smallImages.Images.Count - 1)); } else { itemImageComboBox.Items.Add(new ImageComboBoxItem(displayName, container)); } } } itemImageComboBox.Items.EndUpdate(); col.ColumnEdit = itemImageComboBox; col.SortOrder = ColumnSortOrder.Ascending; } else if (col.FieldName == ColumnNamesOfTransferTable.DisplayName.ToString()) { col.Visible = false; } else if (col.FieldName == ColumnNamesOfTransferTable.RelativeExpressionOld.ToString()) { col.Visible = false; } else if (col.FieldName == ColumnNamesOfTransferTable.ExpressionValue.ToString()) { col.Visible = false; } else if (col.FieldName == ColumnNamesOfTransferTable.Unit.ToString()) { col.Visible = false; } else if (col.FieldName == string.Concat(ColumnNamesOfTransferTable.RelativeExpressionOld.ToString(), STR_Percentage)) { col.Caption = PKSimConstants.ProteinExpressions.ColumnCaptions.Transfer.COL_OLDVALUE; col.Visible = _presenter.ShowOldValues; col.OptionsColumn.AllowEdit = false; col.ColumnEdit = itemProgressBar; } else if (col.FieldName == ColumnNamesOfTransferTable.RelativeExpressionNew.ToString()) { col.Visible = false; } else if (col.FieldName == string.Concat(ColumnNamesOfTransferTable.RelativeExpressionNew.ToString(), STR_Percentage)) { col.Caption = PKSimConstants.ProteinExpressions.ColumnCaptions.Transfer.COL_NEWVALUE; col.OptionsColumn.AllowEdit = false; col.ColumnEdit = itemProgressBar; } } }
private RepositoryItemImageComboBox CotImageTaiNguyen( GridColumn colNhomTaiNguyen, string fieldName) { ImageCollection images = new ImageCollection(); images.AddImage(ResourceMan.getImage48("DM_KhachHang.png")); images.AddImage(ResourceMan.getImage48("DM_NhaCungCap.png")); images.AddImage(ResourceMan.getImage48("DM_KhachHang_NhaCungCap.png")); RepositoryItemImageComboBox icb = new RepositoryItemImageComboBox(); icb.LargeImages = images; icb.Items.AddRange(new object[]{ new ImageComboBoxItem((Int64)1,0), new ImageComboBoxItem((Int64)2,1), new ImageComboBoxItem((Int64)3,2) }); icb.GlyphAlignment = HorzAlignment.Center; colNhomTaiNguyen.ColumnEdit = icb; colNhomTaiNguyen.Width = 20; colNhomTaiNguyen.OptionsColumn.FixedWidth = true; colNhomTaiNguyen.OptionsColumn.AllowEdit = false; colNhomTaiNguyen.OptionsColumn.AllowSize = false; colNhomTaiNguyen.FieldName = fieldName; colNhomTaiNguyen.OptionsColumn.ShowCaption = false; colNhomTaiNguyen.OptionsFilter.AllowFilter = false; colNhomTaiNguyen.OptionsFilter.AllowAutoFilter = false; colNhomTaiNguyen.Caption = "."; colNhomTaiNguyen.OptionsColumn.AllowFocus = false; return icb; }
public frmCalendar(Core.Core core) { InitializeComponent(); _core = core; if (_core.Resource != null) { btnRefresh.Image = _core.Resource.GetImage("date_refresh"); btnAdd.Image = _core.Resource.GetImage("date_add"); btnEdit.Image = _core.Resource.GetImage("date_edit"); btnDelete.Image = _core.Resource.GetImage("date_delete"); btnTableSave.Image = _core.Resource.GetImage("table_save"); } Result r = new Result(); r = _core.RemoteObject.Connection.Call(_core.RemoteObject.User.UserNo, 202, 140141, 140141, null); imagecombo.SmallImages = image; if (r.ResultNo == 0) { dtable = r.Data.Tables[0]; int i = 0; foreach (DataRow dr in r.Data.Tables[0].Rows) { i++; image.AddImage(Base64ToImage(Static.ToStr(dr["ICON"]))); ImageComboBoxItem ri = new ImageComboBoxItem(Static.ToStr(dr["DESCRIPTION"]), Static.ToInt(dr["WEATHERID"]), i); imagecombo.Items.Add(ri); } } dt.Columns.Add("DAY", typeof(string)); dt.Columns.Add("DAYDATE", typeof(int)); dt.Columns.Add("DayType", typeof(int)); dt.Columns.Add("DayWeatherType", typeof(int)); dt.Columns.Add("DayTemperature", typeof(int)); dt.Columns.Add("NightWeatherType", typeof(int)); dt.Columns.Add("NightTemperature", typeof(int)); RefreshData(DateTime.Now); gvwCalendar.Columns[0].Visible = false; gvwCalendar.Columns[1].Caption = "№"; gvwCalendar.Columns[1].MinWidth = 20; gvwCalendar.Columns[1].MaxWidth = 20; gvwCalendar.Columns[1].OptionsColumn.AllowEdit = false; gvwCalendar.Columns[1].OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False; gvwCalendar.Columns[1].OptionsColumn.AllowSize = false; gvwCalendar.Columns[2].Caption = "Өдрийн төрөл"; gvwCalendar.Columns[3].Caption = "Өдрийн цаг агаар"; gvwCalendar.Columns[3].ColumnEdit = imagecombo; gvwCalendar.Columns[4].Caption = "Өдрийн хэм (градус)"; gvwCalendar.Columns[5].Caption = "Шөнийн цаг агаар"; gvwCalendar.Columns[5].ColumnEdit = imagecombo; gvwCalendar.Columns[6].Caption = "Шөнийн хэм (градус)"; string msg = ""; ArrayList Tables = new ArrayList(); string[] names = { "PADAYTYPE" }; DictUtility.PrivNo = 130001; Result res = DictUtility.Get(_core.RemoteObject, names, ref Tables); DataTable dataCombo = (DataTable)Tables[0]; if (dataCombo == null) { msg = "Dictionary-д PADAYTYPE оруулаагүй байна-" + res.ResultDesc; } else { gvwCalendar.Columns[2].ColumnEdit = CreateRepositoryLookUpEdit(dataCombo); } }
/// <summary>Загрузка списка контролеров из базы данных</summary> /// <param name="TableName">Имя таблицы для загрузки данных</param> /// <param name="CountryId">Если NULL, выгружается вся классификация, иначе по стране</param> /// <param name="IsExpClassification">Развернуть узлы направлений</param> /// <param name="ShowCountProducts">Показывать кол-во продукций у классификации</param> public void LoadTreeList(string TableName = null, string CountryId = "NULL", bool IsExpClassification = true, bool ShowCountProducts = false, string FilterParametr = "NULL") { if (ReferenceEquals(TableName, null)) { TableName = "Classification." + ParentForm.Name; } _TableName = TableName; _CountryId = CountryId; _IsExpClassification = IsExpClassification; _ShowCountProducts = ShowCountProducts; _FilterParametr = FilterParametr; // загружаем изображения в коллекцию if (this.tlClassification.Nodes.Count != 0) { Filling_ndList(); } mdVariables.EventChangedControl = false; ImageCol.Clear(); ImageCol.AddImage(global::My.Resources.Resources.directions_16x16); ImageCol.AddImage(global::My.Resources.Resources.ClassificationProducts_16x16); mdQuery.SelectQueryData( TableName, "EXEC GetTreeListClassificationProducts " + "@CountryId = " + CountryId + ", " + "@IsExpClassification = " + System.Convert.ToString(Convert.ToInt16(IsExpClassification)) + ", " + "@ShowCountProducts = " + System.Convert.ToString(Convert.ToInt16(ShowCountProducts)) + ", " + "@FilterParametr = " + clsForSQL.InDataBase(FilterParametr), "Class.GetResearchMethods" ); if (ReferenceEquals(this.tlClassification.DataSource, null)) { this.tlClassification.ClearNodes(); this.tlClassification.DataSource = mdQuery.iDataSet.Tables[TableName]; this.tlClassification.ParentFieldName = "ParentId"; this.tlClassification.KeyFieldName = "Id"; this.tlClassification.BestFitColumns(true); this.tlClassification.StateImageList = ImageCol; mdHidenAllColumns.HidenAllColumns_TreeList(this.tlClassification); // если столбец существует, показываем его if (!ReferenceEquals(this.tlClassification.Columns[UserControlProperty.ColumnsNameInTreeList], null)) { this.tlClassification.Columns[UserControlProperty.ColumnsNameInTreeList].Visible = true; } } mdVariables.EventChangedControl = true; // всем нодам присваиваем иконку foreach (TreeListNode nd in this.tlClassification.Nodes) { FillSelectImageIndex(nd); SettingsNode(nd); } // извлечение из коллекций состояний нодов foreach (var n in ndList) { if (this.tlClassification.FindNodeByKeyID(n.Id) != null) { this.tlClassification.FindNodeByKeyID(n.Id).Expanded = System.Convert.ToBoolean(n.Expanded); this.tlClassification.FindNodeByKeyID(n.Id).Checked = System.Convert.ToBoolean(n.Checked); } } this.tlClassification.FocusedNode = this.tlClassification.FindNodeByKeyID(SelectedItemId); }
static ImageCollection CreateImageCollection() { ImageCollection ret = new ImageCollection(); ret.ImageSize = new Size(16, 16); ret.AddImage(Properties.Resources.icon_employee_quick_thank_16); ret.AddImage(Properties.Resources.icon_employee_quick_probation_notice_16); ret.AddImage(Properties.Resources.icon_employee_quick_excellence_16); ret.AddImage(Properties.Resources.icon_employee_quick_award_16); ret.AddImage(Properties.Resources.icon_employee_quick_welcome_16); return ret; }
protected override void EndProcessing() { Utils.StartProfile("MapCmdlet"); var map = new InnerMap() { EnableAnimation = false, EnableScrolling = false, EnableZooming = false, EnableDelayedScrolling = false }; map.NavigationPanelOptions.ShowCoordinates = false; map.NavigationPanelOptions.ShowKilometersScale = false; map.NavigationPanelOptions.ShowMilesScale = false; switch (CoordinateSystem) { case MapCoordinateSystem.Geo: map.CoordinateSystem = new GeoMapCoordinateSystem(); break; case MapCoordinateSystem.Cartesian: map.CoordinateSystem = new CartesianMapCoordinateSystem(); break; } if (map.CoordinateSystem is GeoMapCoordinateSystem geoCoordSystem) { switch (Projection ?? MapProjection.Default) { case MapProjection.Default: //Leave projection as is break; case MapProjection.BraunStereographic: geoCoordSystem.Projection = new BraunStereographicProjection(); break; case MapProjection.EllipticalMercator: geoCoordSystem.Projection = new EllipticalMercatorProjection(); break; case MapProjection.EqualArea: geoCoordSystem.Projection = new EqualAreaProjection(); break; case MapProjection.Equidistant: geoCoordSystem.Projection = new EquidistantProjection(); break; case MapProjection.Equirectangular: geoCoordSystem.Projection = new EquirectangularProjection(); break; case MapProjection.Kavrayskiy: geoCoordSystem.Projection = new KavrayskiyProjection(); break; case MapProjection.LambertCylindricalEqualArea: geoCoordSystem.Projection = new LambertCylindricalEqualAreaProjection(); break; case MapProjection.Miller: geoCoordSystem.Projection = new MillerProjection(); break; case MapProjection.Sinusoidal: geoCoordSystem.Projection = new SinusoidalProjection(); break; case MapProjection.SphericalMercator: geoCoordSystem.Projection = new SphericalMercatorProjection(); break; } } else if ((Projection ?? MapProjection.Default) != MapProjection.Default) { throw new Exception("Projection can be set only in Geo coordinate system."); } if (ImageList != null && ImageList.Length > 0) { ExecuteLocked(() => { var images = new ImageCollection(); if (ImageSize.HasValue) { images.ImageSize = ImageSize.Value; } foreach (var imageFile in ImageList) { var imagePath = Project.Current.MapPath(imageFile); if (string.IsNullOrWhiteSpace(imagePath) || !System.IO.File.Exists(imagePath)) { throw new Exception($"Cannot find image: '{imagePath}'."); } var bmp = new Bitmap(imagePath); images.AddImage(bmp); } map.ImageList = images; }, LockFiles ? LockObject : null); } var backColor = Utils.ColorFromString(BackColor); if (backColor != Color.Empty) { map.BackColor = backColor; } var context = new MapContext() { Map = map }; WriteObject(context); }
static ImageCollection CreateFlagStatusImageCollection() { ImageCollection ret = new ImageCollection(); ret.AddImage(Properties.Resources.Today_Flag); ret.AddImage(Properties.Resources.Tomorrow_Flag); ret.AddImage(Properties.Resources.ThisWeek_Flag); ret.AddImage(Properties.Resources.NextWeek_Flag); ret.AddImage(Properties.Resources.NoDate_Flag); ret.AddImage(Properties.Resources.Custom_Flag); ret.AddImage(Properties.Resources.Completed_16x16); return ret; }
/// <summary>Загрузка списка контролеров из базы данных</summary> /// <param name="TableName">Имя таблицы для загрузки данных</param> /// <param name="CountryId">Если NULL, выгружается вся продукция, иначе по стране</param> /// <param name="ProductId">Если NULL, выгружается вся продукция, иначе по продукция</param> public void LoadTreeList(string TableName = null, string CountryId = "NULL", string ProductId = "NULL") { if (ReferenceEquals(TableName, null)) { TableName = "ObjectsQurantine." + ParentForm.Name; } _TableName = TableName; _CountryId = CountryId; _ProductId = ProductId; // загружаем изображения в коллекцию if (this.tlQurantineObjects.Nodes.Count != 0) { Filling_ndList(); } mdVariables.EventChangedControl = false; ImageCol.Clear(); ImageCol.AddImage(global::My.Resources.Resources.microscope_16x16); ImageCol.AddImage(global::My.Resources.Resources.bakterii_16x16); ImageCol.AddImage(global::My.Resources.Resources.virus_16x16); ImageCol.AddImage(global::My.Resources.Resources.gribi16x16); ImageCol.AddImage(global::My.Resources.Resources.cleshi_16x16); ImageCol.AddImage(global::My.Resources.Resources.molliuski_16x16); ImageCol.AddImage(global::My.Resources.Resources.nasekomye_16x16); ImageCol.AddImage(global::My.Resources.Resources.nematody_16x16); ImageCol.AddImage(global::My.Resources.Resources.sorniaki_16x16); mdQuery.SelectQueryData( TableName, "EXEC GetTreeListObjectsQurantine " + "@CountryId = " + CountryId + ", " + "@ProductId = " + ProductId, "Class.GetObjectsQurantine" ); if (ReferenceEquals(this.tlQurantineObjects.DataSource, null)) { this.tlQurantineObjects.ClearNodes(); this.tlQurantineObjects.DataSource = mdQuery.iDataSet.Tables[TableName]; this.tlQurantineObjects.ParentFieldName = "ParentId"; this.tlQurantineObjects.KeyFieldName = "Id"; this.tlQurantineObjects.BestFitColumns(true); this.tlQurantineObjects.StateImageList = ImageCol; mdHidenAllColumns.HidenAllColumns_TreeList(this.tlQurantineObjects); // если столбец существует, показываем его if (!ReferenceEquals(this.tlQurantineObjects.Columns[UserControlProperty.ColumnsNameInTreeList], null)) { this.tlQurantineObjects.Columns[UserControlProperty.ColumnsNameInTreeList].Visible = true; } } mdVariables.EventChangedControl = true; // всем нодам присваиваем иконку foreach (TreeListNode nd in this.tlQurantineObjects.Nodes) { FillSelectImageIndex(nd); SettingsNode(nd); } // извлечение из коллекций состояний нодов foreach (var n in ndList) { if (this.tlQurantineObjects.FindNodeByKeyID(n.Id) != null) { this.tlQurantineObjects.FindNodeByKeyID(n.Id).Expanded = System.Convert.ToBoolean(n.Expanded); this.tlQurantineObjects.FindNodeByKeyID(n.Id).Checked = System.Convert.ToBoolean(n.Checked); } } this.tlQurantineObjects.FocusedNode = this.tlQurantineObjects.FindNodeByKeyID(SelectedItemId); }
private void FillImageCollection() { imageCollection.AddImage(Image.FromFile("..\\..\\IMAGES\\low.gif")); imageCollection.AddImage(Image.FromFile("..\\..\\IMAGES\\10_1.gif")); imageCollection.AddImage(Image.FromFile("..\\..\\IMAGES\\high.gif")); }