コード例 #1
0
        private void Run_Click(object sender, RoutedEventArgs e)
        {
            var runPowershellWindow = new RunPowershellWindow(
                ComputersTable.SelectedItems.Cast <Computer>().ToList()
                );

            runPowershellWindow.Show();
            openWindowCount++;
            runPowershellWindow.Closed += (o, args) => openWindowCount--;
        }
コード例 #2
0
        private void ActionItem_Clicked(object sender, MouseButtonEventArgs e)
        {
            if (e.ClickCount < 2)
            {
                return;
            }
            var item = (sender as ListBoxItem)?.DataContext as ActionEntry;

            if (item?.Path != null)
            {
                var runPowershellWindow = new RunPowershellWindow(
                    ComputersTable.SelectedItems.Cast <Computer>().ToList(),
                    item.Path
                    );
                runPowershellWindow.Show();
                openWindowCount++;
                runPowershellWindow.Closed += (o, args) => openWindowCount--;
            }
        }
コード例 #3
0
 private void ActionItem_Clicked(object sender, MouseButtonEventArgs e)
 {
     if (e.ClickCount < 2)
         return;
     var item = (sender as ListBoxItem)?.DataContext as ActionEntry;
     if (item?.Path != null)
     {
         var runPowershellWindow = new RunPowershellWindow(
             ComputersTable.SelectedItems.Cast<Computer>().ToList(),
             item.Path
             );
         runPowershellWindow.Show();
         openWindowCount++;
         runPowershellWindow.Closed += (o, args) => openWindowCount--;
     }
 }
コード例 #4
0
 private void Run_Click(object sender, RoutedEventArgs e)
 {
     var runPowershellWindow = new RunPowershellWindow(
         ComputersTable.SelectedItems.Cast<Computer>().ToList()
         );
     runPowershellWindow.Show();
     openWindowCount++;
     runPowershellWindow.Closed += (o, args) => openWindowCount--;
 }