public void SetView(DevExpress.ExpressApp.View view) { this.ViewSite.Controls.Clear(); if (view != null) { contextMenu.CreateControls(view); view.CreateControls(); ViewSite.Controls.Add((Control)view.Control); this.ViewCaption.Text = view.Caption; Header.Title = view.Caption + " - " + WebApplication.Instance.Title; ImageInfo imageInfo = ImageLoader.Instance.GetLargeImageInfo(view.Info.GetAttributeValue("ImageName")); if (imageInfo.IsEmpty) { ViewImage.Visible = false; } else { ViewImage.ImageUrl = imageInfo.ImageUrl; } if (view is DetailView) { SearchActionContainer.Visible = false; ObjectsCreationActionContainer.Visible = false; } //string colorString = view.Info.GetAttributeValue("BackColor"); //if(!string.IsNullOrEmpty(colorString)) { // try { // KnownColor kColor = (KnownColor)Enum.Parse(typeof(KnownColor), colorString); // ViewTitle.BackColor = Color.FromKnownColor(kColor); // } // catch(Exception) { } //} } }
public void SetView(DevExpress.ExpressApp.View view) { ViewSite.Controls.Clear(); if (view != null) { contextMenu.CreateControls(view); view.CreateControls(); if (ViewControlAdding != null) { ViewControlAdding(this, EventArgs.Empty); } ViewSite.Controls.Add((Control)view.Control); ViewCaptionLabel.Text = view.Caption; ImageInfo imageInfo = ImageLoader.Instance.GetLargeImageInfo(view.Info.GetAttributeValue("ImageName")); if (imageInfo.IsEmpty) { ViewImage.Visible = false; } else { ViewImage.ImageUrl = imageInfo.ImageUrl; } } }
public void SetView(DevExpress.ExpressApp.View view) { this.ViewSite.Controls.Clear(); if (view != null) { contextMenu.CreateControls(view); view.CreateControls(); ViewSite.Controls.Add((Control)view.Control); this.ViewCaptionLabel.Text = view.Caption; Header.Title = view.Caption + " - " + WebApplication.Instance.Title; ImageInfo imageInfo = ImageLoader.Instance.GetLargeImageInfo(view.Model.ModelClass.ImageName); if (imageInfo.IsEmpty) { ViewImage.Visible = false; } else { ViewImage.ImageUrl = imageInfo.ImageUrl; } if (view is DetailView) { //SearchActionContainer.Visible = false; //ObjectsCreationActionContainer.Visible = false; } } }
public void SetView(DevExpress.ExpressApp.View view) { ViewSite.Controls.Clear(); if (view != null) { contextMenu.CreateControls(view); view.CreateControls(); if (ViewControlAdding != null) { ViewControlAdding(this, EventArgs.Empty); } ViewSite.Controls.Add((Control)view.Control); ViewCaption.Text = view.Caption; ImageInfo imageInfo = ImageLoader.Instance.GetLargeImageInfo(view.Info.GetAttributeValue("ImageName")); if (imageInfo.IsEmpty) { ViewImage.Visible = false; } else { ViewImage.ImageUrl = imageInfo.ImageUrl; } string colorString = view.Info.GetAttributeValue("BackColor"); //if(!string.IsNullOrEmpty(colorString)) { // try { // KnownColor kColor = (KnownColor)Enum.Parse(typeof(KnownColor), colorString); // //ViewTitle.BackColor = Color.FromKnownColor(kColor); // } // catch(Exception) { } //} } }
public void SetView(DevExpress.ExpressApp.View view) { this.view = view; if (view != null) { contextMenu.CreateControls(view); } OnViewChanged(view); }
public void SetView(DevExpress.ExpressApp.View view) { ViewSite.Controls.Clear(); if (view != null) { contextMenu.CreateControls(view); view.CreateControls(); ViewSite.Controls.Add((Control)view.Control); ViewCaptionLabel.Text = view.Caption; ImageInfo imageInfo = ImageLoader.Instance.GetImageInfo(view.Model.ModelClass.ImageName); if (imageInfo.IsEmpty) { ViewImage.Visible = false; ViewImage.ImageUrl = null; } else { ViewImage.ImageUrl = imageInfo.ImageUrl; } } }
public void SetView(DevExpress.ExpressApp.View view) { ViewSite.Controls.Clear(); if (view != null) { contextMenu.CreateControls(view); view.CreateControls(); ViewSite.Controls.Add((Control)view.Control); ViewCaption.Text = view.Caption; ImageInfo imageInfo = ImageLoader.Instance.GetImageInfo(view.Info.GetAttributeValue("ImageName")); if (imageInfo.IsEmpty) { ViewImage.Visible = false; ViewImage.ImageUrl = null; } else { ViewImage.ImageUrl = imageInfo.ImageUrl; } OnViewInfoChanged(); } }