コード例 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (listBox3.SelectedIndex < 0 || listBox2.SelectedIndex < 0)
            {
                MessageBox.Show("请选择带有隐藏信息的文件!");
                return;
            }
            FileInfo fi = listBox2.SelectedItem as FileInfo;
            AlternateDataStreamInfo ai = listBox3.SelectedItem as AlternateDataStreamInfo;
            string fullname            = fi.FullName + ":" + ai.Name;

            ADSHelper.ExecADSFile(fullname);
        }
コード例 #2
0
        private void listBox2_SelectedIndexChanged(object sender, EventArgs e)
        {
            int index = listBox2.SelectedIndex;

            if (index >= 0)
            {
                listBox3.Items.Clear();
                FileInfo fi = listBox2.Items[index] as FileInfo;
                if (fi != null)
                {
                    var ais = ADSHelper.ListADSFile(fi.FullName);
                    if (ais != null)
                    {
                        foreach (var ai in ais)
                        {
                            listBox3.Items.Add(ai);
                        }
                    }
                }
            }
        }