style.css

/*TEST*/
h5{
	color:#FF0000;
}

/* ========================== */
/*大見出しの設定*/
/* ========================== */
h2{
	color:#000000;							/* black */
	border:#008000 1px solid;				/* green */
	padding:1px 10px;						/* 境界線 内側 余白 */
	margin-bottom:0;						/* 境界線 外側 余白 */
	background-color: #99cc00;
	font-size:18px;							
}

/* ========================== */
/* 中見出しの設定  */
/* ========================== */
h3{
	color:#000000;							/* black */
	border:#008000 1px solid;			/* green */
	border-left:#008000 10px solid;			/* green */
	padding:1px 10px;						/* 境界線 内側 余白 */
	margin-bottom:0;						/* 境界線 外側 余白 */
	font-size:14px;							
}

/* ========================== */
/* id=lrad 1設定 */
/* ========================== */
#lead1{
	color:#00ffff;							/* aqua */
}

/* class="base" 設定 */
.bold{
	font-weight:bold;							/* bold */
}

/* class="lrad1" 設定 */
.lead1{
	color:#0000ff;							/* blue */
}

/* class="lrad2" 設定 */
.bold.lead2{
	color:#00ff00;							/* blue */
}

[WMI]

【WMIオブジェクト(クラス)一覧】

PS > gwmi -list

PS >gwmi -list -Computername .
PS >gwmi -list -Computername localhost
PS >gwmi -list -Computername 192.168.0.1

【クラスのプロパティ】
PS> gwmi -Class Win32_OperatingSystem | Get-Member
PS> Get-WmiObject Win32_OperatingSystem | Get-Member -membertype properties

【全プロパティ表示】
PS> gwmi -Class Win32_OperatingSystem | Format-List *

【指定プロパティ表示】
■LIST
PS> gwmi -Class Win32_OperatingSystem | Format-List Description

■TABLE
PS> gwmi -Class Win32_OperatingSystem | Format-Table Description

【出力】
■CSV
Get-WmiObject -Class Win32_OperatingSystem –ComputerName . | Select-Object Name | Export-Csv c:\OsNameList.csv -encoding Default –NoTypeInformation

■XML
Get-WmiObject -Class Win32_OperatingSystem –ComputerName . | Select-Object Name | Export-CliXML c:\OsNameList.xml

[C#][Tips][File] XML:要素値


public static void mSelectSingleNode_InnerText ()
{
    /* File */
    var xDoc = new System.Xml.XmlDocument();
    xDoc.Load(@"CustomersOrdwes.xml");

    /* Node(Single) */
   string sXPath= @"[CustomerID='GREAL']/CompanyName";
    Console.WriteLine(xDoc.SelectSingleNode(sXPath).InnerText);

}

[C#][Tips][File] XML:要素値リスト


public static void mRead_SelectNodes_InnerText()
{
    List<string> slValue = new List<string>(); 

    /* File */
    var xDoc = new System.Xml.XmlDocument();
    xDoc.Load(@"CustomersOrdwes.xml");

    /* Node(List) */
    string sXPath = @"/Root/Customers/Customer/CompanyName";
    System.Xml.XmlNodeList xNodeList = xDoc.SelectNodes(sXPath);

    /* Element */
    foreach (System.Xml.XmlNode item in xNodeList)
    {
        slValue.Add(item.InnerText);
    }

    /*  */
    slValue.ForEach(c => Console.WriteLine(c));
}

[C#][Tips][File] XML:属性値リスト


public static void mRead_SelectNodes_Attrs()
{
    List<string>  slValue = new List<string> ();

    /* File */
    var xDoc = new System.Xml.XmlDocument();
    xDoc.Load(@"D:\CustomersOrdwes.xml");

    /* Node(List) */
    string sXPath = @"/Root/Customers/Customer";
    System.Xml.XmlNodeList xNodeList = xDoc.SelectNodes(sXPath);

    /* Element-Attribute */
    string sAttrName = "CustomerID";
    foreach (System.Xml.XmlNode item in xNodeList)
    {
        foreach (System.Xml.XmlNode item_Attr in item.Attributes)
        {
            if (item_Attr.Name == sAttrName) slValue.Add((string)item_Attr.Value);
        }

    }

    /*  */
    slValue.ForEach(c => Console.WriteLine(c));

}

[C#][Tips][File] XML: 指定XPATHの属性値リスト

public static void mRead_SelectSingleNode_Attr()
{
    List<string>  slValue = new List<string> ();

    /* File */
    var xDoc = new System.Xml.XmlDocument();
    xDoc.Load(@"CustomersOrdwes.xml");

    /* Node(Single) */
    string sXPath = @"/Root/Customers/Customer[@CustomerID='GREAL']";
    var xNode = xDoc.SelectSingleNode(sXPath);

    /* Element-Attribute */
    foreach (System.Xml.XmlNode item_Attr in xNode.Attributes)
    {
        slValue.Add((string)item_Attr.Value);
    }

    /*  */
    slValue.ForEach(c => Console.WriteLine(c));

}

[C#][Tips][コントロール] マウスクリック時にテキストボックスを全選択

//=========================================
//  マウスクリック時にテキストボックスを全選択
//=========================================
private void textBox1_MouseClick(object sender, MouseEventArgs e)
{
    ((TextBox)sender).SelectAll();
}

[C#][Tips][コントロール] コントロールの有効/無効

//***********************************************************
///
/// コントロールの有効/無効
///
//***********************************************************
public static void mSetEnabledControl(Control hParent, Boolean bSetStat)
{
    // hParent 内のすべてのコントロールを列挙する
    foreach (Control cControl in hParent.Controls)
    {
        // 列挙したコントロールにコントロールが含まれている場合は再帰呼び出しする
        if (cControl.HasChildren == true)
        {
            mSetEnabledControl(cControl, bSetStat);
        }

         cControl.Enabled = bSetStat;
    }
}