Skip to content

Instantly share code, notes, and snippets.

View mrgarita's full-sized avatar

Shuichi Takeda mrgarita

View GitHub Profile
@mrgarita
mrgarita / Form1.cs
Created November 6, 2017 08:07
C#:8パズルをコントロール配列を使って作ってみる
using System;
using System.Windows.Forms;
namespace _9puzzle
{
public partial class Form1 : Form
{
// 9つのボタンを配列化するためのコントロール変数
Control[] cell = new Control[9];
@mrgarita
mrgarita / Form1.cs
Created November 15, 2017 07:07
C#:外部フォルダに配置した画像をピクチャボックスに表示する
using System;
using System.Windows.Forms;
namespace 画像をピクチャボックスに表示する
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
@mrgarita
mrgarita / Form1.cs
Created November 21, 2017 01:46
英単語アプリ1:リストに単語が追加される
/*
* 英単語アプリ1
* プロトタイプ
* リストに単語が追加される
*/
using System;
using System.Collections.Generic;
using System.Windows.Forms;
@mrgarita
mrgarita / Form1.cs
Created November 21, 2017 01:50
英単語アプリ2:リストを使って単語を管理、起動時ファイル読み込み、終了時ファイル書き出し
/*
* 英単語アプリ2
* 単語リストに単語を追加する
* 終了時に単語リストの内容をファイルに書き出す
* 起動時にファイルから単語リストを読み込む
*/
using System;
using System.Collections.Generic;
using System.IO;
@mrgarita
mrgarita / Form1.cs
Last active November 21, 2017 02:00
英単語アプリ3:メニュー項目追加(終了、ABC順にソート、登録順にソート)
/*
* 英単語アプリ3
* メニュー項目を追加
* ・終了メニュー
* ・リストボックス内の単語をソートするメニューを追加
* ABC順にソート
* 登録順にソート
*/
using System;
@mrgarita
mrgarita / Form1.cs
Last active November 21, 2017 01:59
英単語アプリ4:修正機能を追加
/*
* 英単語アプリ4
* 修正機能を追加
* 単語追加用のテキストボックスを利用して修正する機能を作成
*/
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
@mrgarita
mrgarita / Program.cs
Last active February 5, 2021 08:13
MySQL接続テスト(C#コンソール)
/*
Visual Studio 2019からMySQLに接続するプログラムを作成する前の準備事項
ファイルメニューから プロジェクト > NuGet パッケージの管理(N)... を選択
参照タブを選択し「mysql」で検索して表示される「MySql.Data」をインストールする
*/
using System;
// MySQLを使うため
@mrgarita
mrgarita / Form1.cs
Created January 25, 2018 06:09
C#:ダイアログでフォルダを選択する
using System;
using System.Windows.Forms;
namespace SelectFolder
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
@mrgarita
mrgarita / index.html
Last active September 30, 2019 02:20
JavaScript:テキストボックスの文字数を得る
<!DOCTYPE html>
<html>
<head>
<!-- index.html -->
<meta charset="utf-8">
<link rel="stylesheet" href="style.css">
<title>テキストボックスの文字数を得る</title>
<meta name="viewport" content="width=device-width">
<script type="text/javascript" src="main.js"></script>
</head>
@mrgarita
mrgarita / Form1.cs
Created February 15, 2018 07:00
C#:リソースに設定した画像を表示する
using System;
using System.Windows.Forms;
namespace リソースに設定した画像を表示する
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();