public static void RaiseFilePinned(FileViewModel viewModel)
 {
     Ensure.NotNull(viewModel, "viewModel");
     if (FilePinned != null)
         FilePinned(viewModel);
 }
        private void RunSolution(ApplicationViewModel application, FileViewModel file)
        {
            if (application != null)
            {
                if (settings.IsLastUsedApplicationSavedAsPrefered)
                {
                    if (application.Path != settings.PreferedApplicationPath)
                    {
                        settings.PreferedApplicationPath = application.Path;
                        settings.Save();
                    }
                }
                else
                {
                    TrySelectPreferedApplication();
                }

                processService.Run(application, file);

                if (isClosedAfterStartingProcess)
                    Close();
            }
        }
 private void OnFilePinned(FileViewModel viewModel)
 {
     if (ViewModel != null)
     {
         // Update sorting.
         ICollectionView filesView = CollectionViewSource.GetDefaultView(ViewModel.Files);
         if (filesView != null)
             filesView.Refresh();
     }
 }
        private void OnFilePinned(FileViewModel viewModel)
        {
            HashSet<string> pinnedFiles = GetPinnedFiles();
            if (viewModel.IsPinned)
                pinnedFiles.Add(viewModel.Path);
            else
                pinnedFiles.Remove(viewModel.Path);

            Settings.Default.PinnedFiles = String.Join(";", pinnedFiles);
            Settings.Default.Save();
        }