2018年11月24日 星期六

Dapper的WebForm和MVC範例

WebForm
https://github.com/dotnetgenetics/ASP.NET-WebForm-Dapper

MVC
https://github.com/dotnetgenetics/ASP.NETMVCDapper

ReoGrid:可以把WinForm做成類似Excel xlsx編輯器的套件

可以把WinForm做成類似Excel xlsx編輯器的套件
完全免費,MIT授權,支援Formula,電腦不需要安裝Excel
https://reogrid.net/document/formula/







安裝套件 https://reogrid.net/document/installation/
ReoGrid for Windows Form
PM> Install-Package unvell.ReoGrid.dll

ReoGrid for WPF
PM> Install-Package unvell.ReoGridWPF.dll

官方文件:
https://reogrid.net/document/

DEMO(官方的範例滿多的)
https://github.com/unvell/ReoGrid/tree/master/Demo

ReoScript
https://reogrid.net/document/script-execution/

其他參考資料:
http://necotech.org/archives/365
https://www.unvell.com/jp/

https://www.codeproject.com/Articles/691749/Free-NET-Spreadsheet-Control



範例(視窗載入時建立ReoGridControl):
        private void Form1_Load(object sender, EventArgs e)
        {
            //https://www.codeproject.com/Articles/691749/Free-NET-Spreadsheet-Control
            // create instance
            var grid = new ReoGridControl()
            {
                // put to fill the parent control
                Dock = DockStyle.Fill,
            };


            this.Controls.Add(grid);

           
        }



如果要編譯ReoGrid原始碼,舊版Visual Studio (比如2013)認不得$
請安裝新版Microsoft.Net.Compilers
https://www.nuget.org/packages/Microsoft.Net.Compilers/
其他:
SpreadsheetGear(付費)
https://www.spreadsheetgear.com

Spreadsheet.net (付費)
https://www.grapecity.com/en/spreadnet

SpreadsheetGear vs. SyncFusion vs. ComponentOne
https://josephfluckiger.blogspot.com/2013/03/spreadsheetgear-vs-syncfusion-vs.html

2018年9月8日 星期六

System.ServiceModel.AddressAccessDeniedException

解決方式:命令提示字元輸入netsh http add urlacl url=http://+:1700/cal/ user="\Everyone"
1700改成自己遇到錯誤訊息的port

System.ServiceModel.AddressAccessDeniedException
  HResult=0x80131501
  Message=HTTP 無法登錄 URL http://+:1700/cal/。您的處理程序沒有足夠的存取權可存取此命名空間 (如需詳細資訊,請參閱 http://go.microsoft.com/fwlink/?LinkId=70353)。
  Source=System.ServiceModel
  StackTrace:
   於 System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
   於 System.ServiceModel.Channels.TransportManager.Open(TransportChannelListener channelListener)
   於 System.ServiceModel.Channels.TransportManagerContainer.Open(SelectTransportManagersCallback selectTransportManagerCallback)
   於 System.ServiceModel.Channels.TransportChannelListener.OnOpen(TimeSpan timeout)
   於 System.ServiceModel.Channels.HttpChannelListener`1.OnOpen(TimeSpan timeout)

使用SonarQube整合Jenkins

參考 https://dotblogs.com.tw/kinanson/2017/08/22/190641

使用Visual Studio 2017 Community Edition

SonarQube.Scanner.MSBuild.exe begin /k:"org.sonarqube:sonarqube-scanner-msbuild" /n:"專案名稱" /v:"1.0"

"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe"

SonarQube.Scanner.MSBuild.exe end

ref:
https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+MSBuild