Ejemplo n.º 1
0
 private void EditSelectedItem()
 {
     if (listView.SelectedItems.Count != 0)
     {
         var imagesDetail = (ImageData)listView.SelectedItems[0];
         var path         = treeViewMachinesAndTasksHandler.GetNodePath() + "\\" + imagesDetail.Name + ".my";
         if (!imagesDetail.ImageSource.Contains("Folder.ico"))
         {
             var imageOptionsDialog = new ImageOptions();
             foreach (ImageData item in listView.Items)
             {
                 if (imagesDetail.Name != item.Name)
                 {
                     imageOptionsDialog.Names.Add(item.Name);
                 }
             }
             imageOptionsDialog.baseImage = baseImage;
             imageOptionsDialog.path      = path;
             imageOptionsDialog.nodePath  = treeViewMachinesAndTasksHandler.GetNodePath();
             imageOptionsDialog.ShowDialog();
             listViewBrowseImagesHandler.Refresh();
             listViewBrowseImagesHandler.SelectItemByName(imageOptionsDialog.textBoxImageName.Text);
         }
         else
         {
             treeViewMachinesAndTasksHandler.SetTreeNode(imagesDetail.Name);
         }
     }
 }
Ejemplo n.º 2
0
        private void listViewMachineGroups_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            var selectedItem = (ComputerDetailsData)listViewMachineGroups.SelectedItem;

            if (selectedItem != null)
            {
                var path = treeViewMachinesAndTasksHandler.GetNodePath() + "\\" + selectedItem.Name;
                if (!selectedItem.ImageSource.Contains("Folder"))
                {
                    var dialogComputerDetails = new ComputerDetails();
                    dialogComputerDetails.computerPath = path;
                    dialogComputerDetails.ShowDialog();
                }
                else
                {
                    treeViewMachinesAndTasksHandler.SetTreeNode(selectedItem.Name);
                }
            }
        }
Ejemplo n.º 3
0
 private void listView_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
 {
     if (listView.SelectedItems.Count != 0)
     {
         var computerDetail = (ComputerDetailsData)listView.SelectedItems[0];
         var path           = treeViewMachinesAndTasksHandler.GetNodePath() + "\\" + computerDetail.Name;
         if (!computerDetail.ImageSource.Contains("Folder.ico"))
         {
             var dialogComputerDetails = new ComputerDetails();
             dialogComputerDetails.computerPath = path;
             dialogComputerDetails.ShowDialog();
         }
         else
         {
             treeViewMachinesAndTasksHandler.SetTreeNode(computerDetail.Name);
             listView.SelectAll();
         }
     }
 }