Table of Contents
http://gitlab.fjfi.cvut.cz/culikzde/pw-16-2025 Letošní příklady
http://gitlab.fjfi.cvut.cz/culikzde/pw-18-2025
http://gitlab.fjfi.cvut.cz/culikzde/pw-2024 Loňské příklady
http://gitlab.fjfi.cvut.cz/culikzde/pw-2023 Starší příklady
http://gitlab.fjfi.cvut.cz/culikzde/pw
http://gitlab.fjfi.cvut.cz/culikzde/pw-sharpdevelop
Vývojová prostředí
Literatura
- Charles Petzold, Programování Microsoft Windows Forms v jazyce C#, Computer Press
Spouštíme Visual Studio
Několik ovládacích prvků
CheckBox, NumericUpDown, TextBox
Jednoduchý kreslící program
jednoduchý kreslící program - první část
prozatím umíme nakreslit úsečku od místa stisknutí myši do místa uvolnění myši
Pen, Brush, Graphics
Jednoduchý kreslící program - obdélník a elipsa
Jednoduchý kreslící program - výběr barev
jednoduchý kreslící program - třetí část
Menu, ColorDialog, přetypování
panely pro výběr barev, které můžeme průběžně přidávat
Jednoduchý kreslící program - ukládání do souboru, změna velikosti okna, štětec s barevým přechodem, editace parametrů pro kreslení čar
jednoduchý kreslící program - čtvrtá část
OpenFileDialog, SaveFileDialog, PropertyGrid, LinearGradientBrush
Jednoduchý kreslící program - dialog s parametry barevné výplně
Pohyblivé panely
user control, context menu
Další druhy panelů
čtení textu ze soubotu, HTML, tabulky, grafy
Strom se soubory
DriveInfo, DirectoryInfo, FileInfo, postupné přidávání větví
Reflexe, typové informace
Preklad
Rozpoznavani obrazu
ONNX examples https://onnxruntime.ai/docs/tutorials/api-basics.html
C# example https://onnxruntime.ai/docs/tutorials/csharp/resnet50_csharp.html
C# example source https://github.com/microsoft/onnxruntime/tree/main/csharp/sample/Microsoft.ML.OnnxRuntime.ResNet50v2Sample
git clone https://github.com/microsoft/onnxruntime
download model https://github.com/onnx/models/blob/main/validated/vision/classification/resnet/model/resnet50-v2-7.onnx
display model … Netron https://netron.app
Visual Studio - open solution - onnxruntime\csharp\sample\Microsoft.ML.OnnxRuntime.ResNet50v2Sample
In Solution Explorer, right-click Dependencies and select Manage NuGet packages….
In the NuGet package manager, select the Browse tab. Add following packages:
Microsoft.ML.OnnxRuntime System.Numerics.Tensors
Edit Program.cs
if (args.Length < 2) { // Console.WriteLine("Usage: prog <model.onnx> <image.jpg>"); // return; } // Read paths string modelFilePath = "../../../resnet50-v2-7.onnx"; string imageFilePath = "../../../dog.jpeg";
Druhy priklad
C# example source https://github.com/microsoft/onnxruntime/tree/main/csharp/sample/Microsoft.ML.OnnxRuntime.FasterRcnnSample
Download model https://github.com/onnx/models/blob/main/validated/vision/object_detection_segmentation/faster-rcnn/model/FasterRCNN-12.onnx
FasterRCNN-10.onnx not working
Download image https://onnxruntime.ai/images/demo.jpg
Open solution onnxruntime/csharp/sample/Microsoft.ML.OnnxRuntime.FasterRcnnSample
In Solution Explorer, right-click Properties
Set Target framework to .NET 9.0
string modelFilePath = "..\\..\\..\\FasterRCNN-12.onnx";
string imageFilePath = "../../../demo.jpg";
string outImageFilePath = "../../../output.jpg";
Poznámky
http://gitlab.fjfi.cvut.cz/culikzde/pw-builder/-/tree/master/Builder
http://gitlab.fjfi.cvut.cz/culikzde/pw-sharpdevelop/-/tree/master/Compiler
https://stackoverflow.com/questions/4181668/execute-c-sharp-code-at-runtime-from-code-file
https://www.linkedin.com/pulse/load-compile-run-c-code-dynamically-munib-butt
http://www.codeproject.com/Articles/60175/The-DesignSurface-Extended-Class-is-Back-Together
http://github.com/dajuric/dot-imaging
http://github.com/mini-software/MiniExcel
http://discoverdot.net/projects/cs-script
https://github.com/quozd/awesome-dotnet
https://www.programmingalgorithms.com/algorithm/emboss-laplacian/
PropertyGrid, ICustomTypeDescriptor, TypeDescriptionProvider, TypeDescriptor
http://www.codeproject.com/Articles/13342/Filtering-properties-in-a-PropertyGrid
http://www.codeproject.com/Articles/189521/Dynamic-Properties-for-PropertyGrid
http://www.codeproject.com/Articles/9280/Add-Remove-Items-to-from-PropertyGrid-at-Runtime
http://www.codeproject.com/Articles/13630/Add-Custom-Properties-to-a-PropertyGrid
http://www.codeproject.com/Articles/24332/Creating-a-Custom-Collection-for-Use-in-a-Property
http://www.codeproject.com/Tips/1073110/Dynamically-Display-the-Properties-Using-Csharp-Pr
http://www.codeproject.com/Articles/26992/Using-a-TypeDescriptionProvider-to-support-dynamic
http://blog.differentpla.net/blog/2005/02/26/using-propertygrid-with-a-dictionary-object/
https://stackoverflow.com/questions/1831732/c-sharp-picturebox-memory-releasing-problem
http://accord-framework.net/ Machine learning
