Inheritance: GridPanel
コード例 #1
0
ファイル: MainPanel.cs プロジェクト: danygolden/gianfratti
        private void BuildGrid()
        {
            this.grid = new FeedGrid
            {
                Region = Ext.Net.Region.Center,
                Border = false,
                TopBar =
                {
                    new Toolbar
                    {
                        Items =
                        {
                            new Button
                            {
                                Text = "Abrir Todas",
                                QTipCfg =
                                {
                                    Title = "Abrir Todas",
                                    Text = "Abrir todos os itens em tabs"
                                },
                                IconCls = "tabs",
                                Scope = MainPanel.SCOPE,
                                Handler = MainPanel.SCOPE + ".openAll"
                            },
                            new ToolbarSeparator(),
                            new SplitButton
                            {
                                ID = "PreviewPlaceButton",
                                Text = "Painel de Leitura",
                                QTipCfg =
                                    {
                                        Title = "Painel de Leitura",
                                        Text = "Mostrar, Esconder ou Mover o Painel de Leitura"
                                    },
                                IconCls = "preview-bottom",
                                Scope = MainPanel.SCOPE,
                                Handler = MainPanel.SCOPE + ".cyclePreview",
                                Menu =
                                {
                                    new Menu
                                    {
                                        ID = "ReadingMenu",
                                        Cls = "reading-menu",
                                        Width = 100,
                                        Items =
                                        {
                                            new CheckMenuItem
                                            {
                                                Text = "Inferior",
                                                Checked = true,
                                                Group = "rp-group",
                                                IconCls = "preview-bottom",
                                                Scope = MainPanel.SCOPE,
                                                CheckHandler = MainPanel.SCOPE + ".movePreview"
                                            },
                                            new CheckMenuItem
                                            {
                                                Text = "Direita",
                                                Checked = false,
                                                Group = "rp-group",
                                                IconCls = "preview-right",
                                                Scope = MainPanel.SCOPE,
                                                CheckHandler = MainPanel.SCOPE + ".movePreview"
                                            },
                                            new CheckMenuItem
                                            {
                                                Text = "Desativado",
                                                Checked = false,
                                                Group = "rp-group",
                                                IconCls = "preview-hide",
                                                Scope = MainPanel.SCOPE,
                                                CheckHandler = MainPanel.SCOPE + ".movePreview"
                                            }
                                        }
                                    }
                                }
                            },
                            new ToolbarSeparator(),
                            new Button
                            {
                                Pressed = true,
                                EnableToggle = true,
                                Text = "Sumario",
                                QTipCfg =
                                {
                                    Title = "Post Sumario",
                                    Text = "Veja um breve resumo de cada item da lista"
                                },
                                IconCls = "summary"
                            }
                        }
                    }
                }
            };

            ComponentDirectEvent toggle = ((Button)this.grid.TopBar[0].Items[4]).DirectEvents.Toggle;
            toggle.Event += ShowPreview_Toggle;
            toggle.ExtraParams.Add(new Parameter("pressed", "pressed", ParameterMode.Raw));

            var sm = this.grid.SelectionModel[0] as RowSelectionModel;
            sm.Listeners.RowSelect.Scope = MainPanel.SCOPE;
            sm.Listeners.RowSelect.Fn = MainPanel.SCOPE + ".onRowSelect";
            sm.Listeners.RowSelect.Buffer = 250;

            this.grid.Store.Listeners.BeforeLoad.Fn = MainPanel.SCOPE + ".clear";
            this.grid.Store.Listeners.BeforeLoad.Scope = MainPanel.SCOPE;

            this.grid.Store.Listeners.Load.Fn = MainPanel.SCOPE + ".onStoreLoad";
            this.grid.Store.Listeners.Load.Scope = MainPanel.SCOPE;

            this.grid.Listeners.RowDblClick.Fn = MainPanel.SCOPE + ".openTab";
            this.grid.Listeners.RowDblClick.Scope = MainPanel.SCOPE;
        }
コード例 #2
0
ファイル: MainPanel.cs プロジェクト: pgodwin/Ext.net
        private void BuildGrid()
        {
            this.grid = new FeedGrid
            {
                Region = Ext.Net.Region.Center,
                Border = false,
                TopBar =
                {
                    new Toolbar
                    {
                        Items =
                        {
                            new Button
                            {
                                Text = "Open All",
                                QTipCfg =
                                {
                                    Title = "Open All", 
                                    Text = "Opens all item in tabs"
                                },
                                IconCls = "tabs",
                                Scope = MainPanel.SCOPE,
                                Handler = MainPanel.SCOPE + ".openAll"
                            },
                            new ToolbarSeparator(),
                            new SplitButton
                            {
                                ID = "PreviewPlaceButton",
                                Text = "Reading Pane",
                                QTipCfg =
                                    {
                                        Title = "Reading Pane",
                                        Text = "Show, move or hide the Reading Pane"
                                    },
                                IconCls = "preview-bottom",
                                Scope = MainPanel.SCOPE,
                                Handler = MainPanel.SCOPE + ".cyclePreview",
                                Menu =
                                {
                                    new Menu
                                    {
                                        ID = "ReadingMenu",
                                        Cls = "reading-menu",
                                        Width = 100,
                                        Items =
                                        {
                                            new CheckMenuItem
                                            {
                                                Text = "Bottom",
                                                Checked = true,
                                                Group = "rp-group",
                                                IconCls = "preview-bottom",
                                                Scope = MainPanel.SCOPE,
                                                CheckHandler = MainPanel.SCOPE + ".movePreview"
                                            },
                                            new CheckMenuItem
                                            {
                                                Text = "Right",
                                                Checked = false,
                                                Group = "rp-group",
                                                IconCls = "preview-right",
                                                Scope = MainPanel.SCOPE,
                                                CheckHandler = MainPanel.SCOPE + ".movePreview"
                                            },
                                            new CheckMenuItem
                                            {
                                                Text = "Hide",
                                                Checked = false,
                                                Group = "rp-group",
                                                IconCls = "preview-hide",
                                                Scope = MainPanel.SCOPE,
                                                CheckHandler = MainPanel.SCOPE + ".movePreview"
                                            }
                                        }
                                    }
                                }
                            },
                            new ToolbarSeparator(),
                            new Button
                            {
                                Pressed = true,
                                EnableToggle = true,
                                Text = "Summary",
                                QTipCfg =
                                {
                                    Title = "Post Summary",
                                    Text = "View a short summary of each item in the list"
                                },
                                IconCls = "summary"
                            }
                        }
                    }
                }
            };

            ComponentDirectEvent toggle = ((Button)this.grid.TopBar[0].Items[4]).DirectEvents.Toggle;
            toggle.Event += ShowPreview_Toggle;
            toggle.ExtraParams.Add(new Parameter("pressed", "pressed", ParameterMode.Raw));

            var sm = this.grid.SelectionModel[0] as RowSelectionModel;
            sm.Listeners.RowSelect.Scope = MainPanel.SCOPE;
            sm.Listeners.RowSelect.Fn = MainPanel.SCOPE + ".onRowSelect";
            sm.Listeners.RowSelect.Buffer = 250;

            this.grid.Store.Primary.Listeners.BeforeLoad.Fn = MainPanel.SCOPE + ".clear";
            this.grid.Store.Primary.Listeners.BeforeLoad.Scope = MainPanel.SCOPE;

            this.grid.Store.Primary.Listeners.Load.Fn = MainPanel.SCOPE + ".onStoreLoad";
            this.grid.Store.Primary.Listeners.Load.Scope = MainPanel.SCOPE;

            this.grid.Listeners.RowDblClick.Fn = MainPanel.SCOPE + ".openTab";
            this.grid.Listeners.RowDblClick.Scope = MainPanel.SCOPE;
        }