Skip to content

Instantly share code, notes, and snippets.

View masaru-b-cl's full-sized avatar

TAKANO Sho / @masaru_b_cl masaru-b-cl

View GitHub Profile
@masaru-b-cl
masaru-b-cl / Program.cs
Created April 25, 2012 08:42
http://xin9le.blogspot.jp/2011/08/tpl-13.html を外からキャンセルするかどうか指定できるように
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;
using System.Collections.Concurrent;
namespace ConsoleApplication1
{
@masaru-b-cl
masaru-b-cl / Form1.cs
Created April 26, 2012 08:20
WinFormsにて、ファンクションキーの既定の動作を握りつぶす方法
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
@masaru-b-cl
masaru-b-cl / FunctionKeyPressComponent.cs
Created April 26, 2012 08:41
こうですか?わかりません><
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
class FunctionKeyPressComponent : Component
@masaru-b-cl
masaru-b-cl / Program.cs
Created April 27, 2012 05:09
RemoveAtじゃないけどIndex指定して抜いたコレクション取得
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
@masaru-b-cl
masaru-b-cl / Program.cs
Created April 27, 2012 05:17
Index付Whereで対象を除く
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
@masaru-b-cl
masaru-b-cl / Program.cs
Created April 27, 2012 05:21
ExceptAt拡張メソッド
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
static class IEnumerableExtensions
{
public static IEnumerable<T> ExceptAt<T>(this IEnumerable<T> source, int index)
@masaru-b-cl
masaru-b-cl / CodePaddingProvider.cs
Created May 1, 2012 14:08
Validatedで値をゼロ埋めするコンポーネント試作
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
@masaru-b-cl
masaru-b-cl / Default.aspx
Created May 3, 2012 15:42
多重ポスト対策のミニマムコード
<%@ Page Language="C#" AutoEventWireup="true" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
@masaru-b-cl
masaru-b-cl / WCFServiceClientExtensions.cs
Created May 18, 2012 04:16
WCFクライアント操作をラップしたもの
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
namespace MyLibrary
{
/// <summary>
/// WCFクライアント呼び出し処理の共通的なエラー処理をラップします。
@masaru-b-cl
masaru-b-cl / Program.cs
Created May 22, 2012 05:50
エラーが起きたら初期画面再表示なWinFormsアプリケーションサンプル
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Threading;
namespace WindowsFormsApplication1
{
class MyApplicationContext : ApplicationContext
{