Exemplo n.º 1
0
        private void lvwStartProc_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            var item = (sender as ListView).SelectedItem;

            if (item != null)
            {
                SomeInfo someInfo = item as SomeInfo;

                if (Directory.Exists(someInfo.PathF.DirectoryName))
                {
                    Process.Start("explorer.exe", someInfo.PathF.DirectoryName);
                }
                else
                {
                    MessageBox.Show("File path no detected");
                }

                //use the item here and pass to the new window
                // s = new NewModal(Email)item);
            }
        }
Exemplo n.º 2
0
        private void SearchFactoryContol_SecureEventHandler(object sender, ISecureInfo message)
        {
            if (message == null)
            {
                MessageBox.Show("Done");
                return;
            }

            SomeInfo someInfo = new SomeInfo();

            if (message.PathF != null)
            {
                Icon ico = Extra.IconFromFilePath(message.PathF.FullName);
                if (ico != null)
                {
                    //

                    App.Current.Dispatcher.Invoke((System.Action) delegate
                    {
                        someInfo.IconImage = ExtraImage.ToImageSource(ico);
                    });
                }
            }


            someInfo.Name  = message.Name;
            someInfo.PathF = message.PathF;
            someInfo.Type  = message.Type;
            someInfo.IsSignatureContains = message.IsSignatureContains;
            someInfo.IsCorrect           = message.IsCorrect;
            someInfo.SignCompany         = message.SignCompany;
            someInfo.CommandToRun        = message.CommandToRun;

            App.Current.Dispatcher.Invoke((System.Action) delegate
            {
                _fileSList.Add(someInfo);
            });
        }