Example #1
0
        private void SetAppsGridView()
        {
            GridViewDef view = new GridViewDef(GridViewDef.DefaultViewName);

            view.GridColsView = new ObservableList <GridColView>();
            view.GridColsView.Add(new GridColView()
            {
                Field = nameof(ApplicationPlatform.AppName), Header = "Application", WidthWeight = 60
            });

            view.GridColsView.Add(new GridColView()
            {
                Field = nameof(ApplicationPlatform.Core), WidthWeight = 60
            });
            view.GridColsView.Add(new GridColView()
            {
                Field = nameof(ApplicationPlatform.CoreVersion), WidthWeight = 20
            });


            List <string> platformesTypesList = GingerCore.General.GetEnumValues(typeof(ePlatformType));

            view.GridColsView.Add(new GridColView()
            {
                Field = nameof(ApplicationPlatform.Platform), WidthWeight = 40, StyleType = GridColView.eGridColStyleType.ComboBox, CellValuesList = platformesTypesList
            });

            ApplicationGrid.SetAllColumnsDefaultView(view);
            ApplicationGrid.InitViewItems();
        }
Example #2
0
        private void SetActionsGridView(ucGrid actionsGrid)
        {
            GridViewDef view = new GridViewDef(GridViewDef.DefaultViewName);

            view.GridColsView = new ObservableList <GridColView>();
            view.GridColsView.Add(new GridColView()
            {
                Field = Act.Fields.Description, Header = "Action Type", AllowSorting = true, WidthWeight = 4
            });

            if (actionsGrid == PlugInsActionsGrid)
            {
                view.GridColsView.Add(new GridColView()
                {
                    Field = nameof(ActPlugIn.PluginId), Header = "Plugin ID", WidthWeight = 6, ReadOnly = true, BindingMode = BindingMode.OneWay
                });
                view.GridColsView.Add(new GridColView()
                {
                    Field = nameof(ActPlugIn.ServiceId), Header = "Service ID", WidthWeight = 6, ReadOnly = true, BindingMode = BindingMode.OneWay
                });
            }
            else
            {
                view.GridColsView.Add(new GridColView()
                {
                    Field = Act.Fields.SupportedPlatforms, Header = "Supported Platforms", WidthWeight = 6, ReadOnly = true
                });
            }
            actionsGrid.SetAllColumnsDefaultView(view);
            actionsGrid.InitViewItems();
            actionsGrid.grdMain.SelectionMode = DataGridSelectionMode.Single;

            actionsGrid.RowDoubleClick += ActionsGrid_MouseDoubleClick;
        }