示例#1
0
 private void frm_PreRecord(object sender, RecordPositionEventArgs e)
 {
     if (_EventIndex > 0)
     {
         this.GridView.Rows[_EventIndex].Selected = false;
         _EventIndex--;
         this.GridView.Rows[_EventIndex].Selected = true;
         if (_EventIndex < this.GridView.FirstDisplayedScrollingRowIndex)
         {
             if (this.GridView.FirstDisplayedScrollingRowIndex >= this.GridView.DisplayedRowCount(false))
             {
                 this.GridView.FirstDisplayedScrollingRowIndex -= this.GridView.DisplayedRowCount(false);
             }
             else
             {
                 this.GridView.FirstDisplayedScrollingRowIndex = 0;
             }
         }
         string path = string.Empty;
         if (this.GridView.Rows[_EventIndex].Tag is SpeedingRecord)
         {
             SpeedingRecord info = this.GridView.Rows[_EventIndex].Tag as SpeedingRecord;
             path = info.Photo;
         }
         else if (this.GridView.Rows[_EventIndex].Tag is SpeedingLog)
         {
             SpeedingLog info = this.GridView.Rows[_EventIndex].Tag as SpeedingLog;
             path = info.Photo;
         }
         FrmPhotoViewer frm = sender as FrmPhotoViewer;
         frm.ShowImage(path);
     }
     e.IsTopRecord = (_EventIndex == 0);
 }
示例#2
0
 void frm_PreRecord(object sender, RecordPositionEventArgs e)
 {
     if (_EventIndex > 0)
     {
         this.customDataGridView1.Rows[_EventIndex].Selected = false;
         _EventIndex--;
         this.customDataGridView1.Rows[_EventIndex].Selected = true;
         if (_EventIndex < this.customDataGridView1.FirstDisplayedScrollingRowIndex)
         {
             if (this.customDataGridView1.FirstDisplayedScrollingRowIndex >= this.customDataGridView1.DisplayedRowCount(false))
             {
                 this.customDataGridView1.FirstDisplayedScrollingRowIndex -= this.customDataGridView1.DisplayedRowCount(false);
             }
             else
             {
                 this.customDataGridView1.FirstDisplayedScrollingRowIndex = 0;
             }
         }
         CardEventRecord   record = this.GridView.Rows[_EventIndex].Tag as CardEventRecord;
         FrmSnapShotViewer frm    = sender as FrmSnapShotViewer;
         if (record.IsExitEvent && record.LastDateTime != null)
         {
             frm.ShowImage(record.EventDateTime, record.LastDateTime.Value, record.CardID);
         }
         else
         {
             frm.ShowImage(record.EventDateTime, record.CardID);
         }
     }
     e.IsTopRecord = (_EventIndex == 0);
 }
示例#3
0
 private void frm_NextRecord(object sender, RecordPositionEventArgs e)
 {
     if (_EventIndex < this.GridView.Rows.Count - 1)
     {
         this.GridView.Rows[_EventIndex].Selected = false;
         _EventIndex++;
         this.GridView.Rows[_EventIndex].Selected = true;
         if (_EventIndex > this.GridView.FirstDisplayedScrollingRowIndex + this.GridView.DisplayedRowCount(false) - 1)
         {
             this.GridView.FirstDisplayedScrollingRowIndex += this.GridView.DisplayedRowCount(false);
         }
         string path = string.Empty;
         if (this.GridView.Rows[_EventIndex].Tag is SpeedingRecord)
         {
             SpeedingRecord info = this.GridView.Rows[_EventIndex].Tag as SpeedingRecord;
             path = info.Photo;
         }
         else if (this.GridView.Rows[_EventIndex].Tag is SpeedingLog)
         {
             SpeedingLog info = this.GridView.Rows[_EventIndex].Tag as SpeedingLog;
             path = info.Photo;
         }
         FrmPhotoViewer frm = sender as FrmPhotoViewer;
         frm.ShowImage(path);
     }
     e.IsButtonRecord = (_EventIndex == GridView.Rows.Count - 1);
 }
示例#4
0
 private void btnNext_Click(object sender, EventArgs e)
 {
     if (this.NextRecord != null)
     {
         RecordPositionEventArgs args = new RecordPositionEventArgs();
         NextRecord(this, args);
         btnPre.Enabled  = !args.IsTopRecord;
         btnNext.Enabled = !args.IsButtonRecord;
     }
 }
 void frm_NextRecord(object sender, RecordPositionEventArgs e)
 {
     if (_EventIndex < gridCard.Rows.Count - 1)
     {
         this.gridCard.Rows[_EventIndex].Selected = false;
         _EventIndex++;
         this.gridCard.Rows[_EventIndex].Selected = true;
         if (_EventIndex > this.gridCard.FirstDisplayedScrollingRowIndex + this.gridCard.DisplayedRowCount(false) - 1)
         {
             this.gridCard.FirstDisplayedScrollingRowIndex += this.gridCard.DisplayedRowCount(false);
         }
         CardInfo          info = this.GridView.Rows[_EventIndex].Tag as CardInfo;
         FrmSnapShotViewer frm  = sender as FrmSnapShotViewer;
         frm.ShowImage(info.LastDateTime, info.CardID);
     }
 }
 private void frm_NextRecord(object sender, RecordPositionEventArgs e)
 {
     if (_EventIndex < customDataGridView1.Rows.Count - 1)
     {
         this.customDataGridView1.Rows[_EventIndex].Selected = false;
         _EventIndex++;
         this.customDataGridView1.Rows[_EventIndex].Selected = true;
         if (_EventIndex > this.customDataGridView1.FirstDisplayedScrollingRowIndex + this.customDataGridView1.DisplayedRowCount(false) - 1)
         {
             this.customDataGridView1.FirstDisplayedScrollingRowIndex += this.customDataGridView1.DisplayedRowCount(false);
         }
         CardPaymentInfo   info = this.GridView.Rows[_EventIndex].Tag as CardPaymentInfo;
         FrmSnapShotViewer frm  = sender as FrmSnapShotViewer;
         frm.ShowImage(info.ChargeDateTime, info.EnterDateTime.Value, info.CardID);
     }
     e.IsButtonRecord = (_EventIndex == GridView.Rows.Count - 1);
 }
示例#7
0
 void frm_NextRecord(object sender, RecordPositionEventArgs e)
 {
     if (_EventIndex < customDataGridView1.Rows.Count - 1)
     {
         this.customDataGridView1.Rows[_EventIndex].Selected = false;
         _EventIndex++;
         this.customDataGridView1.Rows[_EventIndex].Selected = true;
         if (_EventIndex > this.customDataGridView1.FirstDisplayedScrollingRowIndex + this.customDataGridView1.DisplayedRowCount(false) - 1)
         {
             this.customDataGridView1.FirstDisplayedScrollingRowIndex += this.customDataGridView1.DisplayedRowCount(false);
         }
         CardEventRecord   record = this.GridView.Rows[_EventIndex].Tag as CardEventRecord;
         FrmSnapShotViewer frm    = sender as FrmSnapShotViewer;
         if (record.IsExitEvent && record.LastDateTime != null)
         {
             frm.ShowImage(record.EventDateTime, record.LastDateTime.Value, record.CardID);
         }
         else
         {
             frm.ShowImage(record.EventDateTime, record.CardID);
         }
     }
     e.IsButtonRecord = (_EventIndex == GridView.Rows.Count - 1);
 }
 void frm_PreRecord(object sender, RecordPositionEventArgs e)
 {
     if (_EventIndex > 0)
     {
         this.gridCard.Rows[_EventIndex].Selected = false;
         _EventIndex--;
         this.gridCard.Rows[_EventIndex].Selected = true;
         if (_EventIndex < this.gridCard.FirstDisplayedScrollingRowIndex)
         {
             if (this.gridCard.FirstDisplayedScrollingRowIndex >= this.gridCard.DisplayedRowCount(false))
             {
                 this.gridCard.FirstDisplayedScrollingRowIndex -= this.gridCard.DisplayedRowCount(false);
             }
             else
             {
                 this.gridCard.FirstDisplayedScrollingRowIndex = 0;
             }
         }
         CardInfo          info = this.GridView.Rows[_EventIndex].Tag as CardInfo;
         FrmSnapShotViewer frm  = sender as FrmSnapShotViewer;
         frm.ShowImage(info.LastDateTime, info.CardID);
     }
     e.IsTopRecord = (_EventIndex == 0);
 }
示例#9
0
 private void frm_PreRecord(object sender, RecordPositionEventArgs e)
 {
     if (_EventIndex > 0)
     {
         this.customDataGridview1.Rows[_EventIndex].Selected = false;
         _EventIndex--;
         this.customDataGridview1.Rows[_EventIndex].Selected = true;
         if (_EventIndex < this.customDataGridview1.FirstDisplayedScrollingRowIndex)
         {
             if (this.customDataGridview1.FirstDisplayedScrollingRowIndex >= this.customDataGridview1.DisplayedRowCount(false))
             {
                 this.customDataGridview1.FirstDisplayedScrollingRowIndex -= this.customDataGridview1.DisplayedRowCount(false);
             }
             else
             {
                 this.customDataGridview1.FirstDisplayedScrollingRowIndex = 0;
             }
         }
         AlarmInfo         info = this.GridView.Rows[_EventIndex].Tag as AlarmInfo;
         FrmSnapShotViewer frm  = sender as FrmSnapShotViewer;
         frm.ShowImage(info.AlarmDateTime, string.Empty);
     }
     e.IsTopRecord = (_EventIndex == 0);
 }