if (checkBox1.IsChecked == true)
System.Diagnostics.Process.Start(@"j:\abc");
if ((checkBox1.IsChecked == true) && (checkBox2.IsChecked == true))
System.Diagnostics.Process.Start(@"j:\def");
請問 如果是這樣設定  如何在選擇checkBox1 + checkBox2時不會彈出abc和def 兩個檔案  只是開def檔案
感謝
1.
if ((checkBox1.IsChecked == true) && (checkBox2.IsChecked == true)){
    System.Diagnostics.Process.Start(@"j:\def");
}else if(checkBox1.IsChecked == true){
    System.Diagnostics.Process.Start(@"j:\abc");
}
2.
if (checkBox1.IsChecked == true){
    if(checkBox2.IsChecked == true){
        System.Diagnostics.Process.Start(@"j:\def");
    }else{
        System.Diagnostics.Process.Start(@"j:\abc");
    }
}