Exemplo n.º 1
0
        private Bitmap GetPicture()
        {
            if (downHitInfo == null)
            {
                return(null);
            }
            LayoutViewCard layoutCard = downHitInfo.HitCard;

            if (layoutCard == null)
            {
                return(null);
            }
            Rectangle r = new Rectangle(0, 0, Width * 2, Height * 2);

            using (Bitmap bmp = new Bitmap(r.Width, r.Height, PixelFormat.Format32bppArgb))
            {
                using (Graphics imgGraphics = Graphics.FromImage(bmp))
                {
                    using (XtraBufferedGraphics bufferedGraphics = XtraBufferedGraphicsManager.Current.Allocate(imgGraphics, r))
                    {
                        ObjectPainter cardPainter = (layoutView1 as ILayoutControl).PaintStyle.GetPainter(layoutCard);
                        bufferedGraphics.Graphics.Clear(Color.White);
                        layoutCard.ViewInfo.Cache = new GraphicsCache(new DXPaintEventArgs(bufferedGraphics.Graphics, r));
                        PropertyInfo property = typeof(LayoutView).GetProperty("DrawCard", BindingFlags.Instance | BindingFlags.NonPublic);
                        property.SetValue(layoutView1, layoutCard, null);
                        cardPainter.DrawObject(layoutCard.ViewInfo);
                        layoutCard.ViewInfo.Cache = null;
                        bufferedGraphics.Render();
                    }
                    Bitmap newImage = Copy(bmp, layoutCard.Bounds);
                    return(newImage);
                }
            }
        }
Exemplo n.º 2
0
        private void layoutView_MouseMove(object sender, MouseEventArgs e)
        {
            LayoutView view = sender as LayoutView;

            LayoutViewHitInfo info = view.CalcHitInfo(new Point(e.X, e.Y));

            HoverCard = info.HitCard;
        }
Exemplo n.º 3
0
 private void layoutView_MouseLeave(object sender, EventArgs e)
 {
     HoverCard = null;
 }
Exemplo n.º 4
0
        private void InitializeComponent()
        {
            ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(FrmVideo));
            GridLevelNode            gridLevelNode            = new GridLevelNode();

            splitContainerControl1 = new SplitContainerControl();
            pbImage  = new PictureBox();
            gcImages = new GridControl();
            lvImages = new LayoutView();
            colImage = new LayoutViewColumn();
            repositoryItemPictureEdit1        = new RepositoryItemPictureEdit();
            layoutViewField_layoutViewColumn1 = new LayoutViewField();
            layoutViewCard1  = new LayoutViewCard();
            gridView1        = new GridView();
            btPlay           = new SimpleButton();
            btPause          = new SimpleButton();
            btStop           = new SimpleButton();
            btOpen           = new SimpleButton();
            btCancel         = new SimpleButton();
            btAccept         = new SimpleButton();
            trackBarControl1 = new TrackBarControl();
            labelControl1    = new LabelControl();
            btClear          = new SimpleButton();
            splitContainerControl1.BeginInit();
            splitContainerControl1.SuspendLayout();
            ((ISupportInitialize)pbImage).BeginInit();
            gcImages.BeginInit();
            lvImages.BeginInit();
            repositoryItemPictureEdit1.BeginInit();
            layoutViewField_layoutViewColumn1.BeginInit();
            layoutViewCard1.BeginInit();
            gridView1.BeginInit();
            ((ISupportInitialize)trackBarControl1).BeginInit();
            trackBarControl1.Properties.BeginInit();
            SuspendLayout();
            componentResourceManager.ApplyResources(splitContainerControl1, "splitContainerControl1");
            splitContainerControl1.Name = "splitContainerControl1";
            componentResourceManager.ApplyResources(splitContainerControl1.Panel1, "splitContainerControl1.Panel1");
            splitContainerControl1.Panel1.Controls.Add(pbImage);
            componentResourceManager.ApplyResources(splitContainerControl1.Panel2, "splitContainerControl1.Panel2");
            splitContainerControl1.Panel2.Controls.Add(gcImages);
            splitContainerControl1.SplitterPosition = 751;
            componentResourceManager.ApplyResources(pbImage, "pbImage");
            pbImage.Name    = "pbImage";
            pbImage.TabStop = false;
            componentResourceManager.ApplyResources(gcImages, "gcImages");
            gcImages.EmbeddedNavigator.AccessibleDescription  = componentResourceManager.GetString("gcImages.EmbeddedNavigator.AccessibleDescription");
            gcImages.EmbeddedNavigator.AccessibleName         = componentResourceManager.GetString("gcImages.EmbeddedNavigator.AccessibleName");
            gcImages.EmbeddedNavigator.AllowHtmlTextInToolTip = (DefaultBoolean)componentResourceManager.GetObject("gcImages.EmbeddedNavigator.AllowHtmlTextInToolTip");
            gcImages.EmbeddedNavigator.Anchor                = (AnchorStyles)componentResourceManager.GetObject("gcImages.EmbeddedNavigator.Anchor");
            gcImages.EmbeddedNavigator.BackgroundImage       = (Image)componentResourceManager.GetObject("gcImages.EmbeddedNavigator.BackgroundImage");
            gcImages.EmbeddedNavigator.BackgroundImageLayout = (ImageLayout)componentResourceManager.GetObject("gcImages.EmbeddedNavigator.BackgroundImageLayout");
            gcImages.EmbeddedNavigator.ImeMode               = (ImeMode)componentResourceManager.GetObject("gcImages.EmbeddedNavigator.ImeMode");
            gcImages.EmbeddedNavigator.MaximumSize           = (Size)componentResourceManager.GetObject("gcImages.EmbeddedNavigator.MaximumSize");
            gcImages.EmbeddedNavigator.TextLocation          = (NavigatorButtonsTextLocation)componentResourceManager.GetObject("gcImages.EmbeddedNavigator.TextLocation");
            gcImages.EmbeddedNavigator.ToolTip               = componentResourceManager.GetString("gcImages.EmbeddedNavigator.ToolTip");
            gcImages.EmbeddedNavigator.ToolTipIconType       = (ToolTipIconType)componentResourceManager.GetObject("gcImages.EmbeddedNavigator.ToolTipIconType");
            gcImages.EmbeddedNavigator.ToolTipTitle          = componentResourceManager.GetString("gcImages.EmbeddedNavigator.ToolTipTitle");
            gridLevelNode.RelationName = "Level1";
            gcImages.LevelTree.Nodes.AddRange(new GridLevelNode[1]
            {
                gridLevelNode
            });
            gcImages.MainView = lvImages;
            gcImages.Name     = "gcImages";
            gcImages.ViewCollection.AddRange(new BaseView[2]
            {
                lvImages,
                gridView1
            });
            componentResourceManager.ApplyResources(lvImages, "lvImages");
            lvImages.CardHorzInterval = 0;
            lvImages.CardMinSize      = new Size(150, 150);
            lvImages.CardVertInterval = 0;
            lvImages.Columns.AddRange(new LayoutViewColumn[1]
            {
                colImage
            });
            lvImages.GridControl = gcImages;
            lvImages.Name        = "lvImages";
            lvImages.OptionsBehavior.AllowAddRows           = DefaultBoolean.False;
            lvImages.OptionsBehavior.AllowDeleteRows        = DefaultBoolean.False;
            lvImages.OptionsBehavior.AllowExpandCollapse    = false;
            lvImages.OptionsBehavior.AutoPopulateColumns    = false;
            lvImages.OptionsBehavior.AutoSelectAllInEditor  = false;
            lvImages.OptionsCustomization.AllowFilter       = false;
            lvImages.OptionsCustomization.AllowSort         = false;
            lvImages.OptionsItemText.AlignMode              = FieldTextAlignMode.CustomSize;
            lvImages.OptionsItemText.TextToControlDistance  = 0;
            lvImages.OptionsLayout.Columns.AddNewColumns    = false;
            lvImages.OptionsLayout.Columns.RemoveOldColumns = false;
            lvImages.OptionsLayout.Columns.StoreLayout      = false;
            lvImages.OptionsLayout.StoreDataSettings        = false;
            lvImages.OptionsLayout.StoreVisualOptions       = false;
            lvImages.OptionsSelection.MultiSelect           = true;
            lvImages.OptionsView.AllowHotTrackFields        = false;
            lvImages.OptionsView.ShowButtonMode             = ShowButtonModeEnum.ShowAlways;
            lvImages.OptionsView.ShowCardExpandButton       = false;
            lvImages.OptionsView.ShowCardFieldBorders       = true;
            lvImages.OptionsView.ShowCardLines              = false;
            lvImages.OptionsView.ShowFieldHints             = false;
            lvImages.OptionsView.ShowFilterPanelMode        = ShowFilterPanelMode.Never;
            lvImages.OptionsView.ShowHeaderPanel            = false;
            lvImages.OptionsView.ViewMode             = LayoutViewMode.MultiColumn;
            lvImages.TemplateCard                     = layoutViewCard1;
            lvImages.CustomDrawCardCaption           += lvImages_CustomDrawCardCaption;
            colImage.AppearanceCell.Font              = (Font)componentResourceManager.GetObject("colImage.AppearanceCell.Font");
            colImage.AppearanceCell.FontSizeDelta     = (int)componentResourceManager.GetObject("colImage.AppearanceCell.FontSizeDelta");
            colImage.AppearanceCell.FontStyleDelta    = (FontStyle)componentResourceManager.GetObject("colImage.AppearanceCell.FontStyleDelta");
            colImage.AppearanceCell.GradientMode      = (LinearGradientMode)componentResourceManager.GetObject("colImage.AppearanceCell.GradientMode");
            colImage.AppearanceCell.Image             = (Image)componentResourceManager.GetObject("colImage.AppearanceCell.Image");
            colImage.AppearanceCell.Options.UseFont   = true;
            colImage.AppearanceHeader.Font            = (Font)componentResourceManager.GetObject("colImage.AppearanceHeader.Font");
            colImage.AppearanceHeader.FontSizeDelta   = (int)componentResourceManager.GetObject("colImage.AppearanceHeader.FontSizeDelta");
            colImage.AppearanceHeader.FontStyleDelta  = (FontStyle)componentResourceManager.GetObject("colImage.AppearanceHeader.FontStyleDelta");
            colImage.AppearanceHeader.GradientMode    = (LinearGradientMode)componentResourceManager.GetObject("colImage.AppearanceHeader.GradientMode");
            colImage.AppearanceHeader.Image           = (Image)componentResourceManager.GetObject("colImage.AppearanceHeader.Image");
            colImage.AppearanceHeader.Options.UseFont = true;
            componentResourceManager.ApplyResources(colImage, "colImage");
            colImage.ColumnEdit                  = repositoryItemPictureEdit1;
            colImage.FieldName                   = "Image";
            colImage.LayoutViewField             = layoutViewField_layoutViewColumn1;
            colImage.Name                        = "colImage";
            colImage.OptionsColumn.AllowEdit     = false;
            colImage.OptionsColumn.AllowMove     = false;
            colImage.OptionsColumn.AllowShowHide = false;
            colImage.OptionsColumn.AllowSize     = false;
            colImage.OptionsColumn.ReadOnly      = true;
            componentResourceManager.ApplyResources(repositoryItemPictureEdit1, "repositoryItemPictureEdit1");
            repositoryItemPictureEdit1.Name     = "repositoryItemPictureEdit1";
            repositoryItemPictureEdit1.SizeMode = PictureSizeMode.Zoom;
            layoutViewField_layoutViewColumn1.EditorPreferredWidth = 122;
            layoutViewField_layoutViewColumn1.Location             = new Point(0, 0);
            layoutViewField_layoutViewColumn1.Name     = "layoutViewField_layoutViewColumn1";
            layoutViewField_layoutViewColumn1.Padding  = new Padding(0, 0, 0, 0);
            layoutViewField_layoutViewColumn1.Size     = new Size(129, 22);
            layoutViewField_layoutViewColumn1.TextSize = new Size(7, 13);
            componentResourceManager.ApplyResources(layoutViewCard1, "layoutViewCard1");
            layoutViewCard1.ExpandButtonLocation = GroupElementLocation.AfterText;
            layoutViewCard1.Items.AddRange(new BaseLayoutItem[1]
            {
                layoutViewField_layoutViewColumn1
            });
            layoutViewCard1.Name = "layoutViewTemplateCard";
            layoutViewCard1.OptionsItemText.TextToControlDistance = 0;
            layoutViewCard1.Padding = new Padding(0, 0, 0, 0);
            componentResourceManager.ApplyResources(gridView1, "gridView1");
            gridView1.GridControl = gcImages;
            gridView1.Name        = "gridView1";
            componentResourceManager.ApplyResources(btPlay, "btPlay");
            btPlay.Appearance.Font            = (Font)componentResourceManager.GetObject("btPlay.Appearance.Font");
            btPlay.Appearance.FontSizeDelta   = (int)componentResourceManager.GetObject("btPlay.Appearance.FontSizeDelta");
            btPlay.Appearance.FontStyleDelta  = (FontStyle)componentResourceManager.GetObject("btPlay.Appearance.FontStyleDelta");
            btPlay.Appearance.GradientMode    = (LinearGradientMode)componentResourceManager.GetObject("btPlay.Appearance.GradientMode");
            btPlay.Appearance.Image           = (Image)componentResourceManager.GetObject("btPlay.Appearance.Image");
            btPlay.Appearance.Options.UseFont = true;
            btPlay.Image  = Resources.play36;
            btPlay.Name   = "btPlay";
            btPlay.Click += btPlay_Click;
            componentResourceManager.ApplyResources(btPause, "btPause");
            btPause.Appearance.Font            = (Font)componentResourceManager.GetObject("btPause.Appearance.Font");
            btPause.Appearance.FontSizeDelta   = (int)componentResourceManager.GetObject("btPause.Appearance.FontSizeDelta");
            btPause.Appearance.FontStyleDelta  = (FontStyle)componentResourceManager.GetObject("btPause.Appearance.FontStyleDelta");
            btPause.Appearance.GradientMode    = (LinearGradientMode)componentResourceManager.GetObject("btPause.Appearance.GradientMode");
            btPause.Appearance.Image           = (Image)componentResourceManager.GetObject("btPause.Appearance.Image");
            btPause.Appearance.Options.UseFont = true;
            btPause.Image  = Resources.pause36;
            btPause.Name   = "btPause";
            btPause.Click += btPause_Click;
            componentResourceManager.ApplyResources(btStop, "btStop");
            btStop.Appearance.Font            = (Font)componentResourceManager.GetObject("btStop.Appearance.Font");
            btStop.Appearance.FontSizeDelta   = (int)componentResourceManager.GetObject("btStop.Appearance.FontSizeDelta");
            btStop.Appearance.FontStyleDelta  = (FontStyle)componentResourceManager.GetObject("btStop.Appearance.FontStyleDelta");
            btStop.Appearance.GradientMode    = (LinearGradientMode)componentResourceManager.GetObject("btStop.Appearance.GradientMode");
            btStop.Appearance.Image           = (Image)componentResourceManager.GetObject("btStop.Appearance.Image");
            btStop.Appearance.Options.UseFont = true;
            btStop.Image  = Resources.stop36;
            btStop.Name   = "btStop";
            btStop.Click += btStop_Click;
            componentResourceManager.ApplyResources(btOpen, "btOpen");
            btOpen.Appearance.Font            = (Font)componentResourceManager.GetObject("btOpen.Appearance.Font");
            btOpen.Appearance.FontSizeDelta   = (int)componentResourceManager.GetObject("btOpen.Appearance.FontSizeDelta");
            btOpen.Appearance.FontStyleDelta  = (FontStyle)componentResourceManager.GetObject("btOpen.Appearance.FontStyleDelta");
            btOpen.Appearance.GradientMode    = (LinearGradientMode)componentResourceManager.GetObject("btOpen.Appearance.GradientMode");
            btOpen.Appearance.Image           = (Image)componentResourceManager.GetObject("btOpen.Appearance.Image");
            btOpen.Appearance.Options.UseFont = true;
            btOpen.Image  = Resources.Open3;
            btOpen.Name   = "btOpen";
            btOpen.Click += btOpen_Click;
            componentResourceManager.ApplyResources(btCancel, "btCancel");
            btCancel.Appearance.Font            = (Font)componentResourceManager.GetObject("btCancel.Appearance.Font");
            btCancel.Appearance.FontSizeDelta   = (int)componentResourceManager.GetObject("btCancel.Appearance.FontSizeDelta");
            btCancel.Appearance.FontStyleDelta  = (FontStyle)componentResourceManager.GetObject("btCancel.Appearance.FontStyleDelta");
            btCancel.Appearance.GradientMode    = (LinearGradientMode)componentResourceManager.GetObject("btCancel.Appearance.GradientMode");
            btCancel.Appearance.Image           = (Image)componentResourceManager.GetObject("btCancel.Appearance.Image");
            btCancel.Appearance.Options.UseFont = true;
            btCancel.DialogResult = DialogResult.Cancel;
            btCancel.Name         = "btCancel";
            btCancel.Click       += btCancel_Click;
            componentResourceManager.ApplyResources(btAccept, "btAccept");
            btAccept.Appearance.Font            = (Font)componentResourceManager.GetObject("btAccept.Appearance.Font");
            btAccept.Appearance.FontSizeDelta   = (int)componentResourceManager.GetObject("btAccept.Appearance.FontSizeDelta");
            btAccept.Appearance.FontStyleDelta  = (FontStyle)componentResourceManager.GetObject("btAccept.Appearance.FontStyleDelta");
            btAccept.Appearance.GradientMode    = (LinearGradientMode)componentResourceManager.GetObject("btAccept.Appearance.GradientMode");
            btAccept.Appearance.Image           = (Image)componentResourceManager.GetObject("btAccept.Appearance.Image");
            btAccept.Appearance.Options.UseFont = true;
            btAccept.Name   = "btAccept";
            btAccept.Click += btAccept_Click;
            componentResourceManager.ApplyResources(trackBarControl1, "trackBarControl1");
            trackBarControl1.Name = "trackBarControl1";
            trackBarControl1.Properties.AccessibleDescription = componentResourceManager.GetString("trackBarControl1.Properties.AccessibleDescription");
            trackBarControl1.Properties.AccessibleName        = componentResourceManager.GetString("trackBarControl1.Properties.AccessibleName");
            trackBarControl1.Properties.Orientation           = (Orientation)componentResourceManager.GetObject("trackBarControl1.Properties.Orientation");
            trackBarControl1.EditValueChanged += trackBarControl1_EditValueChanged;
            componentResourceManager.ApplyResources(labelControl1, "labelControl1");
            labelControl1.Name = "labelControl1";
            componentResourceManager.ApplyResources(btClear, "btClear");
            btClear.Appearance.Font            = (Font)componentResourceManager.GetObject("btClear.Appearance.Font");
            btClear.Appearance.FontSizeDelta   = (int)componentResourceManager.GetObject("btClear.Appearance.FontSizeDelta");
            btClear.Appearance.FontStyleDelta  = (FontStyle)componentResourceManager.GetObject("btClear.Appearance.FontStyleDelta");
            btClear.Appearance.GradientMode    = (LinearGradientMode)componentResourceManager.GetObject("btClear.Appearance.GradientMode");
            btClear.Appearance.Image           = (Image)componentResourceManager.GetObject("btClear.Appearance.Image");
            btClear.Appearance.Options.UseFont = true;
            btClear.Name   = "btClear";
            btClear.Click += btClear_Click;
            componentResourceManager.ApplyResources(this, "$this");
            AutoScaleMode = AutoScaleMode.Font;
            Controls.Add(btClear);
            Controls.Add(labelControl1);
            Controls.Add(trackBarControl1);
            Controls.Add(splitContainerControl1);
            Controls.Add(btCancel);
            Controls.Add(btAccept);
            Controls.Add(btOpen);
            Controls.Add(btStop);
            Controls.Add(btPause);
            Controls.Add(btPlay);
            FormBorderStyle = FormBorderStyle.FixedSingle;
            MaximizeBox     = false;
            MinimizeBox     = false;
            Name            = "FrmVideo";
            FormClosing    += frmVideo_FormClosing;
            Load           += frmVideo_Load;
            splitContainerControl1.EndInit();
            splitContainerControl1.ResumeLayout(false);
            ((ISupportInitialize)pbImage).EndInit();
            gcImages.EndInit();
            lvImages.EndInit();
            repositoryItemPictureEdit1.EndInit();
            layoutViewField_layoutViewColumn1.EndInit();
            layoutViewCard1.EndInit();
            gridView1.EndInit();
            trackBarControl1.Properties.EndInit();
            ((ISupportInitialize)trackBarControl1).EndInit();
            ResumeLayout(false);
            PerformLayout();
        }
Exemplo n.º 5
0
        protected override object CreateControlsCore()
        {
            LayoutViewColumn          imageColumn;
            RepositoryItemTextEdit    repositoryItemImageName;
            LayoutViewField           layoutViewField_Image;
            LayoutViewColumn          imageNameColumn;
            RepositoryItemPictureEdit repositoryItemImage;
            LayoutViewField           layoutViewField_ImageName;
            LayoutViewCard            layoutViewTemplateCard;

            control    = new GridControl();
            layoutView = new LayoutView();

            imageColumn               = new LayoutViewColumn();
            repositoryItemImage       = new RepositoryItemPictureEdit();
            layoutViewField_Image     = new LayoutViewField();
            imageNameColumn           = new LayoutViewColumn();
            repositoryItemImageName   = new RepositoryItemTextEdit();
            layoutViewField_ImageName = new LayoutViewField();
            layoutViewTemplateCard    = new LayoutViewCard();

            control.Cursor   = Cursors.Default;
            control.MainView = layoutView;
            control.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
                repositoryItemImage,
                repositoryItemImageName
            });
            control.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { layoutView });

            layoutView.Appearance.FieldValue.Options.UseTextOptions = true;
            layoutView.Appearance.FieldValue.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
            layoutView.Appearance.FieldValue.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center;
            layoutView.CardMinSize  = new System.Drawing.Size(50, 70);
            layoutView.DetailHeight = 53;
            layoutView.Columns.AddRange(new DevExpress.XtraGrid.Columns.LayoutViewColumn[] {
                imageColumn,
                imageNameColumn
            });
            layoutView.GridControl = control;
            layoutView.Name        = "layoutView";
            layoutView.OptionsBehavior.AllowExpandCollapse            = false;
            layoutView.OptionsBehavior.AllowPanCards                  = false;
            layoutView.OptionsBehavior.Editable                       = false;
            layoutView.OptionsCustomization.AllowFilter               = false;
            layoutView.OptionsCustomization.AllowSort                 = false;
            layoutView.OptionsHeaderPanel.EnableCarouselModeButton    = false;
            layoutView.OptionsHeaderPanel.EnableColumnModeButton      = false;
            layoutView.OptionsHeaderPanel.EnableMultiColumnModeButton = false;
            layoutView.OptionsHeaderPanel.EnableMultiRowModeButton    = false;
            layoutView.OptionsHeaderPanel.EnablePanButton             = false;
            layoutView.OptionsHeaderPanel.EnableRowModeButton         = false;
            layoutView.OptionsHeaderPanel.EnableSingleModeButton      = false;
            layoutView.OptionsView.AllowHotTrackFields                = false;
            layoutView.OptionsView.CardsAlignment                     = DevExpress.XtraGrid.Views.Layout.CardsAlignment.Near;
            layoutView.OptionsView.ShowCardBorderIfCaptionHidden      = false;
            layoutView.OptionsView.ShowCardCaption                    = false;
            layoutView.OptionsView.ShowCardLines                      = false;
            layoutView.OptionsView.ShowFilterPanelMode                = DevExpress.XtraGrid.Views.Base.ShowFilterPanelMode.Never;
            layoutView.OptionsView.ShowHeaderPanel                    = false;
            layoutView.OptionsView.ViewMode = DevExpress.XtraGrid.Views.Layout.LayoutViewMode.MultiColumn;
            layoutView.TemplateCard         = layoutViewTemplateCard;

            //
            // imageColumn
            //
            imageColumn.Caption              = "OriginalImage";
            imageColumn.ColumnEdit           = repositoryItemImage;
            imageColumn.CustomizationCaption = "OriginalImage";
            imageColumn.FieldName            = "OriginalImage";
            imageColumn.LayoutViewField      = layoutViewField_Image;
            imageColumn.Name = "OriginalImage";
            //
            // repositoryItemImage
            //
            repositoryItemImage.Name             = "repositoryItemImage";
            repositoryItemImage.SizeMode         = DevExpress.XtraEditors.Controls.PictureSizeMode.Clip;
            repositoryItemImage.PictureAlignment = ContentAlignment.MiddleCenter;
            //
            // layoutViewField_Image
            //
            layoutViewField_Image.EditorPreferredWidth = 32;
            layoutViewField_Image.Location             = new System.Drawing.Point(0, 0);
            layoutViewField_Image.Name                  = "layoutViewField_Image";
            layoutViewField_Image.Padding               = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0);
            layoutViewField_Image.Size                  = new System.Drawing.Size(32, 32);
            layoutViewField_Image.TextLocation          = DevExpress.Utils.Locations.Bottom;
            layoutViewField_Image.TextSize              = new System.Drawing.Size(0, 0);
            layoutViewField_Image.TextToControlDistance = 0;
            layoutViewField_Image.TextVisible           = false;
            layoutViewField_Image.MinSize               = layoutViewField_Image.MaxSize = new Size(32, 32);
            layoutViewField_Image.SizeConstraintsType   = DevExpress.XtraLayout.SizeConstraintsType.Custom;
            //
            // imageNameColumn
            //
            imageNameColumn.Caption              = "ImageName";
            imageNameColumn.ColumnEdit           = repositoryItemImageName;
            imageNameColumn.CustomizationCaption = "ImageName";
            imageNameColumn.FieldName            = "ImageName";
            imageNameColumn.LayoutViewField      = layoutViewField_ImageName;
            imageNameColumn.Name      = "ImageName";
            imageNameColumn.SortIndex = 0;
            imageNameColumn.SortOrder = DevExpress.Data.ColumnSortOrder.Ascending;
            //
            // repositoryItemImageName
            //
            repositoryItemImageName.AutoHeight = false;
            repositoryItemImageName.Name       = "repositoryItemImageName";
            //
            // layoutViewField_ImageName
            //
            layoutViewField_ImageName.EditorPreferredWidth = 32;
            layoutViewField_ImageName.Location             = new System.Drawing.Point(0, 32);
            layoutViewField_ImageName.Name                  = "layoutViewField_ImageName";
            layoutViewField_ImageName.Padding               = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0);
            layoutViewField_ImageName.Size                  = new System.Drawing.Size(32, 17);
            layoutViewField_ImageName.TextLocation          = DevExpress.Utils.Locations.Bottom;
            layoutViewField_ImageName.TextSize              = new System.Drawing.Size(0, 0);
            layoutViewField_ImageName.TextToControlDistance = 0;
            layoutViewField_ImageName.TextVisible           = false;
            //
            // layoutViewTemplateCard
            //
            layoutViewTemplateCard.CustomizationFormText = "layoutViewTemplateCard";
            layoutViewTemplateCard.HeaderButtonsLocation = DevExpress.Utils.GroupElementLocation.AfterText;
            layoutViewTemplateCard.GroupBordersVisible   = false;
            layoutViewTemplateCard.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
                layoutViewField_Image,
                layoutViewField_ImageName
            });
            layoutViewTemplateCard.Name = "layoutViewTemplateCard";
            layoutViewTemplateCard.Text = "layoutViewTemplateCard";

            layoutView.FocusedRowChanged += new DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventHandler(layoutView_FocusedRowChanged);
            control.MouseDoubleClick     += new MouseEventHandler(control_MouseDoubleClick);
            control.KeyDown += new System.Windows.Forms.KeyEventHandler(control_KeyDown);

            Refresh();
            return(control);
        }