> 사용법

글쓰기 -> 코드블럭

 

코드블럭 사용법 C++ 로 선택하면되고 C#과 크게 차이 없음


> 적용법 

 

적용하면 코드블럭 쉽게 사용가능

 

(티스토리 플러그인 사용해도 되지만 좌측 라인넘버라던가 뭔가 불편해서 직접 CDN 적용) 

코드블럭  변경1


> 전체 드래그해서 복붙

<!-- 색상 등 css파일 -->
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.0.2/styles/atelier-dune-dark.min.css">
<!-- 하이라이트 적용 -->
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.0.2/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<!-- 코드 줄 번호 적용 -->
<script src="//cdnjs.cloudflare.com/ajax/libs/highlightjs-line-numbers.js/2.7.0/highlightjs-line-numbers.min.js"></script>
<script>hljs.initLineNumbersOnLoad();</script>
<!-- 코드 블럭 내 폰트 [종류] 및 [폰트크기] 변경 -->
<link href='https://fonts.googleapis.com/css?family=Fira Mono' rel='stylesheet'>
<style>
pre>code {
font-family: 'Fira Mono' !important;
font-size: 14px !important;
}
</style>

 

복붙 후


> 폰트 종류 및 크기 변경

폰트 종류 확인 - 가독성 좋은 Mono 타입 중에 선택 추천

https://fonts.google.com/?category=Monospace

 

Google Fonts

Making the web more beautiful, fast, and open through great typography

fonts.google.com

 

IBM Plex Mono  추천

 


> 코드블럭 테마 변경

https://highlightjs.org/static/demo/

 

highlight.js demo

 

highlightjs.org

 

맘에 드는 테마를 확인 한다.

 

위에 테마 붙여넣기 한  Html 편집하는 부분  css파일 이름을 바꿔주면 된다. 

※ 위의 테마명에서 대문자소문자띄어쓰기- 로변경한다.    Atom One Drak → atom-one-dark

styles/      .min.css      사이에 변환한 테마명을 넣고 저장하면 끝

 

 


- 좀 더 쉽게 활용 할 수 있는 방법 있으시면 공유 해주세요.

프로퍼티에 관리 파일이 있다.

 

 

 

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace _20200502
{
public partial class form : Form
{
public form()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
Version version = Assembly.GetEntryAssembly().GetName().Version;
this.Text = "Title: "+ version;
}
}
}

 위 프로퍼티의 어셈블리 버전 불러와 타이틀에 적용시킬수 있다.

 

 


> 예제 1

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace _20200502
{
public partial class form : Form
{
public form()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
string title = "lion";
DateTime buildDate = Convert.ToDateTime("2020-04-30");
Version version = Assembly.GetEntryAssembly().GetName().Version;
this.Text = string.Format("{0} Ver {1}.{2} / Build Time ({3})",
title,
version.Major, version.Minor,
buildDate.ToString("yyyy-MM-dd")
);
}
}
}

 

'■ c# > WinForm' 카테고리의 다른 글

[winform] - ICON 프로그래실행 아이콘 / 폼 아이콘  (0) 2020.05.02

> 프로그램 실행 아이콘 설정

솔루션, 우클릭 속성

 

 


 

> 폼 상단 아이콘 설정

폼 선택

 

'■ c# > WinForm' 카테고리의 다른 글

[winform] - 타이틀 버전 관리  (0) 2020.05.02

+ Recent posts