Пример #1
0
    public SessionExport(SimsangMain pACMain)
    {
      InitializeComponent();

      #region Datagrid header

      DataGridViewTextBoxColumn mNameCol = new DataGridViewTextBoxColumn();
      mNameCol.DataPropertyName = "Name";
      mNameCol.HeaderText = "Name";
      mNameCol.Name = "Name";
      mNameCol.ReadOnly = true;
      mNameCol.Width = 230;
      DGV_Sessions.Columns.Add(mNameCol);


      DataGridViewTextBoxColumn mDescrCol = new DataGridViewTextBoxColumn();
      mDescrCol.DataPropertyName = "Description";
      mDescrCol.HeaderText = "Description";
      mDescrCol.Name = "Description";
      mDescrCol.ReadOnly = true;
      mDescrCol.Visible = false;
      mDescrCol.Width = 125;
      DGV_Sessions.Columns.Add(mDescrCol);

      DataGridViewTextBoxColumn mStartCol = new DataGridViewTextBoxColumn();
      mStartCol.DataPropertyName = "Start";
      mStartCol.HeaderText = "Start";
      mStartCol.Name = "Start";
      mStartCol.ReadOnly = true;
      mStartCol.Width = 135;
      DGV_Sessions.Columns.Add(mStartCol);

      DataGridViewTextBoxColumn mStopCol = new DataGridViewTextBoxColumn();
      mStopCol.DataPropertyName = "Stop";
      mStopCol.HeaderText = "Stop";
      mStopCol.Name = "Stop";
      mStopCol.ReadOnly = true;
      mStopCol.Width = 135;
      DGV_Sessions.Columns.Add(mStopCol);

      DataGridViewTextBoxColumn mFileNameCol = new DataGridViewTextBoxColumn();
      mFileNameCol.DataPropertyName = "File";
      mFileNameCol.HeaderText = "File";
      mFileNameCol.Name = "File";
      mFileNameCol.ReadOnly = true;
      mFileNameCol.Visible = false;
      mFileNameCol.Width = 0;
      DGV_Sessions.Columns.Add(mFileNameCol);

      #endregion

      cSimsangMain = pACMain;

      cTaskFacade = Simsang.Session.TaskFacade.getInstance();
      mSessionRecord = new BindingList<SessionRecord>();
      LoadSessionData();
      DGV_Sessions.DataSource = mSessionRecord;

    }
Пример #2
0
        public SessionExport(SimsangMain pACMain)
        {
            InitializeComponent();

            #region Datagrid header

            DataGridViewTextBoxColumn mNameCol = new DataGridViewTextBoxColumn();
            mNameCol.DataPropertyName = "Name";
            mNameCol.HeaderText       = "Name";
            mNameCol.Name             = "Name";
            mNameCol.ReadOnly         = true;
            mNameCol.Width            = 230;
            DGV_Sessions.Columns.Add(mNameCol);


            DataGridViewTextBoxColumn mDescrCol = new DataGridViewTextBoxColumn();
            mDescrCol.DataPropertyName = "Description";
            mDescrCol.HeaderText       = "Description";
            mDescrCol.Name             = "Description";
            mDescrCol.ReadOnly         = true;
            mDescrCol.Visible          = false;
            mDescrCol.Width            = 125;
            DGV_Sessions.Columns.Add(mDescrCol);

            DataGridViewTextBoxColumn mStartCol = new DataGridViewTextBoxColumn();
            mStartCol.DataPropertyName = "Start";
            mStartCol.HeaderText       = "Start";
            mStartCol.Name             = "Start";
            mStartCol.ReadOnly         = true;
            mStartCol.Width            = 135;
            DGV_Sessions.Columns.Add(mStartCol);

            DataGridViewTextBoxColumn mStopCol = new DataGridViewTextBoxColumn();
            mStopCol.DataPropertyName = "Stop";
            mStopCol.HeaderText       = "Stop";
            mStopCol.Name             = "Stop";
            mStopCol.ReadOnly         = true;
            mStopCol.Width            = 135;
            DGV_Sessions.Columns.Add(mStopCol);

            DataGridViewTextBoxColumn mFileNameCol = new DataGridViewTextBoxColumn();
            mFileNameCol.DataPropertyName = "File";
            mFileNameCol.HeaderText       = "File";
            mFileNameCol.Name             = "File";
            mFileNameCol.ReadOnly         = true;
            mFileNameCol.Visible          = false;
            mFileNameCol.Width            = 0;
            DGV_Sessions.Columns.Add(mFileNameCol);

            #endregion

            mACMain = pACMain;

            cTaskFacade    = Simsang.Session.TaskFacade.getInstance();
            mSessionRecord = new BindingList <SessionRecord>();
            LoadSessionData();
            DGV_Sessions.DataSource = mSessionRecord;
        }