小さなファイル エクスプローラー [ListView] から選択した項目の [プロパティ] フォームを作成しようとしています [
選択したファイル/フォルダーを右クリックして [プロパティ] を選択したときの Windows のように]。
フォームには、名前、場所、タイプ、サイズ、および属性が表示されます
[WCF サービス] サーバー クライアント アプリケーションなので、独自のスレッドで開始されるMultiというメソッドからサーバーから属性を取得します。
質問は次のとおりです。 [非表示] と [読み取り専用] の属性値が異なる複数のファイルの場合、CheckState.Indeterminate を設定するにはどうすればよいですか。
WCF_Client.FM_ServiceReference.FileManagerClient client;
private void Form_MultiProp_Load(object sender, EventArgs e)
{
Thread th = new Thread(Multi);
th.Start();
}
private void GetAttributes(FileAttributes fAttributes)
{
this.Invoke((MethodInvoker)delegate
{
if (fAttributes != 0)
{
if ((fAttributes & FileAttributes.Hidden) == FileAttributes.Hidden)
Hidden.Checked = true;
if ((fAttributes & FileAttributes.ReadOnly) == FileAttributes.ReadOnly)
ReadOnly.Checked = true;
}
});
}
public void Multi()
{
foreach (Item item in itemCollection)
{
GetAttributes(client.GetAttributeOfPath(item.Path));
}
}