Esempio n. 1
0
        public VirtualPivot(IContainer container)
        {
            DevXLocalizer.Init();
            m_Container        = container;
            m_PivotPlaceHolder = new VirtualPivotPlaceHolder();

            using (PresenterFactory.BeginSharedPresenterTransaction(m_Container, m_PivotPlaceHolder))
            {
                m_SharedPresenter = PresenterFactory.SharedPresenter;
                m_DBService       = new WinLayout_DB(m_SharedPresenter.SharedModel);
                m_AvrPivot        = new AvrPivotGrid();
                m_PivotPlaceHolder.Controls.Add(m_AvrPivot);
            }
        }
Esempio n. 2
0
 public void Dispose()
 {
     if (m_AvrPivot != null)
     {
         AvrPivotGridData oldDataSource = m_AvrPivot.DataSource;
         if (oldDataSource != null)
         {
             m_AvrPivot.DataSource = null;
             oldDataSource.Dispose();
         }
         if (m_SharedPresenter != null)
         {
             m_SharedPresenter.UnregisterView(m_AvrPivot);
             m_SharedPresenter.Dispose();
         }
         m_AvrPivot = null;
     }
     if (m_PivotPlaceHolder != null)
     {
         m_PivotPlaceHolder.Dispose();
         m_PivotPlaceHolder = null;
     }
 }