Esempio n. 1
0
        protected override void InitEntity()
        {
            CtlPanel panEnt = new CtlPanel();

            panEnt.Active = false;
            panEnt.Dock   = DockStyle.Fill;
            contLstEnt.Panel2.Controls.Add(panEnt);

            captEntity         = new CtlCaptionPanel();
            captEntity.Active  = false;
            captEntity.Caption = "Данные аудита";
            captEntity.Dock    = DockStyle.Top;

            pdetails        = new CtlPanel();
            pdetails.Active = false;
            pdetails.Dock   = DockStyle.Fill;

            iidc = new ListController();
            iidc.Init(pdetails);

            iidc._ToolBar.Items.Clear();
            iidc._ToolBar.Visible = false;

            iidc.Grid.AddGridColumn(SysAuditDetailsColumns.FieldName, "Наименование", typeof(string)).AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells;
            iidc.Grid.AddGridColumn(SysAuditDetailsColumns.OldValue, "Старое значение", typeof(string), 200);
            iidc.Grid.AddGridColumn(SysAuditDetailsColumns.NewValue, "Новое значение", typeof(string), 200);

            panEnt.Controls.AddRange(new Control[] { pdetails, captEntity });
        }
Esempio n. 2
0
        public TreeListFormController(Form mdiForm, string name, string caption, Icon icon, bool TreePanel, bool EntityPanel, BaseLoadFilter loadfilter)
            : base(mdiForm, name, caption, icon, TreePanel, EntityPanel)
        {
            PaintPanels((TreePanel) ? 320 : 0, (EntityPanel) ? 140 : 0);
            //PaintPanels(TreePanel, EntityPanel);
            fltController.Init(FToolBar);
            FToolBar.Items[2].Enabled = FToolBar.Items[3].Enabled = FToolBar.Items[4].Enabled = false;

            gridMain.Init(PanelList);
            gridMain.EntityNew      += new DatEventDelegate(EntityNew);
            gridMain.EntitySelected += new DatEventDelegate(EntitySelected);
            gridMain.EntityChanged  += new DatEventDelegate(EntityChanged);

            //if (EntityPanel)
            //{
            PanelRTF             = new RichTextBox();
            PanelRTF.Dock        = DockStyle.Fill;
            PanelRTF.BackColor   = Color.LightCyan;
            PanelRTF.BorderStyle = BorderStyle.None;
            PanelRTF.ReadOnly    = true;
            PanelRTF.ScrollBars  = RichTextBoxScrollBars.Vertical;
            PanelEntity.Controls.Add(PanelRTF);

            PanelCaption        = new CtlCaptionPanel();
            PanelCaption.Active = false;
            PanelCaption.Dock   = DockStyle.Top;
            PanelEntity.Controls.Add(PanelCaption);
            //}

            TreeList.Init(SetTree, PanelTree, new CardTreeForm());
            TreeList.TreeChanged += new DatEventDelegate(TreeChanged);
            //TreeList.Reload();
            splitTL.Panel1Collapsed = false;

            gridMain.Grid.ValueEventDisabled = true;
            Show();
            gridMain.Grid.ValueEventDisabled = false;
            gridMain.Grid.FireValueChanged();
        }