Esempio n. 1
0
 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(ViewImageNameHelper.GetImageName(view));
         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();
         ViewSite.Controls.Add((Control)view.Control);
         ViewCaptionLabel.Text = view.Caption;
         ImageInfo imageInfo = ImageLoader.Instance.GetImageInfo(ViewImageNameHelper.GetImageName(view));
         if (imageInfo.IsEmpty)
         {
             ViewImage.Visible = false;
             ViewImage.ImageUrl = null;
         }
         else
         {
             ViewImage.ImageUrl = imageInfo.ImageUrl;
         }
     }
 }
 public void SetView(DevExpress.ExpressApp.View view)
 {
     this.ViewSite.Controls.Clear();
     if (view != null)
     {
         view.CreateControls();
         if (ViewControlAdding != null)
         {
             ViewControlAdding(this, EventArgs.Empty);
         }
         ViewSite.Controls.Add((Control)view.Control);
         ViewCaption.Text = view.Caption;
         Header.Title = 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)
    {
        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 color = (KnownColor)Enum.Parse(typeof(KnownColor), colorString);
                    //ViewTitle.BackColor = Color.FromKnownColor(color);
                }
                catch (Exception) { }
            }
        }
    }
 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();
     }
 }
 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) { }
         //}
     }
 }