Пример #1
0
        void MI_Trigger(object sender, EventArgs e)
        {
            if (TB_CurrentIP.Text != "TextBox")
            {
                System.Windows.Controls.MenuItem mi = sender as System.Windows.Controls.MenuItem;
                lv_ip_item = (LV_IP_Item)LV_IP.SelectedItem;
                //ZKPList = new ZkplayPlayList(this, lv_ip_item.IP, lv_ip_item.PlusbeZK);
                //ZKPList.GetConfig();
                switch (mi.Header.ToString())
                {
                case "播放":
                    Zkplay_Play(sender, e);
                    break;

                case "上传":
                    lib.OpenFileDialog _OpenFileDialog = new lib.OpenFileDialog("LV_ZkplayPlayList");
                    string[]           filenames       = (string[])_OpenFileDialog.Browser();
                    ZKPList.Add(filenames);
                    foreach (LV_IP_Item item in CSV)
                    {
                        item.IsChecked = false;
                    }
                    CSV.Single(x => x.IP == lv_ip_item.IP).IsChecked = true;
                    TB_Batch_Destination.Text = lv_ip_item.PlusbeZK + @"\UploadFiles\";
                    PsExec_Exec("PsExec_CopyOnly");
                    break;

                case "删除":
                    ZKPList.Del(LV_ZkplayPlayList.SelectedIndex);
                    break;
                }
            }
        }
Пример #2
0
 private void BTN_IP_BROWSER(object sender, EventArgs e)
 {
     BTN_Name_IP_ReFresh.IsEnabled = true;
     lib.OpenFileDialog _OpenFileDialog = new lib.OpenFileDialog("TB_IP");
     string[]           filenames       = (string[])_OpenFileDialog.Browser();
     if (filenames.Length > 0)
     {
         TB_IP_FILE.Text   = filenames[0];
         CSV               = CsvUtils.Read(TB_IP_FILE.Text);
         LV_IP.ItemsSource = CSV;
         CsvUtils.Refresh(CSV);
         TB_Status_Change();
     }
 }