전체 글
-
-
C# Custom Sort Null 널값이 제일 아래로 IComparer IComparable.NET/C# Basic 2013. 8. 23. 10:17
IComparable 및 IComparer 인터페이스 Visual C#에서 사용 하는 방법refer: http://support.microsoft.com/kb/320727/ko static void Main(string[] args) { // Create an arary of car objects. car[] arrayOfCars = new car[8] { new car("Ford",1992), new car("Fiat",1988), new car("Buick",1932), new car("Ford",1932), new car("Dodge",1999), new car(string.Empty,1990 ), new car("sexy",null ), new car("Honda",1977) }; // Write..
-
-
WPF Interactive 2D Drawing.NET/WPF 2D 2013. 7. 11. 03:31
public partial class MainWindow : Window { private List paths = new List(); private Point startPoint = new Point(); private Shape rubberBand = null; Point currentPoint = new Point(); private bool isDragging = false; private bool isDown = false; private Path originalElement = new Path(); private Path movingElement = new Path(); private Path path1 = new Path(); private Path path2 = new Path(); pri..
-
-
WPF 2D PathGeometry Class.NET/WPF 2D 2013. 7. 11. 03:23
reference : Practical WPF Graphics Programming
-
WPF 2D Combined Geometry.NET/WPF 2D 2013. 7. 11. 03:20
reference : Practical WPF Graphics Programming
-
-
WPF Geometry and 2D Drawing.NET/WPF 2D 2013. 7. 11. 03:15
reference : Practical WPF Graphics Programming
-
WPF 2D Composite Transforms.NET/WPF 2D 2013. 7. 4. 01:07
TransformGroup tg = new TransformGroup(); tg.Children.Add(ScaleTransform(2, 3)); tg.Children.Add(TranslateTransform(100, -100)); tg.Children.Add(RotateTransform(45)); tg.Children.Add(SkewTransform(30, 45)); Rectangle.RenderTransform = tg; reference : Practical WPF Graphics Programming
-
-
-
WPF 2D Scale Transforms.NET/WPF 2D 2013. 6. 28. 00:17
reference : Practical WPF Graphics Programming
-
WPF 2D Object Matrix Transforms.NET/WPF 2D 2013. 6. 28. 00:04
M11 M12 M21 M22 OffsetX OffsetY Apply init Original shape private void BtnApply_Click(object sender, RoutedEventArgs e) { GetValue(); } private void GetValue() { if (matrixTransform != null) { Matrix m = new Matrix(); m.M11 = tbM11 != null ? tbM11.Value : 0; m.M12 = tbM12 != null ? tbM12.Value : 0; m.M21 = tbM21 != null ? tbM21.Value : 0; m.M22 = tbM22 != null ? tbM22.Value : 0; m.OffsetX = tbOf..
-
WPF 2D Creating Perpendicular Lines.NET/WPF 2D 2013. 6. 27. 23:11
X1 Y1 X2 Y2 Length Line2 Apply Close Point1 Point2 Point3 Point4 private Line line1; private Line line2; public MainWindow() { InitializeComponent(); Rectangle rect = new Rectangle(); rect.Stroke = Brushes.Black; rect.Width = canvas1.Width; rect.Height = canvas1.Height; canvas1.Children.Add(rect); line1 = new Line(); line2 = new Line(); AddLines(); } private void AddLines() { Point pt1 = new Poi..
-
WPF 2D Transformations Matrix Transforms.NET/WPF 2D 2013. 6. 27. 22:37
// Invert matrix: Matrix matrix = new Matrix(1, 2, 3, 4, 0, 0); tbOriginal.Text = "(" + matrix.ToString() + ")"; matrix.Invert(); tbInvert.Text = "(" + matrix.ToString() + ")"; // Matrix multiplication: Matrix m1 = new Matrix(1, 2, 3, 4, 0, 1); Matrix m2 = new Matrix(0, 1, 2, 1, 0, 1); Matrix m12 = Matrix.Multiply(m1, m2); Matrix m21 = Matrix.Multiply(m2, m1); tbM1M2.Text = "M1 = (" + m1.ToStrin..
-
WPF 2D 차트에 대한 사용자 정의 좌표.NET/WPF 2D 2013. 6. 18. 23:30
XMin XMax 10 YMin 0 YMax 10 Apply Close public partial class MainWindow : Window { private double xMin = 0.0; private double xMax = 10.0; private double yMin = 0.0; private double yMax = 10.0; private Line line1; private Polyline polyline1; public MainWindow() { InitializeComponent(); AddGraphics(); } private void AddGraphics() { line1 = new Line(); line1.X1 = XNormalize(2.0); line1.Y1 = YNormal..
-
WPF AutomationPeer 참고.NET/WPF 2013. 5. 28. 10:35
http://msdn.microsoft.com/ko-kr/library/ms590934.aspx ToggleButton CheckBox => AutomationPeer _apeer; IToggleProvider chkBoxToggleProvider; _apeer = new ToggleButtonAutomationPeer(obj as dynamic); chkBoxToggleProvider = (IToggleProvider)_apeer; chkBoxToggleProvider.Toggle(); Button=>IInvokeProvider invokeProv = null; ButtonAutomationPeer peer = new ButtonAutomationPeer(obj as dynamic); invokePro..
-
골든32 사용시 설정사항Database/Oracle 2013. 5. 7. 22:41
골든32를 설치하면 Default Date Format 이 설정되어 있다 아래는 Golden32 옵션 골든6버전을 받아서 옵션을 보면 Oracle Date Format 이 비어있다 여기서 골든32로 사용시 데이터 주의를 요할 것 같다 골든32버전은 Default Date Format 칸을 빈칸으로 설정하면 데이터 오판하는일이 없을듯 실제로 골든32 버전 Select Query 결과 값과 다른 DBMS (PL/SQL Developer와 Toad)의 Select Query 결과 값이 달랐다 무척 혼란을 주었는데 문제는 Default Date Format이 골든32의 Default Date Format 설정이 디폴트(MM/DD/YYYY HH24:MI:SS) 로 되어 있었다는 것이다 골든32에서 Default ..
-
dynamic 오류 System.IndexOutOfRangeException 'Microsoft.CSharp.dll'.NET/WPF 2013. 5. 2. 16:39
WPF UserControl을 상속받은 클래스에서 자기자신의 클래스를 에셈블리로드해 dynamic으로 형변환 다음 메소드 오버라이딩 된 메소드를 호출시 (pop.Content as dynamic).PADetailPartMedCostReceivePaymentLoad(inObj); 간헐적으로 아래 오류발생 ... System.IndexOutOfRangeException에서 'Microsoft.CSharp.dll' 형식의 예외가 발생했지만 사용자 코드에서 처리되지 않았습니다. => 명시적으로 클래스명 as 캐스팅 후 오류 해결 (pop.Content as HIS.PA.CORE.UI.PADetailPartMedCostReceivePayment).PADetailPartMedCostReceivePaymentLoad..
-
DLL Ressource 에서 BitmapImage 불러오기 Method.NET/C# Basic 2013. 1. 11. 00:02
1. 외부 DLL Ressource 리플렉터 => 2. 코드/// /// name : GetDllToBitmapImageResource /// desc : BitmapImage load of resource /// author : 전광식 /// create Date : 2013-01-10 오후 7:56:23 /// update date : 2013-01-10 오후 7:56:23 , 수정개요 /// /// AssemblyName /// resourceUri /// public BitmapImage GetDllToBitmapImageResource(string assemblyName, string resourceUri) { Assembly assembly = Assembly.LoadFrom(System.En..