전체 글
-
Barcode input processing and window status change processingIT Story/C# & WPF 2022. 6. 23. 20:57
void ReciveBarCode(string ReciveData) { if (CommonUtils.BarCodeStat) return; string CardID = ReciveData.Remove(ReciveData.Length - 2, 2); string Que = "Select no from TB_Member Where EducardNum = '" + CardID + "'"; DataTable dt = PLAcaDBManager.GetQueryData(Que); if (dt != null) { int MemberKey = 0; foreach (DataRow row in dt.Rows) MemberKey = Convert.ToInt32(row["no"]); wndMonthlyDayTest wms = ..
-
UserControl_MouseMove function exampleIT Story/C# & WPF 2022. 6. 23. 20:56
private void UserControl_MouseMove(object sender, MouseEventArgs e) { try { Point mp = e.GetPosition(this); Rect bearingRect = new Rect(174 + 83, 8 + 17, 1350, 183 - 17); Rect prsBDTRect = new Rect(174 + 82, 8 + 183 + 212 + 273 + 33, 862, 256); Rect prsRAWRect = new Rect(174 + 81 + 864 + 32, 8 + 183 + 212 + 273 + 33, 455, 256); Rect aosSystemTarget = new Rect(174 + 83, 8 + 183 + 17, 1350, 22); R..
-
.NET 1-Dimensional Array <-> Example Source of Transformation Between DataTableIT Story/C# & WPF 2022. 6. 19. 21:24
public DataTable fun1ArrayToDataTable(string[] sArrData, int nColumnCount, params string[] sArrColumnHeader) { int nRowCount = 0; int nIndex = 0; try { //1차원배열이 Null이거나 데이터가 없으면 그냥 빠져나간다. if (sArrData == null || sArrData.Length
-
Example of changing the CellStyle of Row in .NET DataGridViewIT Story/C# & WPF 2022. 6. 19. 21:23
public void subResizeColumnWidth(DataGridView grdDataGridView, params int[] nArrColumnWidth) { try { //DataGridView의 컬럼개수와 설정하려고 하는 ColumnWidth 개수가 맞지 않으면 빠져나간다. if (grdDataGridView.ColumnCount != nArrColumnWidth.Length) { return; } this.pgrdDataGridView = grdDataGridView; // 열너비를 수동조정해 GridView의 너비에 맞춘다. for (int nLoop = 0; nLoop < nArrColumnWidth.Length; nLoop++) { this.pgrdDataGridView.Column..
-
Example of entering, deleting, and modifying new columns in .NET DataGridViewIT Story/C# & WPF 2022. 6. 19. 21:22
public void subAddColumn(DataGridView grdDataGridView, string sColumnName) { try { int nColumnIndex = grdDataGridView.Columns.Count; //컬럼을 Grid의 제일 뒤(오른쪽)에 추가한다. string sColumnHeaderText = "ColumnHeader" + nColumnIndex.ToString(); //ColumnName Color dcColumnColor = grdDataGridView.DefaultCellStyle.BackColor; //아래 Overloading되어 있는 함수를 호출한다. subAddColumn(grdDataGridView, sColumnName, nColumnIndex,..
-
Example of adding, deleting, and modifying new rows in .NET DataGridViewIT Story/C# & WPF 2022. 6. 19. 21:21
public void subAddRow(DataGridView grdDataGridView, string[] sArrRowData) { BindingSource dBS = null; DataTable dDT = null; try { //DataGridView의 컬럼개수와 새로 입력하려고 하는 컬럼데이터 개수가 맞지 않으면 빠져나간다. if (grdDataGridView.ColumnCount != sArrRowData.Length) return; this.pgrdDataGridView = grdDataGridView; if (this.pgrdDataGridView.DataSource.GetType().Name == "DataTable") { dDT = (DataTable)this.pgrdDataGridVi..
-
.NET Hex Data Swap and Change Address ExampleIT Story/C# & WPF 2022. 6. 19. 21:21
/// /// Hex Data를 Swap 한다 /// /// /// public string funHexSwap(string sHexData) { string sReturn = string.Empty; //리턴할 주소값 string sTemp = string.Empty; //임시로 저장할 변수 int nMod; //자릿수 계산을 위한 나머지 변수 try { if (sHexData.Length % 4 != 0) { nMod = sHexData.Length % 4; sTemp = sTemp.PadLeft(nMod, '0'); sHexData = sTemp + sHexData; } for (int i = 0; i < sHexData.Length; i = i + 4) { sReturn = sReturn + sH..
-
Example of changing .NET Data to the type that the user wantsIT Story/C# & WPF 2022. 6. 19. 21:20
Functions for type conversion between ASCII and Binary and Decimal. Please use it. public string funAscStringConvert(string sData, EnuCommunication.StringType StringType) { string sReturn = string.Empty; string sTemp = string.Empty; int nTemp = 0; try { switch (StringType) { //ASCII Data(AB) => Binary Data(0100 0001 0100 0010) case Common.EnuCommunication.StringType.Binary: sReturn = funAscStrin..