Programming/c# & winform2020. 9. 21. 10:29

mono 홈페이지 가보니 ms의 스폰으로 제작되고 있는 것 같은데

monodevleop 자체는 ubuntu에서 관리를 안하는건지 패키지가 존재하지 않는다.

 

Ubuntu 18.04 (i386, amd64, armhf, arm64, ppc64el)
sudo apt install gnupg ca-certificates
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update

 

mono-devel을 깔아보니 순수하게 컴파일러 인듯

$ sudo apt install mono-devel

개발 환경은 별도로 설치해야 한다.

$ sudo apt-get install monodevelop

 

 

visual studio community 처럼 winform을 바로 만들순 없나?

 

[링크 : https://www.mono-project.com/download/stable/]

[링크 : https://www.mono-project.com/]

 

[링크 : https://blog.danggun.net/1776]

[링크 : https://blog.naver.com/chandong83/220858687557]

[링크 : https://www.ifunfactory.com/engine/documents/reference/ko/development-on-monodevelop.html]

[링크 : https://yaraba.tistory.com/605]

 

+

mono는 compiler가 아니라 실행환경이구나.. csc가 csharp compiler 줄여서 컴파일러인 듯.

$ mono tt.cs 
Cannot open assembly 'tt.cs': File does not contain a valid CIL image.

$ csc tt.cs 
Microsoft (R) Visual C# Compiler version 3.6.0-4.20224.5 (ec77c100)
Copyright (C) Microsoft Corporation. All rights reserved.

$ mono tt.exe
Hello World!

 

-r 옵션 주지 않아도 빌드되고 실행은 된다.

$ csc wf.cs -r:System.Windows.Forms.dll
Microsoft (R) Visual C# Compiler version 3.6.0-4.20224.5 (ec77c100)
Copyright (C) Microsoft Corporation. All rights reserved.

$ mono wf.exe

 

 

[링크 : https://www.mono-project.com/docs/getting-started/mono-basics/]

'Programming > c# & winform' 카테고리의 다른 글

c# 교과서 - 키워드 정리  (0) 2020.09.21
c# checked , unchecked  (0) 2020.09.21
c# 변수형  (0) 2020.09.18
c# 에서 hex string을 숫자로 변환하기  (0) 2020.09.15
c# tcp binary  (0) 2020.09.14
Posted by 구차니
Programming/c# & winform2020. 9. 18. 17:30

unsigned가 사라졌고

char 형은 unicode string이다 -_-

 

byte가 unsigned char를 대체하고

sbyte가 signed char를 대체하게 된다.

 

ushort, ulong, uint 형을 제공하지 unsigned 키워드는 삭제

 

[링크 : https://docs.microsoft.com/ko-kr/dotnet/csharp/language-reference/language-specification/types]

'Programming > c# & winform' 카테고리의 다른 글

c# checked , unchecked  (0) 2020.09.21
c#(mono) on ubuntu  (0) 2020.09.21
c# 에서 hex string을 숫자로 변환하기  (0) 2020.09.15
c# tcp binary  (0) 2020.09.14
c# 에서 함수 인자로 포인터 사용을 못함?  (0) 2020.09.14
Posted by 구차니
Programming/node.js2020. 9. 16. 10:31

jsmpeg의 경우 mpeg1ts를 이용하여 화질이 좀 아쉬워서

h.264를 지원하면 좋을것 같아서 찾아보니 broadway라는 것이 걸려나왔다.

 

요즘은 크롬으로 대동단결에 하드웨어 h.264는 기본 제공에 가깝고 webgl 가속이면 전체 cpu 사용율도 떨어질테니

좋을것 같긴한데.. 제약사항을 좀 더 봐야 할 듯

 

jsmpeg 처럼 websocket 등으로 스트리밍을 재생을 못하고 전체 파일을 받아야만 한다면 좀 곤란한데..

The video player first needs to download the entire video before it can start playing, thus appearing to be a bit slow at first, so have patience.

[링크 : https://github.com/mbebenita/Broadway]

    [링크 : https://github.com/wangdxh/websocketvideostream]

'Programming > node.js' 카테고리의 다른 글

ubuntu 18.04 / nodej.s 18.x 실패  (0) 2022.05.19
웹소켓  (0) 2022.03.25
node.js array.sort() 주의사항  (0) 2020.02.01
node.js postgresql transaction  (0) 2020.01.31
for 에서 async, await  (0) 2020.01.30
Posted by 구차니
Programming/c# & winform2020. 9. 15. 10:58

라이브러리가 빵빵하니 편하네

(근데 외울게 좀 길다? ㅠㅠ)

 

string hexString = "8E2";
int num = Int32.Parse(hexString, System.Globalization.NumberStyles.HexNumber);
Console.WriteLine(num);
//Output: 2274

[링크 : https://docs.microsoft.com/.../how-to-convert-between-hexadecimal-strings-and-numeric-types]

'Programming > c# & winform' 카테고리의 다른 글

c#(mono) on ubuntu  (0) 2020.09.21
c# 변수형  (0) 2020.09.18
c# tcp binary  (0) 2020.09.14
c# 에서 함수 인자로 포인터 사용을 못함?  (0) 2020.09.14
c# winform에서 #define 대신...?  (0) 2020.09.14
Posted by 구차니
Programming/c# & winform2020. 9. 14. 19:17

아무생각없이 tcp 예제를 찾아서 했더니

문자열 스트림을 하는 예제였는지 왜 바이너리는 전송이안돼!!! 이러고 있었네 -_ㅠ

 

[링크 : https://docs.microsoft.com/ko-kr/dotnet/api/system.io.binarywriter?view=netcore-3.1]

    [링크 : https://blog.naver.com/kimsung4752/221178705895]

Posted by 구차니
Programming/c# & winform2020. 9. 14. 15:15

"포인터와 고정 크기 버퍼는 안전하지 않은 컨텍스트에서만 사용할 수 있습니다."

위와 같은 에러가 나서 찾아보는데

 

몇가지 예를 찾아보았지만 가장 c# 목적에 부합하는 건

char *data가 아니라

char[] data 인 듯?

 

자바네 자바야.. -_-

 

[링크 : https://docs.microsoft.com/ko-kr/dotnet/csharp/programming-guide/arrays/passing-arrays-as-arguments]

[링크 : https://docs.microsoft.com/ko-kr/dotnet/csharp/programming-guide/unsafe-code-pointers/]

  [링크 : https://danha.tistory.com/entry/C에서-포인터를-사용할-때는-unsafe-를-넣자]

[링크 : https://huiyu.tistory.com/entry/C-포인터와-고정-크기-버퍼는-안전하지-않은-컨텍스트에서만-사용할-수-있습니다]

'Programming > c# & winform' 카테고리의 다른 글

c# 에서 hex string을 숫자로 변환하기  (0) 2020.09.15
c# tcp binary  (0) 2020.09.14
c# winform에서 #define 대신...?  (0) 2020.09.14
c# winform - 토글 버튼 (checkbox)  (0) 2020.09.10
winform 컨트롤 변수  (0) 2020.09.10
Posted by 구차니
Programming/c# & winform2020. 9. 14. 14:49

자바 틱한데서 알아봤어야 하는데

일단 결론만 말하자면 #define과 같은 프리프로세서 지원하지 않는다.

그래서 public const 식으로 멤버 변수로 선언해야 한다.

 

[링크 : https://docs.microsoft.com/.../classes-and-structs/how-to-define-constants]

[링크 : https://midason.tistory.com/m/119?category=892934]

 

 

+

2020.10.05

안되는건 아닌데 왜 안된걸로 착각했지?

아무튼 define이 없는건 아닌데 상수를 선언할때는 enum 쓰라 정도 인가?

 

[링크 : https://docs.microsoft.com/.../csharp/language-reference/preprocessor-directives/preprocessor-define]

'Programming > c# & winform' 카테고리의 다른 글

c# tcp binary  (0) 2020.09.14
c# 에서 함수 인자로 포인터 사용을 못함?  (0) 2020.09.14
c# winform - 토글 버튼 (checkbox)  (0) 2020.09.10
winform 컨트롤 변수  (0) 2020.09.10
c# on ubuntu / mono  (0) 2020.09.10
Posted by 구차니
Programming/c# & winform2020. 9. 10. 13:57

토글 버튼은 없기에 체크박스의 표현방식(Apperance)를 Normal이 아니라 Button으로 해주면 되지만

이상태에서는 폭을 사용자가 지정할 수는 없게 된다.

 

 

그리고 해당 버튼이 눌려있는 상태인지 눌리지 않은 상태인지 확인하기 위해서는

Checked 변수를 확인하면 되고 버튼의 내용을 바꾸기 위해서는 Text 변수를 사용하면 된다.

 

        private void checkBox19_CheckedChanged(object sender, EventArgs e)
        {
            if(checkBox19.Checked == true)
            {
                // Connect
                checkBox19.Text = "Disconnect";
            }
            else
            {
                // Disconnect
                checkBox19.Text = "Connect";
            }
        }

 

[링크 : https://bemeal2.tistory.com/263]

[링크 : https://docs.microsoft.com/ko-kr/dotnet/api/system.windows.forms.checkbox.checked?view=netcore-3.1]

'Programming > c# & winform' 카테고리의 다른 글

c# 에서 함수 인자로 포인터 사용을 못함?  (0) 2020.09.14
c# winform에서 #define 대신...?  (0) 2020.09.14
winform 컨트롤 변수  (0) 2020.09.10
c# on ubuntu / mono  (0) 2020.09.10
winform에서 winsock 사용하기  (0) 2020.09.09
Posted by 구차니
Programming/c# & winform2020. 9. 10. 13:16

MFC에서는 변수를 일일이 추가해주지 않으면

GetDlgItem("IDC_TEXT1") 이런식으로 받아왔어야 하는데

변수까지는 자동으로 추가되서 매우 편하게 쓸 수 있게 변했네

(솔찍히 그거 보단 GUI 까지 무료로 풀어주는 대인배로 바뀐거 더 크지만?)

 

[링크 : https://yaraba.tistory.com/248]

Posted by 구차니
Programming/c# & winform2020. 9. 10. 11:18

mono를 이용해서 winform도 돌릴수 있다고 하는데

개발 환경 자체는 visual studio community를 끌어갈순 없는건가?

 

[링크 : https://markheath.net/post/running-windows-forms-on-linux-with-mono]

[링크 : https://www.mono-project.com/docs/gui/winforms/]

Posted by 구차니