Пример #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--;
            }
        }
 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--;
     }
 }
 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--;
 }