2025年4月15日 星期二

修改Keil工程名稱

原來要這樣改喔......

https://zhuanlan.zhihu.com/p/137706833 

2025年3月18日 星期二

[c#]可用來隨視窗放大縮小-ViewBox 控制項詳解

學一下摟 

https://blog.csdn.net/BYH371256/article/details/125371768

2025年1月19日 星期日

[Python]在 Colab使用 Gemini API

先記錄收藏,之後來慢慢看

https://ai.google.dev/gemini-api/docs/get-started/tutorial?hl=zh-tw&lang=python

2025年1月12日 星期日

[C#]使用 Effect 陰影,內陰影,長陰影

 先收起來,之後慢慢學

https://www.cnblogs.com/dino623/p/implementing_shadow_with_wpf_effect.html

2025年1月7日 星期二

[C#]livechart2 繪圖

 又是個不錯的繪圖,學習學習.....

https://livecharts.dev/docs/WPF/2.0.0-rc4/Overview.Installation

2024年12月24日 星期二

2024年11月4日 星期一

[C#] ToolTip 的使用

 不錯的文章教學,存起來

https://www.c-sharpcorner.com/uploadfile/1e050f/tooltip-in-wpf/

2024年9月3日 星期二

[C#]頁面切換

 winform 有寫過,現在學習 MVVM就卡卡的

找到文章,學習一下......

WPF中如何实现页面的切换和Window的跳转切换
https://blog.csdn.net/qq_39847278/article/details/128386432

2024年8月20日 星期二

[C#]MVVM study

 不錯的介紹,收藏起來

https://www.tutorialspoint.com/mvvm/mvvm_introduction.htm

2024年7月11日 星期四

[C#]string @ ..的使用

 不錯的介紹,學起來

彙整從 C# 1.0 到 C# 11.0 的字串格式變化

https://blog.miniasp.com/post/2023/01/10/CSharp-String-Literals-Syntax-Collection

2024年5月17日 星期五

[c#]找到的技巧說明

 不錯的內容,先收集起來,之後來看看......

https://ithelp.ithome.com.tw/articles/10247049

2024年5月6日 星期一

2024年3月10日 星期日

vscode 上使用 verilog

 文章收集:

在 VSCode 上使用 Verilog 開發並模擬硬體
https://hkt999.medium.com/%E5%9C%A8-vscode-%E4%B8%8A%E4%BD%BF%E7%94%A8-verilog-%E9%96%8B%E7%99%BC%E4%B8%A6%E6%A8%A1%E6%93%AC%E7%A1%AC%E9%AB%94-f915735e47b0

一定學得會!!! 在vscode上架設易於開發verilog/system verilog的環境之教學(win10環境)

https://www.dcard.tw/f/nctu/p/235935287

2024年2月24日 星期六

[Node-RED] study

 不錯的網站資料,有時間可以學習學習:

https://hackmd.io/6whOr3M9Rg6ibRejkVYbtQ

2024年1月24日 星期三

[C#]頁畫捲入/移出效果

 找到的不錯範例,感覺蠻強的,找時間實作一下

https://blog.csdn.net/YouyoMei/article/details/100776043

2024年1月14日 星期日

MQTT study

 不錯的文章

| ESP32 教學 | 認識 MQTT 與安裝 Mosquitto Windows 版本
https://jimirobot.tw/esp32-mosquitto-windows-mqtt-tutorial/

Practical MQTT with Steve
http://www.steves-internet-guide.com/

2023年10月14日 星期六

[C#]study

 //數字分隔符號

int x1=0b1_0011_0001;

float f=50_666.8f;


//一個字串如果內部有逸出字元,若是在字串雙引號左邊加上@字元,可以防止逸出字元被轉譯

string str1=@"D:\Python\ch1.";


//匿名資料類別(Anonymous Type)是一種唯讀資料,其內容不可被更改,使用var宣告

var stu=new {ID=1,Name="Jiln"};

var score=new{Math=80,Physics=92,English=95}

Console.WriteLine($"編號:{stu.ID} 姓名:{stu.Name}");


//"??="複合運算式,這個符號稱Null-coalescing assignment,中文可以解釋為空白併賦值

x??0 //如果x是null,則設定x等於0

z=x??0 //x是null則z=0,否則z是x原值


//Convert.ToString(int value,int toBase) 這個方法可以將指定的數值轉成相等的字串

Convert.ToString(x,int toBase:2);//2進位

Convert.ToString(x,int toBase:8);//8進位

Convert.ToString(x,int toBase:16);//16進位


//TryParse 用法

string name,score;

int sc;

name=Console.ReadLine();

score=Console.ReadLine();

Int32.TrysParse(score,out sc);

Console.WriteLine($"{name} 成績是 {sc}"};


Random rmd=new Random(int seed);//隨機樹的種子植,如果想要每次執行接獲得一樣的隨機數

Random rmd=new Random(100);


//object 陣列

object[] ball={"James",38,36,35,26,28}


//宣告不規則陣列與設定初值

int[][] sc=new int[3][];

sc[0]=new int[] {90,80,95};

sc[1]=new int[] {30,22};

sc[2]=new int[] {95,90,85,87};



int[][] sc=

{

new int[] {90,80,95}

new int[] {30,22}

new int[] {95,90,85,87}

}


//.NET的集合

ArrayList arrlist=new ArrayList()-可以動態增減,可以有不同的元素資料型態,一維陣列


HashTable ht=new HashTable()-元素用"鍵/值"方式配對儲存(python的字典)

ht.add("Spring","春季");

ht["Spring"]="春天"

建立HashTable 也可以使用整數當鍵


//如果將ref關鍵字改為out也可以傳遞位址資訊,這時可以不需要初始化變數值

CountA(mystr,out num)

//唯獨關鍵字 in

void UsaToNt(int money,in double rate,out double rtn)

{

...

}

UsaToNt(money,rate,out dollar)


//函數呼叫-可變動數量參數 params  只限定一維陣列

void UseParam1(params int[] arr)

{

....

}

void UseParam2(param object[] arr)

{

 ....

}


//函數傳遞二維振烈資料-只傳遞名稱,然後由二維的GeLength()屬性獲得列嶼行數

void Average(int[,] sc)

{

int rows=sc.GetLength(0);

int cols=sc.GetLength(1);

}


//匿名陣列-用完就不再需要,此時可以考慮不要宣告陣列,直接用匿名陣列方式處理,將匿名陣列當作參數傳遞

add(new int[]{1,2,3,4,5});


//Expression-Bodied Method(表達式主體方法),是指一個函數如果只有一行內容,可以將函數用下式表達

ReturnType FuncName(arg1,arg2,...argn)=>expression

int add(int x,int y)=>x+y


//dynamic 函數與參數-在程式編譯階段不做資料檢查,在程式執行階段才做資料檢查

dynamic AddDynamic(dynamic a,dynamic b)

{

return a+b;

}

Console.WriteLine($"3+5={AddDynamic(3,5)}");

Console.WriteLine($"3.2+5.3={AddDynamic(3.2,5,3)}");


//readonly 除了建構子所設資料外,則此結構的所有成員資料只能讀取,無法更改內容

public readlony struct coords

{

public coords(double x,double y)

{

X=x;

Y=y;

}

public double x {get;init:}

public double Y {get;init:}

}


//with 關鍵字-可以複製結構實體的特定欄位資料,然後予以修改

var p1=new coords(2,5);

var p2=p1 with {x=5};


//enum

enum WeekDays

{

Sunday,

Monday,

Tuesday,

Wendnesday

}

Console.writeLine($"Sunday:{(int)WeekDays.Sunday}");


2023年1月12日 星期四

[C#] 小技巧


操作說明:使用相對值指定轉換的原點

https://learn.microsoft.com/zh-tw/dotnet/desktop/wpf/graphics-multimedia/how-to-specify-the-origin-of-a-transform-by-using-relative-values?view=netframeworkdesktop-4.8


circule prgress bar

https://rumble.com/vlc451-wpf-controls-19-circlular-radial-progressbar-hd-2020-vs2019.html


WPF上下标

https://blog.csdn.net/kevinshift/article/details/90550260



WPF – Add a Watermark to a native WPF TextBox

https://code.4noobz.net/wpf-add-a-watermark-to-a-native-wpf-textbox/



WPF 自定义CheckBox样式

https://www.cnblogs.com/xiaomingg/p/8727700.html


Working with a WPF RepeatButton using C# and XAML
https://www.c-sharpcorner.com/uploadfile/mahesh/wpf-repeatbutton/
 
【C#/WPF】用Thumb做可拖拽的UI控件
https://www.cnblogs.com/guxin/p/csharp-wpf-drag-and-drop-ui-control-by-thumb.html




2023年1月10日 星期二

[C#]WPF 如何加入新font

 


將新font放入font的目錄內











app.xaml 加入








Mainwindow.xaml 內加入





2022年7月8日 星期五

[C#]WPF study

 

[WPF] Styles and Templates
https://yuchungchuang.wordpress.com/2019/04/13/wpf-%E6%95%99%E5%AD%B8-2%EF%BC%9Astyles-and-templates/


WPF-样式问题-ListBox或ListView中子项全填充去除边线问题
https://blog.csdn.net/qq_28806349/article/details/119986734
去除邊線及最上面的標題欄


WPF中TreeView的使用
https://blog.csdn.net/qq_43024228/article/details/107547352