Beispiel #1
0
        private void propertiesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int count = listView1.SelectedItems.Count;

            if (count == 1)
            {
                ListViewItem item = listView1.SelectedItems[0];
                string       path = getCurrDir() + item.Text;

                FileAttr.ShowFileProperties(path);
            }
        }
        // 关于使用
        // 1、书上的例子在 .NetCore 版本中已经没有了
        // 2、核心优势在于:可以复合多个值,通过 位操作符 表示出来,然后和获取的值比较。
        private void F1()
        {
            FileAttr attr = FileAttr.Hidden | FileAttr.ReadOnly & FileAttr.Normal;

            Console.WriteLine(attr);
        }