159 lines
		
	
	
		
			4.4 KiB
		
	
	
	
		
			C#
		
	
			
		
		
	
	
			159 lines
		
	
	
		
			4.4 KiB
		
	
	
	
		
			C#
		
	
| using System;
 | |
| using System.Linq;
 | |
| using System.Collections.Generic;
 | |
| using System.Text;
 | |
| 
 | |
| namespace INT_LKD.DataStore
 | |
| {
 | |
|     public class UpdateForMainBoard
 | |
|     {
 | |
|         #region Field
 | |
|         private bool m_IsUpdateFinish;
 | |
|         private bool m_IsAckResponse;
 | |
|         private bool m_IsLastData;
 | |
|         private byte[] m_ByteData;
 | |
|         private byte[] m_SendData;
 | |
|         private int m_Index;
 | |
|         private int m_RetryCount;
 | |
|         private int m_SendDataCount;
 | |
|         private int m_ProgressBar1;
 | |
|         private int m_ProgressBar2;
 | |
|         private int m_ProgressBar3;
 | |
|         private int m_ProgressBar4;
 | |
|         private int m_ProgressBar5;
 | |
|         private int m_ProgressBar6;
 | |
|         private int m_ProgressBar7;
 | |
|         private int m_ProgressBar8;
 | |
|         #endregion
 | |
| 
 | |
|         #region Constructor
 | |
|         public UpdateForMainBoard()
 | |
|         {
 | |
|             this.Initialize();
 | |
|         }
 | |
|         #endregion
 | |
| 
 | |
|         #region Property
 | |
|         public bool IsUpdateFinish
 | |
|         {
 | |
|             get { return this.m_IsUpdateFinish; }
 | |
|             set { this.m_IsUpdateFinish = value; }
 | |
|         }
 | |
|         public bool IsAckResponse
 | |
|         {
 | |
|             get { return this.m_IsAckResponse; }
 | |
|             set { this.m_IsAckResponse = value; }
 | |
|         }
 | |
|         public bool IsLastData
 | |
|         {
 | |
|             get { return this.m_IsLastData; }
 | |
|             set { this.m_IsLastData = value; }
 | |
|         }
 | |
|         public byte[] ByteData
 | |
|         {
 | |
|             get { return this.m_ByteData; }
 | |
|             set { this.m_ByteData = value; }
 | |
|         }
 | |
|         public byte[] SendData
 | |
|         {
 | |
|             get { return this.m_SendData; }
 | |
|             set { this.m_SendData = value; }
 | |
|         }
 | |
|         public int Index
 | |
|         {
 | |
|             get { return this.m_Index; }
 | |
|             set { this.m_Index = value; }
 | |
|         }
 | |
|         public int RetryCount
 | |
|         {
 | |
|             get { return this.m_RetryCount; }
 | |
|             set { this.m_RetryCount = value; }
 | |
|         }
 | |
|         public int SendDataCount
 | |
|         {
 | |
|             get { return this.m_SendDataCount; }
 | |
|             set
 | |
|             {
 | |
|                 int iValue = 0;
 | |
| 
 | |
|                 this.m_SendDataCount = value;
 | |
| 
 | |
|                 iValue = value / 8;
 | |
| 
 | |
|                 this.ProgressBar1 = iValue;
 | |
|                 this.ProgressBar2 = iValue * 2;
 | |
|                 this.ProgressBar3 = iValue * 3;
 | |
|                 this.ProgressBar4 = iValue * 4;
 | |
|                 this.ProgressBar5 = iValue * 5;
 | |
|                 this.ProgressBar6 = iValue * 6;
 | |
|                 this.ProgressBar7 = iValue * 7;
 | |
|                 this.ProgressBar8 = iValue * 8;
 | |
|             }
 | |
|         }
 | |
| 
 | |
|         public int ProgressBar1
 | |
|         {
 | |
|             get { return this.m_ProgressBar1; }
 | |
|             private set { this.m_ProgressBar1 = value; }
 | |
|         }
 | |
|         public int ProgressBar2
 | |
|         {
 | |
|             get { return this.m_ProgressBar2; }
 | |
|             private set { this.m_ProgressBar2 = value; }
 | |
|         }
 | |
|         public int ProgressBar3
 | |
|         {
 | |
|             get { return this.m_ProgressBar3; }
 | |
|             private set { this.m_ProgressBar3 = value; }
 | |
|         }
 | |
|         public int ProgressBar4
 | |
|         {
 | |
|             get { return this.m_ProgressBar4; }
 | |
|             private set { this.m_ProgressBar4 = value; }
 | |
|         }
 | |
|         public int ProgressBar5
 | |
|         {
 | |
|             get { return this.m_ProgressBar5; }
 | |
|             private set { this.m_ProgressBar5 = value; }
 | |
|         }
 | |
|         public int ProgressBar6
 | |
|         {
 | |
|             get { return this.m_ProgressBar6; }
 | |
|             private set { this.m_ProgressBar6 = value; }
 | |
|         }
 | |
|         public int ProgressBar7
 | |
|         {
 | |
|             get { return this.m_ProgressBar7; }
 | |
|             private set { this.m_ProgressBar7 = value; }
 | |
|         }
 | |
|         public int ProgressBar8
 | |
|         {
 | |
|             get { return this.m_ProgressBar8; }
 | |
|             private set { this.m_ProgressBar8 = value; }
 | |
|         }
 | |
|         #endregion
 | |
| 
 | |
|         #region Method
 | |
|         public void Initialize()
 | |
|         {
 | |
|             this.IsUpdateFinish = false;
 | |
|             this.IsAckResponse = false;
 | |
|             this.IsLastData = false;
 | |
|             this.ByteData = new byte[100];
 | |
|             this.SendData = new byte[100];
 | |
|             this.Index = 1;
 | |
|             this.RetryCount = 0;
 | |
|             this.SendDataCount = 0;
 | |
|             this.ProgressBar1 = 0;
 | |
|             this.ProgressBar2 = 0;
 | |
|             this.ProgressBar3 = 0;
 | |
|             this.ProgressBar4 = 0;
 | |
|             this.ProgressBar5 = 0;
 | |
|             this.ProgressBar6 = 0;
 | |
|             this.ProgressBar7 = 0;
 | |
|             this.ProgressBar8 = 0;
 | |
|         }
 | |
|         #endregion
 | |
|     }
 | |
| }
 |