예제 #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;
         }
     }
 }
예제 #2
0
    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(ViewImageNameHelper.GetImageName(view));
            if (imageInfo.IsEmpty)
            {
                ViewImage.Visible = false;
            }
            else
            {
                ViewImage.ImageUrl = imageInfo.ImageUrl;
            }
        }
    }
예제 #3
0
 private void layoutView_CustomCardCaptionImage(object sender, DevExpress.XtraGrid.Views.Layout.Events.LayoutViewCardCaptionImageEventArgs e)
 {
     e.CaptionImageLocation = GroupElementLocation.BeforeText;
     e.Image = ImageLoader.Instance.GetImageInfo(ViewImageNameHelper.GetImageName(Model)).Image;
 }