Interaction logic for ProcessDialog.xaml
Beispiel #1
0
        private void ProcListView_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            var listView = (ListView)sender;
            var item     = listView.ContainerFromElement((DependencyObject)e.OriginalSource) as ListViewItem;

            if (item != null)
            {
                int index = this.ProcListView.SelectedIndex;
                SelectedProc      = (ProcDate)this.ProcListView.SelectedItem;
                this.DialogResult = true;
            }
        }
        private void ProcListView_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            var listView = (ListView)sender;
            var item     = listView.ContainerFromElement((DependencyObject)e.OriginalSource) as ListViewItem;

            if (item != null)
            {
                int index = this.ProcListView.SelectedIndex;
                SelectedProc = (ProcDate)this.ProcListView.SelectedItem;
                if (System.IO.Path.GetFileName(SelectedProc.ProcPath) == "main.bin")
                {
                    var TrueSelectedProc = new ProcDate(Etupirka.Utility.ParentProcessUtilities.GetParentProcess(SelectedProc.ProcPid));
                    SelectedProc.ProcPid  = TrueSelectedProc.ProcPid;
                    SelectedProc.ProcPath = TrueSelectedProc.ProcPath;
                }

                this.DialogResult = true;
            }
        }
 private void ProcListView_MouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     var listView = (ListView)sender;
     var item = listView.ContainerFromElement((DependencyObject)e.OriginalSource) as ListViewItem;
     if (item != null)
     {
         int index = this.ProcListView.SelectedIndex;
         SelectedProc = (ProcDate)this.ProcListView.SelectedItem;
         this.DialogResult = true;
     }
 }