Пример #1
0
 private void OpenContentFileExecute(object parameter)
 {
     parameter = parameter ?? SelectedItem;
     if (parameter is PackageFile file)
     {
         FileHelper.OpenFileInShell(file, UIServices);
     }
 }
        private void OpenContentFileExecute(object parameter)
        {
            parameter = parameter ?? SelectedItem;
            var file = parameter as PackageFile;

            if (file != null)
            {
                FileHelper.OpenFileInShell(file, UIServices);
            }
        }
Пример #3
0
 private void OpenContentFileExecute(object parameter)
 {
     try
     {
         parameter = parameter ?? SelectedItem;
         if (parameter is PackageFile file)
         {
             FileHelper.OpenFileInShell(file, UIServices);
         }
     }
     catch (Exception e)
     {
         UIServices.Show(e.Message, MessageLevel.Error);
     }
 }
        private void OpenContentFileExecute(object?parameter)
        {
            DiagnosticsClient.TrackEvent("PackageViewModel_OpenContentFileExecute");

            try
            {
                parameter ??= SelectedItem;
                if (parameter is PackageFile file)
                {
                    FileHelper.OpenFileInShell(file, UIServices);
                }
            }
            catch (Exception e)
            {
                UIServices.Show(e.Message, MessageLevel.Error);
            }
        }