본문 바로가기
반응형

전체 글557

WPF & DevExpress GridControl Context Menu 그리드에서 팝업(context menu) 이벤트 설정. 데모 소스랑 좀 많이 다른데.... 이게 제일 간단함. 보기 편하고.. 사람에 따라서 다를 수 있지만... 그래도 나에겐 이게 보기 편함. 선택은 알아서.. using System; using System.Collections.Generic; using System.Windows; using System.Windows.Controls; using System.Windows.Input; using DevExpress.Mvvm; using DevExpress.Xpf.Grid; using DevExpress.Xpf.Utils; using BIZ.Common.Dac; namespace WpfSample.DevTest { /// /// Grid10CellFo.. 2021. 4. 2.
WPF & DevExpress GridControl Move to next cell 그리드 셀 이동. Winform과 다르게 WPF는 화살표 탭으로 셀간 이동이 가능하다... 하지만, 기본 기능 이외에 입력하고, Enter키 등으로 이동해야할 때가 있다. 이동할 때 계산등 뭔가의 action이 필요하면... MoveNextCell() 전, 후로 넣으면 될 듯하다. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.. 2021. 4. 1.
WPF & DevExpress GridControl RowColor #2 dynamic 이전과 다르게 source data의 값을 활용하여, row color을 변경하였다. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigatio.. 2021. 3. 30.
WPF & DevExpress GridControl RowColor #1 Basic devexpress의 레퍼런스 참고해서 컬러를 넣을 때... 완전 비효율이다. Winform의 RowStyle처럼 바꾸면 좋은데.. 그렇지 못하다. T T using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media... 2021. 3. 30.
WPF & DevExpress GridControl Cell Merge 열 머지는 전체 or 개별 설정을 할 수 있다. 머진된 행을 선택하면... 분리가 되는데... 이유는 모르겠다. 읽기 전용이어도 분리가 된다. 가로 머지(병합)은 지원하지 않는다.. 하지만. 안되는 것은 아니다. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Me.. 2021. 3. 29.
WPF & DevExpress GridControl Summary grid summary count, min, max, sum, average using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; us.. 2021. 3. 28.
Entity Framework DB Connection 간단히 테스트 할 수 있는 버전 using System; using System.Collections.Generic; using System.Linq; using System.Data.SqlClient; using System.Data.Entity; using kaishaku.FrameWork.Base; using DTO.Common.Common; using DTO.Common.Cocktail; namespace BIZ.Common.Dac { public class CommonCodeDAO : DacBase { public List COMMON_CODE_LIST(string company, string highCode) { using (var con = new DbContext(@"Data Source=.. 2021. 3. 27.
ADO.net DB Connect ADO.net DB connect using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Data; using System.Data.Common; using System.Data.SqlClient; using System.Data.SqlTypes; namespace BIZ.Common.Dac { public class ADOConnect { public DataSet GetDataSet(string database, string storeProcedure, Dictionary dicParams ) { string connecting.. 2021. 3. 27.
WPF & DevExpress GridControl Drag & Drop 샘플 소스와 검색에서 나온 소스와... 작동이.. 다르다. 샘플에서는 드래그 드롭을 하는 순간 기존 소스쪽(그리드)의 row가 삭제가 되는데... 이건 삭제가 되지 않는다. 검색을 해보면, dev쪽 문의에는 삭제를 못하게 하는 방법을 묻는 질문은 많은 반면... 삭제가 안된다고 하는 질문은 없다. 소스를 비교해보고 이것 저것 다 해봤는데... 삭제가 되지 않아서... 일딴 꼼수로 처리했다. 작동 영상 원래 의도. 1.Grid2의 목록을 Grid1에 추가. 단 이 때 Grid2는 삭제 하지 않는다. (원래는 삭제되야됨.. 하지만. 안됨...ㅡㅡa) 2.Grid1은 Grid2의 데이터가 Drop되면, 추가 된다. 3.Grid1에서 Grid2로 Drag & Drop 될 때, Grid1은 삭제가 되야하고, Gr.. 2021. 3. 27.
WPF & DevExpress GridControl LookupEdit Dynamically change item source LookupEdit 동적 바인드 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes.. 2021. 3. 24.
WPF & DevExpress GridControl LookupEdit & ComboBoxEdit 1.그리드 내의 lookupedit 2.Resources를 활용한 lookupedit 3.comboboxedit using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Wi.. 2021. 3. 22.
WPF & DevExpress GridControl Banded xaml cs using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; using BI.. 2021. 3. 20.
WPF & DevExpress GridControl Basic WPF용 DevExpress 기본 그리드 바인드 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windo.. 2021. 3. 19.
GridControl auto generate column 실 데이터 셋에 존재하지만, 그리드에 정의되지 않은 컬럼까지 바인드 될 때 이때 GridControl에 이 속성이 있다면, AutoGenerateColumns="AddNew" 삭제한다. 이 놈이 자동으로 정의되지 않은 컬럼까지 추가한다. 2021. 3. 18.
'No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlClient'. Make sure the provider is registered in the 'entityFramework' Error messge System.InvalidOperationException: 'No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlClient'. Make sure the provider is registered in the 'entityFramework' section of the application config file. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information.' solution PM> Install-Package EntityFramework 2021. 3. 18.
Android QRcode Create test device : note 4 android os : Marshmallow 6.0 build.gradle implementation 'com.android.support:appcompat-v7:27.1.1' implementation 'com.journeyapps:zxing-android-embedded:3.6.0' activity_qrcode.xml QrcodeActivity.java package com.example.sampleproject; import androidx.appcompat.app.AppCompatActivity; import android.graphics.Bitmap; import android.os.Bundle; import android.util.Log; import an.. 2021. 3. 17.
Android Barcode Create test device : note 4 android os : Marshmallow 6.0 build.gradle implementation 'com.android.support:appcompat-v7:27.1.1' implementation 'com.journeyapps:zxing-android-embedded:3.6.0' activity_barcode_print.xml BarcodePrintActivity.java package com.example.sampleproject; import androidx.appcompat.app.AppCompatActivity; import android.graphics.Bitmap; import android.graphics.Color; import android.o.. 2021. 3. 17.
Bluetooth file & text transfer #3 client test device : note 4 android os : Marshmallow 6.0 Client Source activity_bluetooth2.xml Bluetooth2Activity.java package com.example.sampleproject; import androidx.annotation.Nullable; import androidx.core.app.ActivityCompat; import androidx.core.content.ContextCompat; import android.Manifest; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothDevice; import android.blue.. 2021. 3. 17.
Bluetooth file & text transfer #2 server test device : note 4 android os : Marshmallow 6.0 server source Source activity_bluetooth1.xml Bluetooth1Activity.java package com.example.sampleproject; import android.Manifest; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothSocket; import android.content.Intent; import android.content.pm.PackageManager; import android.os.Bundle; import android.os.Handler; import a.. 2021. 3. 17.
Bluetooth file & text transfer #1 etc test device : note 4 android os : Marshmallow 6.0 설명 없음. 알아서 보시기 바람. 소스 full로 올림. Source BlueToothData.java public class BlueToothData implements Serializable { private SettingValue.BT_MESSAGE_TYPE message_type; private String fileName; private byte [] data; public SettingValue.BT_MESSAGE_TYPE getMessage_type() { return message_type; } public void setMessage_type(SettingValue.BT_MESSAGE_TYPE mes.. 2021. 3. 17.
Android ListView Sorting List의 데이터를 정렬함. 2개의 데이터를 비교(파일, 폴더 구분, 이름) private ListView lvListView; private ArrayList arrFileData; lvListView = (ListView)findViewById(R.id.lvListView); //정렬 비교 로직(폴더 파일 오름 차순 ) private Comparator folderNfileSorting = new Comparator() { @Override public int compare(FileData data1, FileData data2) { int result ; if (data1.getIsFile() < data2.getIsFile()) result = -1; else if (data1.getIsFile(.. 2021. 1. 3.
Android Error Message android.content.res.Resources$NotFoundException imageview의 경우 리소스 파일 위치 변경. 참조:https://stackoverflow.com/questions/48161713/android-content-res-resourcesnotfoundexception-resource-id-0x7f07007e 2021. 1. 1.
자주 쓰는 코드 모음. Toast.makeText(getApplicationContext(), "print string", Toast.LENGTH_LONG).show(); //패키지 이름 가져오기. Context.getPackageName() //OR getPackageName() //String replace string= string.replace("D+", "A+"); //개행 \r, \n, \r\n foreach for(String s : filesList) tvTest.setText(tvTest.getText() + s + "\r"); 2020. 10. 30.
Timer Timer import java.util.Timer; import java.util.TimerTask; TimerTask tmrTask; Timer tmrNetworkStatus; //timer task tmrTask = new TimerTask() { @Override public void run() { Handler mHandler = new Handler(Looper.getMainLooper()); //원래 스레드에 있는 것 이용할 때 mHandler.postDelayed(new Runnable() { @Override public void run() { } }, 0); } }; //timer run tmrNetworkStatus = new Timer(); tmrNetworkStatus.schedu.. 2020. 10. 14.
FCM(Firebase Cloud Messaging) 메세지 받기 FCM에 대해서 자세한 설명은 생략. 이미 어느정도 이해하고 왔을 것으로 판단됨. 소스만 고대로 올려 놓음. 마시멜로우 기준으로 코딩. 그 이외 버전에서는 작동 안될 수 있음. MainActivity package com.norang.firebasesample; import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.util.Log; import android.widget.TextView; import android.widget.Toast; import com.google.android.gms.tasks.OnCompleteListener.. 2020. 9. 29.
기본 combobox c#기본 combo box //아이템 추가 1 cboPriorty.DisplayMember = "Value"; cboPriorty.ValueMember = "Key"; cboPriorty.Items.Add(new { Value = "high", Key = "high" }); cboPriorty.Items.Add(new { Value = "normal", Key = "normal" }); string value = (cboPriorty.SelectedItem as dynamic).Value; //아이템 추가 2 cboTest.DisplayMember = "Value"; cboTest.ValueMember = "Key"; Dictionarydic = new Dictionary(); dic.Add("1", ".. 2020. 9. 4.
안드로이드 개발시 쓰는 log 다음과 같은 종류의 로그가 있음. static int Log.d (String tag, String msg [, Throwable tr]) d 는 debug용 파란색 static int Log.e (String tag, String msg [, Throwable tr]) e 는 error용 빨간색 static int Log.w (String tag, String msg [, Throwable tr]) w 는 warning용 주황색 static int Log.i (String tag, String msg [, Throwable tr]) i 는 information용 초록색 static int Log.v (String tag, String msg [, Throwable tr]) v 는 verbose(많은 정.. 2020. 9. 3.
runOnUiThread 이 동네 용어는 모르겠음.... .net에서의 begininvoke랑 같은 역할을 하는 것 같음. 크로스스레드로 인한 문제를 해결하기 위해서 사용해야 됨. try{ JSONObject jObj = (JSONObject)args[0]; //비동기로 호출되기 때문에 메인 스레드에서 UI변경을 위해서 사용. //.net에서의 beginInvoke에 해당됨. comment = jObj.getString("comment"); new Thread(new Runnable() { @Override public void run() { runOnUiThread(new Runnable(){ @Override public void run() { txtLog.append(comment); } }); } }).start(); }.. 2020. 8. 18.
안드로이드 버전 안드로이드 버전... 버전에 따라 안 돌아가고... 지원 안되는 것이 많고... 5이하버전은 버리는 것으로... 버전 2.3: 진저브레드 (GingerBread) 버전 3.0/3.1/3.2: 허니콤 (Honeycomb) 버전 4.0: 아이스크림 샌드위치 (Ice Cream Sandwich) 버전 4.1/4.2/4.3: 젤리빈 (Jelly Bean) 버전 4.4: 킷캣 (KitKat) 버전 5.0/ 5.1: 롤리팝 (Lollipop) 버전 6.0/ 6.0.1: 마시멜로 (Marshmallow) 버전 7.0/ 7.1: 누가 (Nougat) 버전 8.0/ 8.1: 오레오 (Oreo) 버전 9: 파이 (Pie) 버전 10: 안드로이드 10 (Queen Cake) 버전 11: 안드로이드 11 (Red Velvet.. 2020. 8. 18.
android sleep 안드로이드.. sleep //main thread sleep(1000 * 10); //스레드 안에서 Thread.sleep(1000 * 10); Handler의 postDelayed Handler handler = new Handler(); handler.postDelayed(new Runnable() { public void run() { //TO DO } }, 1000 * 10); 2020. 8. 18.
반응형