Esempio n. 1
0
 private void VerifyParameters(DataViewParams aParams)
 {
     if (aParams.container == null || aParams.dataProvider == null)
     {
         throw new Exception("Mising parameters, can not build data view tree");
     }
 }
Esempio n. 2
0
        public void Create(DataViewParams aParams)
        {
            VerifyParameters(aParams);
            fParams = aParams;
            fParams.dataProvider.AddView(this);
            CreateVisualItemTree();
            fDescriptionPanel = fParams.descriptionContainer;

            if (fDescriptionPanel != null)
            {
                fDescriptionPanel.Reset();
                fDescriptionPanel.StartUpdate();
                TextBox t = new TextBox();
                t.Multiline         = true;
                t.Dock              = DockStyle.Fill;
                t.ReadOnly          = true;
                t.BorderStyle       = BorderStyle.FixedSingle;
                t.Font              = new Font("Lucida fax", 10);
                fDescriptionTextBox = t;
                fDescriptionPanel.Controls.Add(t);
                fDescriptionPanel.EndUpdate();
            }

            if (fPreviewForm == null)
            {
                fPreviewForm = new PreviewForm();
                fPreviewForm.PreviewTimer.Tick += PreviewTimer_Tick;
            }
            ReCreateTree();
        }