├── .gitignore
├── FAP.Application
├── ApplicationCore.cs
├── ApplicationModule.cs
├── Controllers
│ ├── BrowserController.cs
│ ├── CompareController.cs
│ ├── ConnectionController.cs
│ ├── ConversationController.cs
│ ├── DownloadQueueController.cs
│ ├── InterfaceController.cs
│ ├── PopupWindowController.cs
│ ├── SearchController.cs
│ ├── SettingsController.cs
│ ├── SharesController.cs
│ └── WatchdogController.cs
├── FAP.Application.csproj
├── Properties
│ └── AssemblyInfo.cs
├── ViewModel
│ ├── BrowserViewModel.cs
│ ├── CompareViewModel.cs
│ ├── ConversationViewModel.cs
│ ├── DownloadQueueViewModel.cs
│ ├── InterfaceSelectionViewModel.cs
│ ├── MainWindowViewModel.cs
│ ├── MessageBoxViewModel.cs
│ ├── PopUpWindowTab.cs
│ ├── PopupWindowViewModel.cs
│ ├── QueryViewModel.cs
│ ├── SearchViewModel.cs
│ ├── SettingsViewModel.cs
│ ├── SharesViewModel.cs
│ ├── TrayIconViewModel.cs
│ ├── UserInfoViewModel.cs
│ └── WebViewModel.cs
├── Views
│ ├── IBrowserView.cs
│ ├── ICompareView.cs
│ ├── IConverstationView.cs
│ ├── IDownloadQueue.cs
│ ├── IInterfaceSelectionView.cs
│ ├── ILogView.cs
│ ├── IMainWindow.cs
│ ├── IMessageBoxView.cs
│ ├── IPopupWindow.cs
│ ├── IQuery.cs
│ ├── ISearchView.cs
│ ├── ISettingsView.cs
│ ├── ISharesView.cs
│ ├── ITrayIconView.cs
│ ├── IUserInfo.cs
│ └── IWebPanel.cs
└── packages.config
├── FAP.Domain
├── DomainModule.cs
├── Entities
│ ├── BaseEntity.cs
│ ├── CompareNode.cs
│ ├── Conversation.cs
│ ├── DownloadQueue.cs
│ ├── DownloadRequest.cs
│ ├── FileSystem
│ │ ├── BrowsingFile.cs
│ │ ├── Directory.cs
│ │ └── File.cs
│ ├── ITransferWorker.cs
│ ├── Legacy
│ │ └── Model.cs
│ ├── Model.cs
│ ├── Network.cs
│ ├── NetworkInterface.cs
│ ├── Node.cs
│ ├── Overlord.cs
│ ├── SearchResult.cs
│ ├── ServerUploadToken.cs
│ ├── Share.cs
│ ├── TransferLog.cs
│ └── TransferSession.cs
├── Enums.cs
├── FAP.Domain.csproj
├── Handlers
│ ├── FAPClientHandler.cs
│ ├── FAPFileUploader.cs
│ ├── FAPServerHandler.cs
│ ├── HTTPFileUploader.cs
│ ├── HTTPHandler.cs
│ └── IFAPHandler.cs
├── Net
│ ├── Client.cs
│ ├── ClientStream.cs
│ ├── DetectedNode.cs
│ ├── LANPeerFinderService.cs
│ ├── LanPeer.cs
│ ├── NetworkSpeedMeasurement.cs
│ └── Uplink.cs
├── Properties
│ └── AssemblyInfo.cs
├── Services
│ ├── BonjourAnnouncerService.cs
│ ├── BufferService.cs
│ ├── DownloadWorkerService.cs
│ ├── Listener.cs
│ ├── LogService.cs
│ ├── OverlordManagerService.cs
│ ├── ServerUploadLimiterService.cs
│ ├── ShareInfoService.cs
│ ├── TemplateEngine.cs
│ └── UpdateCheckerService.cs
├── Verbs
│ ├── BaseVerb.cs
│ ├── BrowseVerb.cs
│ ├── ChatVerb.cs
│ ├── CompareVerb.cs
│ ├── ConnectVerb.cs
│ ├── ConversationVerb.cs
│ ├── IVerb.cs
│ ├── InfoVerb.cs
│ ├── LocalDownload.cs
│ ├── Multicast
│ │ ├── HelloVerb.cs
│ │ └── WhoVerb.cs
│ ├── SearchVerb.cs
│ └── UpdateVerb.cs
├── Web.Resources
│ ├── css
│ │ └── fap.css
│ ├── favicon.ico
│ ├── images
│ │ ├── back_disabled.jpg
│ │ ├── back_enabled.jpg
│ │ ├── fap.png
│ │ ├── folder.png
│ │ ├── forward_disabled.jpg
│ │ ├── forward_enabled.jpg
│ │ ├── sort_asc.png
│ │ ├── sort_asc_disabled.png
│ │ ├── sort_both.png
│ │ ├── sort_desc.png
│ │ └── sort_desc_disabled.png
│ ├── js
│ │ ├── jquery-1.5.2.min.js
│ │ └── jquery.dataTables.min.js
│ └── template.html
└── packages.config
├── FAP.Foundation
├── AsyncControllerBase.cs
├── AsyncOperation.cs
├── BackgroundSafeObservable.cs
├── BaseEntity.cs
├── FAP.Foundation.csproj
├── FilteredObservableCollection.cs
├── IconHelper.cs
├── MemoryBuffer.cs
├── Networking
│ ├── AsyncSocket.cs
│ ├── AsyncSocketSession.cs
│ └── NetworkBufferManager.cs
├── ObservableCollectionEx.cs
├── Properties
│ └── AssemblyInfo.cs
├── RegexEx.cs
├── RegistryHelper.cs
├── RegistryServices
│ └── RegisterProtocolService.cs
├── SafeDictionary.cs
├── SafeFilteredObservingCollection.cs
├── SafeObservable.cs
├── SafeObservedCollection.cs
├── SafeObservingCollection.cs
├── SambaShare.cs
├── Services
│ ├── IDService.cs
│ └── SingleInstanceService.cs
├── SimpleCrypt.cs
├── Sorting
│ ├── MergeSort.cs
│ ├── QuickSort.cs
│ └── TreeSort.cs
├── StreamTokenizer.cs
├── SystemInfo.cs
├── TreeViewItemViewModel.cs
├── Utility.cs
├── WMI_Prototypes
│ ├── Win32_BIOS.cs
│ ├── Win32_BaseBoard.cs
│ ├── Win32_LogicalDisk.cs
│ ├── Win32_NetworkAdapter.cs
│ ├── Win32_PhysicalMemory.cs
│ ├── Win32_Processor.cs
│ ├── Win32_SoundDevice.cs
│ └── Win32_VideoController.cs
└── packages.config
├── FAP.Network
├── Base32Encoder.cs
├── Entities
│ └── NetworkRequest.cs
├── FAP.Network.csproj
├── Multiplexor.cs
├── NetworkModule.cs
├── Properties
│ └── AssemblyInfo.cs
├── Server
│ └── NodeServer.cs
├── Services
│ ├── MulticastClientService.cs
│ ├── MulticastCommon.cs
│ └── MulticastServerService.cs
└── packages.config
├── Fap.sln
├── Installer
├── FAP.isl
├── FAP.isproj
├── FAP.sln
└── SFX
│ ├── 7zsd.sfx
│ ├── Create SFX.bat
│ └── config.txt
├── Licences
├── Autofac License.txt
├── FAP Licence.txt
├── HTTP Server Licence.txt
├── Icon Licence.txt
├── Json.NET Licence.txt
├── LinqToWmi Licence.txt
├── Messagebox Licence.txt
├── Odyssey Licence.txt
├── StringTemplate Licence.txt
├── Wpf Application Framework Licence.txt
└── protoc-license.txt
├── Readme.md
├── UI
├── Client.Console
│ ├── Client.Console.csproj
│ ├── Program.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── app.config
├── Client.WPF
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── BinaryImageConverter.cs
│ ├── Converters.cs
│ ├── FAPconverters.cs
│ ├── Fap.Presentation.csproj
│ ├── FlashWindow.cs
│ ├── FolderItem.cs
│ ├── GUIModule.cs
│ ├── GridViewSort.cs
│ ├── Helper.cs
│ ├── Images
│ │ ├── Chart Bar.png
│ │ ├── Cog.png
│ │ ├── Default_Avatar.png
│ │ ├── Download.png
│ │ ├── Drawer Closed.png
│ │ ├── Folder Sync.png
│ │ ├── Search.png
│ │ ├── Upload.png
│ │ ├── folder-yellow.ico
│ │ ├── folder.png
│ │ ├── newtab.ico
│ │ ├── originals
│ │ │ └── defaultavatar.png
│ │ ├── splash screens
│ │ │ ├── 1209850323723.jpg
│ │ │ ├── 1242976218726.jpg
│ │ │ ├── 1243840487105.jpg
│ │ │ ├── 1253754897671.jpg
│ │ │ ├── 1256029184403.jpg
│ │ │ └── 1274249428281.jpg
│ │ └── src.txt
│ ├── InputWindow.xaml
│ ├── InputWindow.xaml.cs
│ ├── InterfaceSelection.xaml
│ ├── InterfaceSelection.xaml.cs
│ ├── ListBoxAutoScroll.cs
│ ├── ListViewCustomComparer.cs
│ ├── ListViewSorter.cs
│ ├── MainWindow.xaml
│ ├── MainWindow.xaml.cs
│ ├── MessageBox.xaml
│ ├── MessageBox.xaml.cs
│ ├── NLog.config
│ ├── Panels
│ │ ├── BrowePanelFileImageConverter.cs
│ │ ├── BrowsePanel.xaml
│ │ ├── BrowsePanel.xaml.cs
│ │ ├── ComparePanel.xaml
│ │ ├── ComparePanel.xaml.cs
│ │ ├── Conversation.xaml
│ │ ├── Conversation.xaml.cs
│ │ ├── DownloadQueue.xaml
│ │ ├── DownloadQueue.xaml.cs
│ │ ├── IsNullConverter.cs
│ │ ├── LogPanel.xaml
│ │ ├── LogPanel.xaml.cs
│ │ ├── SearchPanel.xaml
│ │ ├── SearchPanel.xaml.cs
│ │ ├── SettingsPanel.xaml
│ │ ├── SettingsPanel.xaml.cs
│ │ ├── SharesPanel.xaml
│ │ ├── SharesPanel.xaml.cs
│ │ ├── UserInfoPanel.xaml
│ │ ├── UserInfoPanel.xaml.cs
│ │ ├── WebPanel.xaml
│ │ └── WebPanel.xaml.cs
│ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
│ ├── Query.cs
│ ├── Services
│ │ └── IconService.cs
│ ├── SessionTypeConverter.cs
│ ├── SortableListView.cs
│ ├── SpaceFormatter.cs
│ ├── TabControl.cs
│ ├── TabControlEx.cs
│ ├── TabEventArgs.cs
│ ├── TabItem.cs
│ ├── TabPanel.cs
│ ├── TabWindow.xaml
│ ├── TabWindow.xaml.cs
│ ├── Themes
│ │ └── Generic.xaml
│ ├── TrayIcon.cs
│ ├── Web.Help
│ │ ├── css
│ │ │ ├── ie.css
│ │ │ ├── print.css
│ │ │ └── screen.css
│ │ ├── help.html
│ │ └── images
│ │ │ ├── Chart Bar.png
│ │ │ ├── Cog.png
│ │ │ ├── Drawer Closed.png
│ │ │ ├── Folder Sync.png
│ │ │ ├── Search.png
│ │ │ ├── client.png
│ │ │ └── web.png
│ ├── Window1.xaml
│ ├── Window1.xaml.cs
│ ├── app.config
│ ├── merge.bat
│ └── packages.config
└── Server.Console
│ ├── InterfaceSelectionView.cs
│ ├── MessageService.cs
│ ├── NLog.config
│ ├── Program.cs
│ ├── Properties
│ └── AssemblyInfo.cs
│ ├── Query.cs
│ ├── Server.Console.csproj
│ ├── SharesView.cs
│ ├── app.config
│ ├── folder-yellow.ico
│ └── packages.config
├── Web
└── updates.php
└── libs
├── Autofac
├── Autofac License.txt
├── Autofac.Configuration.dll
├── Autofac.Integration.Wcf.dll
├── Autofac.Integration.Web.dll
├── Autofac.XML
└── Autofac.dll
├── Bonjour
└── Interop.Bonjour.dll
├── HttpServer
├── ArrayParameterCollection.cs
├── Authentication
│ ├── AuthenticationProvider.cs
│ ├── BasicAuthentication.cs
│ ├── DigestAuthentication.cs
│ ├── IAuthenticationProvider.cs
│ ├── IAuthenticator.cs
│ └── IUserProvider.cs
├── AuthenticationRequiredException.cs
├── BadRequestException.cs
├── BodyDecoders
│ ├── BodyDecoderCollection.cs
│ ├── DecodedData.cs
│ ├── IBodyDecoder.cs
│ ├── Mono
│ │ ├── HttpMultiPart.cs
│ │ └── StrUtils.cs
│ ├── MultiPartDecoder.cs
│ └── UrlDecoder.cs
├── ComponentAttribute.cs
├── ContentTypeHelper.cs
├── ErrorPageEventArgs.cs
├── ExceptionEventArgs.cs
├── ForbiddenException.cs
├── HTTPContextManager.cs
├── Headers
│ ├── AuthorizationHeader.cs
│ ├── CacheControl.cs
│ ├── ConnectionHeader.cs
│ ├── ContentTypeHeader.cs
│ ├── CookieHeader.cs
│ ├── DateHeader.cs
│ ├── HeaderCollection.cs
│ ├── HeaderFactory.cs
│ ├── HeaderParameterCollection.cs
│ ├── IHeader.cs
│ ├── IHeaderCollection.cs
│ ├── NumericHeader.cs
│ ├── Parsers
│ │ ├── AuthorizationParser.cs
│ │ ├── ConnectionParser.cs
│ │ ├── ContentTypeParser.cs
│ │ ├── CookieParser.cs
│ │ ├── DateParser.cs
│ │ ├── IHeaderParser.cs
│ │ ├── NumericHeaderParser.cs
│ │ ├── ParserForAttribute.cs
│ │ └── StringParser.cs
│ └── StringHeader.cs
├── Helpers
│ └── PropertyAssigner.cs
├── HttpContext.cs
├── HttpException.cs
├── HttpFactory.cs
├── HttpFile.cs
├── HttpFileCollection.cs
├── HttpListener.cs
├── HttpServer.csproj
├── HttpServer.csproj.user
├── IHttpContext.cs
├── IHttpFactory.cs
├── IHttpListener.cs
├── IMessage.cs
├── IParameterCollection.cs
├── IRequest.cs
├── IResponse.cs
├── IServiceResolver.cs
├── InternalServerException.cs
├── Logging
│ ├── ConsoleLogFactory.cs
│ ├── ConsoleLogger.cs
│ ├── ILogFactory.cs
│ ├── ILogFilter.cs
│ ├── ILogger.cs
│ ├── LogFactory.cs
│ ├── LogFilter.cs
│ ├── LogLevel.cs
│ ├── NullLogFactory.cs
│ └── NullLogWriter.cs
├── Messages
│ ├── FactoryRequestEventArgs.cs
│ ├── MessageFactory.cs
│ ├── MessageFactoryContext.cs
│ ├── Parser
│ │ ├── BodyEventArgs.cs
│ │ ├── FactoryResponseEventArgs.cs
│ │ ├── HeaderEventArgs.cs
│ │ ├── HttpParser.cs
│ │ ├── ParserException.cs
│ │ ├── RequestEventArgs.cs
│ │ ├── RequestLineEventArgs.cs
│ │ └── ResponseLineEventArgs.cs
│ ├── Request.cs
│ ├── RequestCookie.cs
│ ├── RequestCookiesCollection.cs
│ ├── Response.cs
│ ├── ResponseCookie.cs
│ ├── ResponseCookieCollection.cs
│ └── ResponseWriter.cs
├── Method.cs
├── Modules
│ ├── FileModule.cs
│ └── IModule.cs
├── NotFoundException.cs
├── ParameterCollection.cs
├── ProcessingResult.cs
├── Properties
│ └── AssemblyInfo.cs
├── RequestContext.cs
├── RequestEventArgs.cs
├── Resources
│ ├── EmbeddedResourceLoader.cs
│ ├── FileResources.cs
│ ├── IResourceLoader.cs
│ ├── IResourceProvider.cs
│ ├── Resource.cs
│ └── ResourceProvider.cs
├── Routing
│ ├── IRouter.cs
│ ├── RegExRouter.cs
│ └── SimpleRouter.cs
├── SecureHttpContext.cs
├── SecureHttpListener.cs
├── Server.cs
├── Sessions
│ ├── ISessionProvider.cs
│ ├── ISessionStore.cs
│ ├── Session.cs
│ ├── SessionFileStore.cs
│ └── SessionProvider.cs
├── SimpleServer.cs
├── SocketFilterEventArgs.cs
├── Tools
│ ├── BufferReader.cs
│ ├── ITextReader.cs
│ ├── ObjectPool.cs
│ ├── Properties
│ │ ├── CachedProperty.cs
│ │ ├── EmitHelper.cs
│ │ ├── EmitReflector.cs
│ │ └── PropertyProvider.cs
│ ├── Session.cs
│ ├── SessionProvider.cs
│ ├── StringReader.cs
│ └── UrlParser.cs
├── Transports
│ ├── ClientCertificate.cs
│ └── ResusableNetworkStream.cs
├── app.config
└── httpserver.snk
├── Json.NET
├── Newtonsoft.Json.Net35.dll
├── Newtonsoft.Json.Net35.pdb
└── Newtonsoft.Json.Net35.xml
├── LinqToWmi
├── LinqToWmi.ClassGenerator
│ ├── ArgumentParser
│ │ ├── ArgumentAttribute.cs
│ │ ├── ArgumentParseException.cs
│ │ └── ArgumentParser.cs
│ ├── Arguments.cs
│ ├── Builder
│ │ ├── CimTypeConverter.cs
│ │ ├── WmiFileGenerator.cs
│ │ └── WmiObjectQuery.cs
│ ├── LinqToWmi.ClassGenerator.csproj
│ ├── LinqToWmi.ClassGenerator.csproj.user
│ ├── Program.cs
│ └── Properties
│ │ └── AssemblyInfo.cs
├── LinqToWmi.Core
│ ├── LinqToWmi.Core.csproj
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Visitor
│ │ ├── AbstractVisitor.cs
│ │ ├── IVisitor.cs
│ │ └── VistorContext.cs
│ └── WMI
│ │ ├── IWmiQuery.cs
│ │ ├── Visitors
│ │ ├── BinaryVisitor.cs
│ │ ├── ConstantVisitor.cs
│ │ ├── MemberVisitor.cs
│ │ ├── MethodCallVisitor.cs
│ │ └── UnaryVisitor.cs
│ │ ├── WmiContext.cs
│ │ ├── WmiExtensionMethods.cs
│ │ ├── WmiMapper.cs
│ │ ├── WmiObjectEnumerator.cs
│ │ ├── WmiObjectTypeAttribute.cs
│ │ ├── WmiQuery.cs
│ │ ├── WmiQueryBuilder.cs
│ │ └── WmiQueryUtility.cs
└── LinqToWmi.Tests
│ ├── LinqToWmi.Tests.csproj
│ ├── Program.cs
│ ├── Properties
│ └── AssemblyInfo.cs
│ └── Prototypes
│ ├── Win32_ComputerSystem.cs
│ ├── Win32_LogicalDisk.cs
│ ├── Win32_NTLogEvent.cs
│ ├── Win32_PerfFormattedData_PerfOS_Memory.cs
│ ├── Win32_Process.cs
│ ├── Win32_Processor2.cs
│ └── Win32_UserAccount.cs
├── Messagebox
└── BlogsPrajeesh.BlogSpot.WPFControls.dll
├── Odyssey
├── BreadcrumbBar
│ ├── ApplyPropertiesEventArgs.cs
│ ├── BreadcrumbBar.cs
│ ├── BreadcrumbButton.cs
│ ├── BreadcrumbItem.cs
│ ├── BreadcrumbItemEventArgs.cs
│ ├── ImageButton.cs
│ └── PathConversionEventArgs.cs
├── ChangeLog.txt
├── Common
│ ├── AeroChrome.cs
│ ├── AnimationDecorator.cs
│ ├── EmptyStringVisibilityConverter.cs
│ ├── IKeyTipControl.cs
│ ├── PopupHelper.cs
│ ├── SkinId.cs
│ ├── SkinManager.cs
│ └── Skins.cs
├── Controls
│ ├── ClickableTreeView.cs
│ ├── ClickableTreeViewItem.cs
│ ├── DropDownButton.cs
│ ├── OdcButton.cs
│ └── OdcTextBox.cs
├── Effects
│ ├── GrayscaleEffect.cs
│ ├── GrayscaleEffect.fx
│ └── GrayscaleEffect.ps
├── ExplorerBar
│ ├── ExplorerBar.cs
│ ├── OdcExpander.cs
│ └── OdcExpanderHeader.cs
├── Odyssey.csproj
├── Odyssey.csproj.vspscc
├── OutlookBar
│ ├── ExpandPosition.cs
│ ├── OutlookBar.cs
│ ├── OutlookSection.cs
│ └── OverflowMenuCreatedEventArgs.cs
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
├── Ribbon
│ ├── Classes
│ │ ├── BoolConverter.cs
│ │ ├── IRibbonSize.cs
│ │ ├── ImageRenderOptions.cs
│ │ ├── NativeMethods.cs
│ │ ├── QAItemPlacement.cs
│ │ ├── QAPlacement.cs
│ │ ├── RibbonBarAlignment.cs
│ │ ├── RibbonGalleryColumns.cs
│ │ ├── RibbonGalleryColumnsCollectionConverter.cs
│ │ ├── RibbonGroupReductionOrderConverter.cs
│ │ ├── RibbonOption.cs
│ │ ├── RibbonReductionCollectionConverter.cs
│ │ ├── RibbonSize.cs
│ │ ├── RibbonSizeCollection.cs
│ │ ├── RibbonWindowCornerMode.cs
│ │ ├── RoundedCornerConverter.cs
│ │ ├── RoundedCornerResizeConverter.cs
│ │ ├── TwoLineConverter.cs
│ │ └── TwoLineTextConverter.cs
│ ├── Controls
│ │ ├── InternalGroupPanel.cs
│ │ ├── KeyTip.cs
│ │ ├── RibbonApplicationMenu.cs
│ │ ├── RibbonApplicationMenuItem.cs
│ │ ├── RibbonBar.Commands.cs
│ │ ├── RibbonBar.Handlers.cs
│ │ ├── RibbonBar.cs
│ │ ├── RibbonButton.cs
│ │ ├── RibbonButtonGroup.cs
│ │ ├── RibbonButtonStyle.cs
│ │ ├── RibbonChrome.cs
│ │ ├── RibbonComboBox.cs
│ │ ├── RibbonComboBoxItem.cs
│ │ ├── RibbonContextualTabSet.cs
│ │ ├── RibbonDropDownButton.cs
│ │ ├── RibbonFlowGroup.cs
│ │ ├── RibbonGallery.Commands.cs
│ │ ├── RibbonGallery.cs
│ │ ├── RibbonGroup.Commands.cs
│ │ ├── RibbonGroup.Handlers.cs
│ │ ├── RibbonGroup.cs
│ │ ├── RibbonMenuItem.cs
│ │ ├── RibbonQAToolBar.cs
│ │ ├── RibbonQAToolbarPanel.cs
│ │ ├── RibbonSeparator.cs
│ │ ├── RibbonSplitButton.cs
│ │ ├── RibbonTabItem.cs
│ │ ├── RibbonTabItemPanel.cs
│ │ ├── RibbonTabScroller.cs
│ │ ├── RibbonTextBox.cs
│ │ ├── RibbonThumbnail.cs
│ │ ├── RibbonToggleButton.cs
│ │ ├── RibbonToolTip.cs
│ │ ├── RibbonWindow.Commands.cs
│ │ ├── RibbonWindow.cs
│ │ └── RibbonWrapPanel.cs
│ ├── EventArgs
│ │ └── SelectedTabIndexChangedEvent.cs
│ └── Interfaces
│ │ ├── IRibbonButton.cs
│ │ ├── IRibbonControl.cs
│ │ ├── IRibbonGallery.cs
│ │ ├── IRibbonLargeControl.cs
│ │ └── IRibbonStretch.cs
├── Skins
│ ├── BlackSkin.xaml
│ ├── BlueSkin.xaml
│ ├── OutlookBar
│ │ ├── OutlookBlackSkin.xaml
│ │ ├── OutlookBlueSkin.xaml
│ │ ├── OutlookSilverSkin.xaml
│ │ └── Win7Skin.xaml
│ ├── Ribbon
│ │ ├── OfficeBlackSkin.xaml
│ │ ├── OfficeBlueSkin.xaml
│ │ ├── OfficeSilverSkin.xaml
│ │ ├── VistaSkin.xaml
│ │ └── Window7Skin.xaml
│ ├── SilverSkin.xaml
│ ├── VistaSkin.xaml
│ └── Win7Skin.xaml
├── Themes
│ ├── Aero.NormalColor.xaml
│ ├── BreadcrumbBar
│ │ ├── AeroChrome.xaml
│ │ ├── BreadcrumbButton.xaml
│ │ ├── BreadcrumbItem.xaml
│ │ ├── Brushes.xaml
│ │ ├── ButtonTemplates.xaml
│ │ ├── Generic.xaml
│ │ ├── OdcTextBox.xaml
│ │ └── ProgressBar.xaml
│ ├── Classic.xaml
│ ├── Controls
│ │ ├── DropDownButton.xaml
│ │ └── OdcTextBox.xaml
│ ├── Expander
│ │ ├── Aero.NormalColor.ExpandHeader.xaml
│ │ ├── Aero.NormalColor.xaml
│ │ ├── Classic.ExpandHeader.xaml
│ │ ├── Classic.xaml
│ │ ├── Generic.ExpandHeader.xaml
│ │ ├── Generic.Expander.xaml
│ │ ├── Generic.xaml
│ │ ├── Luna.Homestead.xaml
│ │ ├── Luna.Metallic.xaml
│ │ └── Luna.NormalColor.xaml
│ ├── Generic.xaml
│ ├── Luna.Homestead.xaml
│ ├── Luna.Metallic.xaml
│ ├── Luna.NormalColor.xaml
│ ├── OutlookBar
│ │ ├── Generic.xaml
│ │ ├── OutlookBar.xaml
│ │ ├── OutlookSection.xaml
│ │ └── ToggleButton.xaml
│ ├── Ribbon
│ │ ├── DefaultRibbonButtonBrushes.xaml
│ │ ├── DefaultWindowButtonStyles.xaml
│ │ ├── Generic.xaml
│ │ ├── HighlightedBackgrounds.xaml
│ │ ├── InternalRibbonButton.xaml
│ │ ├── QuickAccessKey.xaml
│ │ ├── RibbonAppMenuItem.xaml
│ │ ├── RibbonApplicationButton.xaml
│ │ ├── RibbonApplicationMenu.xaml
│ │ ├── RibbonBar.xaml
│ │ ├── RibbonButton.xaml
│ │ ├── RibbonButtonGroup.xaml
│ │ ├── RibbonChrome.xaml
│ │ ├── RibbonComboBox.xaml
│ │ ├── RibbonComboBoxItem.xaml
│ │ ├── RibbonContextualTabSet.xaml
│ │ ├── RibbonDropDownButton.xaml
│ │ ├── RibbonFlowGroup.xaml
│ │ ├── RibbonGallery.xaml
│ │ ├── RibbonGroup.xaml
│ │ ├── RibbonGroupBrushes.xaml
│ │ ├── RibbonGroupDropDownButton.xaml
│ │ ├── RibbonHLChromeStyle.xaml
│ │ ├── RibbonImages.xaml
│ │ ├── RibbonMenuItem.xaml
│ │ ├── RibbonQAToolBar.xaml
│ │ ├── RibbonSeparator.xaml
│ │ ├── RibbonSplitButton.xaml
│ │ ├── RibbonTabItem.xaml
│ │ ├── RibbonTabScroller.xaml
│ │ ├── RibbonTextBox.xaml
│ │ ├── RibbonThumbnail.xaml
│ │ ├── RibbonToggleButton.xaml
│ │ ├── RibbonToolTip.xaml
│ │ └── RibbonWindow.xaml
│ └── TreeViewStyle.xaml
└── app.config
├── StringTemplate
├── Antlr3.Runtime.Debug.dll
├── Antlr3.Runtime.dll
└── Antlr3.StringTemplate.dll
├── WpfApplicationFramework
├── Code Snippets
│ ├── Code Snippets.csproj
│ ├── Readme.txt
│ └── WAF Snippets
│ │ ├── wafpropn.snippet
│ │ ├── waftestclass.snippet
│ │ ├── wafvalconv.snippet
│ │ └── wafviewmodel.snippet
├── Documentation
│ ├── Changelog.txt
│ ├── Checklist.txt
│ └── License.txt
├── LocalTestRun.testrunconfig
├── ManagedExtensibilityFramework
│ └── System.ComponentModel.Composition.dll
├── WpfApplicationFramework.sln
├── WpfApplicationFramework.vsmdi
└── WpfApplicationFramework
│ ├── CodeAnalysisDictionary.xml
│ ├── WpfApplicationFramework.Test
│ ├── Applications
│ │ ├── ApplicationInfoTest.cs
│ │ ├── ControllerTest.cs
│ │ ├── DelegateCommandTest.cs
│ │ ├── Pop3SettingsViewModelTest.cs
│ │ ├── Services
│ │ │ ├── FileDialogResultTest.cs
│ │ │ ├── FileDialogServiceExtensionsTest.cs
│ │ │ └── FileTypeTest.cs
│ │ ├── ViewExtensionsTest.cs
│ │ └── ViewModelTest.cs
│ ├── Foundation
│ │ └── ModelTest.cs
│ ├── Presentation
│ │ └── Services
│ │ │ ├── FileDialogServiceTest.cs
│ │ │ └── MessageServiceTest.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── UnitTesting
│ │ ├── AssertExceptionTest.cs
│ │ ├── CanExecuteChangedEventTest.cs
│ │ ├── ExpectedExceptionTest.cs
│ │ └── PropertyChangedEventTest.cs
│ └── WpfApplicationFramework.Test.csproj
│ ├── WpfApplicationFramework.UnitTesting
│ ├── AssertException.cs
│ ├── AssertHelper.cs
│ ├── GlobalSuppressions.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── WpfApplicationFramework.UnitTesting.csproj
│ └── WpfApplicationFramework
│ ├── Applications
│ ├── ApplicationInfo.cs
│ ├── CollectionChangedEventListener.cs
│ ├── Controller.cs
│ ├── DelegateCommand.cs
│ ├── DispatcherHelper.cs
│ ├── IView.cs
│ ├── PropertyChangedEventListener.cs
│ ├── Services
│ │ ├── FileDialogResult.cs
│ │ ├── FileDialogServiceExtensions.cs
│ │ ├── FileType.cs
│ │ ├── IFileDialogService.cs
│ │ └── IMessageService.cs
│ ├── ViewExtensions.cs
│ ├── ViewModel.Generic.cs
│ └── ViewModel.cs
│ ├── Foundation
│ └── Model.cs
│ ├── GlobalSuppressions.cs
│ ├── Presentation
│ └── Services
│ │ ├── FileDialogService.cs
│ │ └── MessageService.cs
│ ├── Properties
│ └── AssemblyInfo.cs
│ ├── WafConfiguration.cs
│ └── WpfApplicationFramework.csproj
└── protobuf-net
└── protobuf-net.dll
/.gitignore:
--------------------------------------------------------------------------------
1 | ################################################################################
2 | # This .gitignore file was automatically created by Microsoft(R) Visual Studio.
3 | ################################################################################
4 |
5 | *\bin\*
6 | *\obj\*
7 | *\packages\*
8 | *.suo
--------------------------------------------------------------------------------
/FAP.Application/ViewModel/UserInfoViewModel.cs:
--------------------------------------------------------------------------------
1 | #region Copyright Kayomani 2011. Licensed under the GPLv3 (Or later version), Expand for details. Do not remove this notice.
2 |
3 | /**
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or any
7 | later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | * */
17 |
18 | #endregion
19 |
20 | using System.Waf.Applications;
21 | using FAP.Application.Views;
22 | using FAP.Domain.Entities;
23 |
24 | namespace FAP.Application.ViewModels
25 | {
26 | public class UserInfoViewModel : ViewModel
27 | {
28 | public UserInfoViewModel(IUserInfo view)
29 | : base(view)
30 | {
31 | }
32 |
33 | public Node Node { set; get; }
34 | }
35 | }
--------------------------------------------------------------------------------
/FAP.Application/ViewModel/WebViewModel.cs:
--------------------------------------------------------------------------------
1 | using System.Waf.Applications;
2 | using FAP.Application.Views;
3 |
4 | namespace FAP.Application.ViewModel
5 | {
6 | public class WebViewModel : ViewModel
7 | {
8 | public WebViewModel(IWebPanel view)
9 | : base(view)
10 | {
11 | }
12 |
13 | public string Location
14 | {
15 | set { ViewCore.Location = value; }
16 | get { return ViewCore.Location; }
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/FAP.Application/Views/IBrowserView.cs:
--------------------------------------------------------------------------------
1 | #region Copyright Kayomani 2010. Licensed under the GPLv3 (Or later version), Expand for details. Do not remove this notice.
2 |
3 | /**
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or any
7 | later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | * */
17 |
18 | #endregion
19 |
20 | using System.Waf.Applications;
21 |
22 | namespace FAP.Application.Views
23 | {
24 | public interface IBrowserView : IView
25 | {
26 | }
27 | }
--------------------------------------------------------------------------------
/FAP.Application/Views/ICompareView.cs:
--------------------------------------------------------------------------------
1 | #region Copyright Kayomani 2011. Licensed under the GPLv3 (Or later version), Expand for details. Do not remove this notice.
2 |
3 | /**
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or any
7 | later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | * */
17 |
18 | #endregion
19 |
20 | using System.Waf.Applications;
21 |
22 | namespace FAP.Application.Views
23 | {
24 | public interface ICompareView : IView
25 | {
26 | }
27 | }
--------------------------------------------------------------------------------
/FAP.Application/Views/IConverstationView.cs:
--------------------------------------------------------------------------------
1 | #region Copyright Kayomani 2011. Licensed under the GPLv3 (Or later version), Expand for details. Do not remove this notice.
2 |
3 | /**
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or any
7 | later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | * */
17 |
18 | #endregion
19 |
20 | using System.Waf.Applications;
21 |
22 | namespace FAP.Application.Views
23 | {
24 | public interface IConverstationView : IView
25 | {
26 | }
27 | }
--------------------------------------------------------------------------------
/FAP.Application/Views/IDownloadQueue.cs:
--------------------------------------------------------------------------------
1 | #region Copyright Kayomani 2010. Licensed under the GPLv3 (Or later version), Expand for details. Do not remove this notice.
2 |
3 | /**
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or any
7 | later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | * */
17 |
18 | #endregion
19 |
20 | using System.Waf.Applications;
21 |
22 | namespace FAP.Application.Views
23 | {
24 | public interface IDownloadQueue : IView
25 | {
26 | }
27 | }
--------------------------------------------------------------------------------
/FAP.Application/Views/IInterfaceSelectionView.cs:
--------------------------------------------------------------------------------
1 | #region Copyright Kayomani 2011. Licensed under the GPLv3 (Or later version), Expand for details. Do not remove this notice.
2 |
3 | /**
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or any
7 | later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | * */
17 |
18 | #endregion
19 |
20 | using System.Waf.Applications;
21 |
22 | namespace FAP.Application.Views
23 | {
24 | public interface IInterfaceSelectionView : IView
25 | {
26 | bool? ShowDialog();
27 | void Close();
28 | }
29 | }
--------------------------------------------------------------------------------
/FAP.Application/Views/ILogView.cs:
--------------------------------------------------------------------------------
1 | #region Copyright Kayomani 2010. Licensed under the GPLv3 (Or later version), Expand for details. Do not remove this notice.
2 |
3 | /**
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or any
7 | later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | * */
17 |
18 | #endregion
19 |
20 | using System.Waf.Applications;
21 |
22 | namespace FAP.Application.Views
23 | {
24 | public interface ILogView : IView
25 | {
26 | }
27 | }
--------------------------------------------------------------------------------
/FAP.Application/Views/IMainWindow.cs:
--------------------------------------------------------------------------------
1 | #region Copyright Kayomani 2010. Licensed under the GPLv3 (Or later version), Expand for details. Do not remove this notice.
2 |
3 | /**
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or any
7 | later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | * */
17 |
18 | #endregion
19 |
20 | using System.Waf.Applications;
21 | using System.Windows.Threading;
22 |
23 | namespace FAP.Application.Views
24 | {
25 | public interface IMainWindow : IView
26 | {
27 | Dispatcher Dispatcher { get; }
28 | void Show();
29 | void Close();
30 | void Flash();
31 | }
32 | }
--------------------------------------------------------------------------------
/FAP.Application/Views/IMessageBoxView.cs:
--------------------------------------------------------------------------------
1 | #region Copyright Kayomani 2010. Licensed under the GPLv3 (Or later version), Expand for details. Do not remove this notice.
2 |
3 | /**
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or any
7 | later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | * */
17 |
18 | #endregion
19 |
20 | using System.Waf.Applications;
21 |
22 | namespace FAP.Application.Views
23 | {
24 | public interface IMessageBoxView : IView
25 | {
26 | bool? ShowDialog();
27 | bool? ShowDialog(object parent);
28 | }
29 | }
--------------------------------------------------------------------------------
/FAP.Application/Views/IPopupWindow.cs:
--------------------------------------------------------------------------------
1 | #region Copyright Kayomani 2010. Licensed under the GPLv3 (Or later version), Expand for details. Do not remove this notice.
2 |
3 | /**
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or any
7 | later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | * */
17 |
18 | #endregion
19 |
20 | using System.Waf.Applications;
21 |
22 | namespace FAP.Application.Views
23 | {
24 | public interface IPopupWindow : IView
25 | {
26 | void FlashIfNotActive();
27 | void Show();
28 | void Close();
29 | }
30 | }
--------------------------------------------------------------------------------
/FAP.Application/Views/IQuery.cs:
--------------------------------------------------------------------------------
1 | #region Copyright Kayomani 2010. Licensed under the GPLv3 (Or later version), Expand for details. Do not remove this notice.
2 |
3 | /**
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or any
7 | later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | * */
17 |
18 | #endregion
19 |
20 | namespace FAP.Application.Views
21 | {
22 | public interface IQuery
23 | {
24 | bool SelectFolder(out string result);
25 | bool SelectFile(out string result);
26 | }
27 | }
--------------------------------------------------------------------------------
/FAP.Application/Views/ISearchView.cs:
--------------------------------------------------------------------------------
1 | using System.Waf.Applications;
2 |
3 | namespace FAP.Application.Views
4 | {
5 | public interface ISearchView : IView
6 | {
7 | }
8 | }
--------------------------------------------------------------------------------
/FAP.Application/Views/ISettingsView.cs:
--------------------------------------------------------------------------------
1 | #region Copyright Kayomani 2010. Licensed under the GPLv3 (Or later version), Expand for details. Do not remove this notice.
2 |
3 | /**
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or any
7 | later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | * */
17 |
18 | #endregion
19 |
20 | using System.Waf.Applications;
21 |
22 | namespace FAP.Application.Views
23 | {
24 | public interface ISettingsView : IView
25 | {
26 | }
27 | }
--------------------------------------------------------------------------------
/FAP.Application/Views/ISharesView.cs:
--------------------------------------------------------------------------------
1 | #region Copyright Kayomani 2010. Licensed under the GPLv3 (Or later version), Expand for details. Do not remove this notice.
2 |
3 | /**
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or any
7 | later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | * */
17 |
18 | #endregion
19 |
20 | using System.Waf.Applications;
21 |
22 | namespace FAP.Application.Views
23 | {
24 | public interface ISharesView : IView
25 | {
26 | }
27 | }
--------------------------------------------------------------------------------
/FAP.Application/Views/ITrayIconView.cs:
--------------------------------------------------------------------------------
1 | #region Copyright Kayomani 2010. Licensed under the GPLv3 (Or later version), Expand for details. Do not remove this notice.
2 |
3 | /**
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or any
7 | later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | * */
17 |
18 | #endregion
19 |
20 | using System.Waf.Applications;
21 |
22 | namespace FAP.Application.Views
23 | {
24 | public interface ITrayIconView : IView
25 | {
26 | bool ShowIcon { set; get; }
27 | void Dispose();
28 | }
29 | }
--------------------------------------------------------------------------------
/FAP.Application/Views/IUserInfo.cs:
--------------------------------------------------------------------------------
1 | #region Copyright Kayomani 2011. Licensed under the GPLv3 (Or later version), Expand for details. Do not remove this notice.
2 |
3 | /**
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or any
7 | later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | * */
17 |
18 | #endregion
19 |
20 | using System.Waf.Applications;
21 |
22 | namespace FAP.Application.Views
23 | {
24 | public interface IUserInfo : IView
25 | {
26 | }
27 | }
--------------------------------------------------------------------------------
/FAP.Application/Views/IWebPanel.cs:
--------------------------------------------------------------------------------
1 | using System.Waf.Applications;
2 |
3 | namespace FAP.Application.Views
4 | {
5 | public interface IWebPanel : IView
6 | {
7 | string Location { set; get; }
8 | }
9 | }
--------------------------------------------------------------------------------
/FAP.Application/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/FAP.Domain/Entities/ITransferWorker.cs:
--------------------------------------------------------------------------------
1 | #region Copyright Kayomani 2011. Licensed under the GPLv3 (Or later version), Expand for details. Do not remove this notice.
2 |
3 | /**
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or any
7 | later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | * */
17 |
18 | #endregion
19 |
20 | namespace FAP.Domain.Entities
21 | {
22 | public interface ITransferWorker
23 | {
24 | long Length { get; }
25 | bool IsComplete { get; }
26 | long Speed { get; }
27 | string Status { get; }
28 | long Position { get; }
29 | }
30 | }
--------------------------------------------------------------------------------
/FAP.Domain/Entities/NetworkInterface.cs:
--------------------------------------------------------------------------------
1 | #region Copyright Kayomani 2011. Licensed under the GPLv3 (Or later version), Expand for details. Do not remove this notice.
2 |
3 | /**
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or any
7 | later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | * */
17 |
18 | #endregion
19 |
20 | using System.Net;
21 |
22 | namespace FAP.Domain.Entities
23 | {
24 | public class NetInterface
25 | {
26 | public string Name { set; get; }
27 |
28 | public long Speed { set; get; }
29 |
30 | public string Description { set; get; }
31 |
32 | public IPAddress Address { set; get; }
33 | }
34 | }
--------------------------------------------------------------------------------
/FAP.Domain/Handlers/IFAPHandler.cs:
--------------------------------------------------------------------------------
1 | #region Copyright Kayomani 2011. Licensed under the GPLv3 (Or later version), Expand for details. Do not remove this notice.
2 |
3 | /**
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or any
7 | later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | * */
17 |
18 | #endregion
19 |
20 | using HttpServer;
21 |
22 | namespace FAP.Domain.Handlers
23 | {
24 | public interface IFAPHandler
25 | {
26 | bool Handle(RequestEventArgs e);
27 | }
28 | }
--------------------------------------------------------------------------------
/FAP.Domain/Net/DetectedNode.cs:
--------------------------------------------------------------------------------
1 | #region Copyright Kayomani 2011. Licensed under the GPLv3 (Or later version), Expand for details. Do not remove this notice.
2 |
3 | /**
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or any
7 | later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | * */
17 |
18 | #endregion
19 |
20 | using System;
21 |
22 | namespace FAP.Domain.Net
23 | {
24 | public class DetectedNode
25 | {
26 | public string Address { set; get; }
27 | public string NetworkName { set; get; }
28 | public string NetworkID { set; get; }
29 | public string OverlordID { set; get; }
30 | public int Priority { set; get; }
31 | public DateTime LastAnnounce { set; get; }
32 | public int MaxUsers { set; get; }
33 | public int CurrentUsers { set; get; }
34 | }
35 | }
--------------------------------------------------------------------------------
/FAP.Domain/Net/LanPeer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace FAP.Domain.Net
4 | {
5 | public class LanPeer
6 | {
7 | public DetectedNode Node { set; get; }
8 | public DateTime LastConnectionTime { set; get; }
9 | public DateTime LastUpdate { set; get; }
10 | }
11 | }
--------------------------------------------------------------------------------
/FAP.Domain/Services/BonjourAnnouncerService.cs:
--------------------------------------------------------------------------------
1 | #region Copyright Kayomani 2011. Licensed under the GPLv3 (Or later version), Expand for details. Do not remove this notice.
2 |
3 | /**
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or any
7 | later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | * */
17 |
18 | #endregion
19 |
20 | /*namespace FAP.Domain.Services
21 | {
22 | public class BonjourAnnouncerService
23 | {
24 | private Bonjour.DNSSDEventManager eventManager = null;
25 |
26 | public BonjourAnnouncerService()
27 | {
28 | eventManager = new Bonjour.DNSSDEventManager();
29 | }
30 | }
31 | }*/
--------------------------------------------------------------------------------
/FAP.Domain/Services/TemplateEngine.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Antlr3.ST;
3 |
4 | namespace FAP.Domain.Services
5 | {
6 | public class TemplateEngineService
7 | {
8 | private static object sync = new object();
9 |
10 | public static string Generate(string input, Dictionary data)
11 | {
12 | var template = new StringTemplate(input);
13 |
14 | foreach (var d in data)
15 | template.SetAttribute(d.Key, d.Value);
16 |
17 | string result = template.ToString();
18 | ;
19 | template.Reset();
20 | data.Clear();
21 | template = null;
22 | return result;
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/FAP.Domain/Services/UpdateCheckerService.cs:
--------------------------------------------------------------------------------
1 | using System.Net;
2 | using System.Threading;
3 | using FAP.Domain.Entities;
4 |
5 | namespace FAP.Domain.Services
6 | {
7 | public class UpdateCheckerService
8 | {
9 | private readonly Model model;
10 |
11 | public UpdateCheckerService(Model m)
12 | {
13 | model = m;
14 | }
15 |
16 | public void Run()
17 | {
18 | ThreadPool.QueueUserWorkItem(doCheck);
19 | }
20 |
21 | private void doCheck(object o)
22 | {
23 | try
24 | {
25 | var client = new WebClient();
26 | string message =
27 | client.DownloadString("http://iownallyourbase.com/fap/updates.php?i=" + model.LocalNode.ID + "&v=" +
28 | Model.AppVersion);
29 | if (null != message)
30 | {
31 | foreach (string split in message.Split('\n'))
32 | model.Messages.Add(split);
33 | }
34 | }
35 | catch
36 | {
37 | model.Messages.Add("An error occured during client update check");
38 | }
39 | }
40 | }
41 | }
--------------------------------------------------------------------------------
/FAP.Domain/Verbs/ConversationVerb.cs:
--------------------------------------------------------------------------------
1 | using FAP.Network.Entities;
2 | using Newtonsoft.Json;
3 |
4 | namespace FAP.Domain.Verbs
5 | {
6 | public interface IConversationController
7 | {
8 | bool HandleMessage(string id, string nickname, string message);
9 | }
10 |
11 | public class ConversationVerb : BaseVerb, IVerb
12 | {
13 | public string Nickname { set; get; }
14 | public string Message { set; get; }
15 |
16 | [JsonIgnore]
17 | public string SourceID { set; get; }
18 |
19 | #region IVerb Members
20 |
21 | public NetworkRequest CreateRequest()
22 | {
23 | var req = new NetworkRequest();
24 | req.Verb = "CONVERSTATION";
25 | req.Data = Serialize(this);
26 | return req;
27 | }
28 |
29 | public NetworkRequest ProcessRequest(NetworkRequest r)
30 | {
31 | var verb = Deserialise(r.Data);
32 | Nickname = verb.Nickname;
33 | Message = verb.Message;
34 | SourceID = r.SourceID;
35 | r.Data = string.Empty;
36 | return r;
37 | }
38 |
39 | public bool ReceiveResponse(NetworkRequest r)
40 | {
41 | return true;
42 | }
43 |
44 | #endregion
45 | }
46 | }
--------------------------------------------------------------------------------
/FAP.Domain/Verbs/IVerb.cs:
--------------------------------------------------------------------------------
1 | #region Copyright Kayomani 2011. Licensed under the GPLv3 (Or later version), Expand for details. Do not remove this notice.
2 |
3 | /**
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or any
7 | later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | * */
17 |
18 | #endregion
19 |
20 | using FAP.Network.Entities;
21 |
22 | namespace FAP.Domain.Verbs
23 | {
24 | public interface IVerb
25 | {
26 | NetworkRequest CreateRequest();
27 | NetworkRequest ProcessRequest(NetworkRequest r);
28 | bool ReceiveResponse(NetworkRequest r);
29 | }
30 | }
--------------------------------------------------------------------------------
/FAP.Domain/Verbs/LocalDownload.cs:
--------------------------------------------------------------------------------
1 | using FAP.Network.Entities;
2 |
3 | namespace FAP.Domain.Verbs
4 | {
5 | public class AddDownload : BaseVerb, IVerb
6 | {
7 | public string URL { set; get; }
8 |
9 | #region IVerb Members
10 |
11 | public NetworkRequest CreateRequest()
12 | {
13 | var req = new NetworkRequest();
14 | req.Verb = "ADDDOWNLOAD";
15 | req.Param = URL;
16 | return req;
17 | }
18 |
19 | public NetworkRequest ProcessRequest(NetworkRequest r)
20 | {
21 | URL = r.Param;
22 | return new NetworkRequest();
23 | }
24 |
25 | public bool ReceiveResponse(NetworkRequest r)
26 | {
27 | return true;
28 | }
29 |
30 | #endregion
31 | }
32 | }
--------------------------------------------------------------------------------
/FAP.Domain/Verbs/Multicast/WhoVerb.cs:
--------------------------------------------------------------------------------
1 | #region Copyright Kayomani 2011. Licensed under the GPLv3 (Or later version), Expand for details. Do not remove this notice.
2 |
3 | /**
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or any
7 | later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | * */
17 |
18 | #endregion
19 |
20 | namespace FAP.Domain.Verbs.Multicast
21 | {
22 | public class WhoVerb
23 | {
24 | public static string Message = "FAPWHO";
25 |
26 | public static string CreateRequest()
27 | {
28 | return Message;
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/FAP.Domain/Web.Resources/css/fap.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/FAP.Domain/Web.Resources/css/fap.css
--------------------------------------------------------------------------------
/FAP.Domain/Web.Resources/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/FAP.Domain/Web.Resources/favicon.ico
--------------------------------------------------------------------------------
/FAP.Domain/Web.Resources/images/back_disabled.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/FAP.Domain/Web.Resources/images/back_disabled.jpg
--------------------------------------------------------------------------------
/FAP.Domain/Web.Resources/images/back_enabled.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/FAP.Domain/Web.Resources/images/back_enabled.jpg
--------------------------------------------------------------------------------
/FAP.Domain/Web.Resources/images/fap.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/FAP.Domain/Web.Resources/images/fap.png
--------------------------------------------------------------------------------
/FAP.Domain/Web.Resources/images/folder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/FAP.Domain/Web.Resources/images/folder.png
--------------------------------------------------------------------------------
/FAP.Domain/Web.Resources/images/forward_disabled.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/FAP.Domain/Web.Resources/images/forward_disabled.jpg
--------------------------------------------------------------------------------
/FAP.Domain/Web.Resources/images/forward_enabled.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/FAP.Domain/Web.Resources/images/forward_enabled.jpg
--------------------------------------------------------------------------------
/FAP.Domain/Web.Resources/images/sort_asc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/FAP.Domain/Web.Resources/images/sort_asc.png
--------------------------------------------------------------------------------
/FAP.Domain/Web.Resources/images/sort_asc_disabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/FAP.Domain/Web.Resources/images/sort_asc_disabled.png
--------------------------------------------------------------------------------
/FAP.Domain/Web.Resources/images/sort_both.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/FAP.Domain/Web.Resources/images/sort_both.png
--------------------------------------------------------------------------------
/FAP.Domain/Web.Resources/images/sort_desc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/FAP.Domain/Web.Resources/images/sort_desc.png
--------------------------------------------------------------------------------
/FAP.Domain/Web.Resources/images/sort_desc_disabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/FAP.Domain/Web.Resources/images/sort_desc_disabled.png
--------------------------------------------------------------------------------
/FAP.Domain/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/FAP.Foundation/AsyncOperation.cs:
--------------------------------------------------------------------------------
1 | #region Copyright Kayomani 2010. Licensed under the GPLv3 (Or later version), Expand for details. Do not remove this notice.
2 | /**
3 | This program is free software: you can redistribute it and/or modify
4 | it under the terms of the GNU General Public License as published by
5 | the Free Software Foundation, either version 3 of the License, or any
6 | later version.
7 |
8 | This program is distributed in the hope that it will be useful,
9 | but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | GNU General Public License for more details.
12 |
13 | You should have received a copy of the GNU General Public License
14 | along with this program. If not, see .
15 | * */
16 | #endregion
17 | using System;
18 | using System.Collections.Generic;
19 | using System.Linq;
20 | using System.Text;
21 | using System.Waf.Applications;
22 |
23 | namespace Fap.Foundation
24 | {
25 | public class AsyncOperation
26 | {
27 | public DelegateCommand Command { set; get; }
28 | public Object Object { set; get; }
29 | public DelegateCommand CompletedCommand { set; get; }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/FAP.Foundation/BaseEntity.cs:
--------------------------------------------------------------------------------
1 | #region Copyright Kayomani 2010. Licensed under the GPLv3 (Or later version), Expand for details. Do not remove this notice.
2 | /**
3 | This program is free software: you can redistribute it and/or modify
4 | it under the terms of the GNU General Public License as published by
5 | the Free Software Foundation, either version 3 of the License, or any
6 | later version.
7 |
8 | This program is distributed in the hope that it will be useful,
9 | but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | GNU General Public License for more details.
12 |
13 | You should have received a copy of the GNU General Public License
14 | along with this program. If not, see .
15 | * */
16 | #endregion
17 | using System;
18 | using System.Collections.Generic;
19 | using System.Linq;
20 | using System.Text;
21 | using System.ComponentModel;
22 |
23 | namespace Fap.Foundation
24 | {
25 | public class BaseEntity : INotifyPropertyChanged
26 | {
27 | protected void NotifyChange(string path)
28 | {
29 | if (null != PropertyChanged)
30 | PropertyChanged(this, new PropertyChangedEventArgs(path));
31 | }
32 |
33 | public event PropertyChangedEventHandler PropertyChanged;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/FAP.Foundation/Services/IDService.cs:
--------------------------------------------------------------------------------
1 | #region Copyright Kayomani 2010. Licensed under the GPLv3 (Or later version), Expand for details. Do not remove this notice.
2 | /**
3 | This program is free software: you can redistribute it and/or modify
4 | it under the terms of the GNU General Public License as published by
5 | the Free Software Foundation, either version 3 of the License, or any
6 | later version.
7 |
8 | This program is distributed in the hope that it will be useful,
9 | but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | GNU General Public License for more details.
12 |
13 | You should have received a copy of the GNU General Public License
14 | along with this program. If not, see .
15 | * */
16 | #endregion
17 | using System;
18 | using System.Collections.Generic;
19 | using System.Linq;
20 | using System.Text;
21 |
22 | namespace Fap.Foundation.Services
23 | {
24 | public class IDService
25 | {
26 | public static string CreateID()
27 | {
28 | return Guid.NewGuid().ToString().Replace("-", "").ToUpper();
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/FAP.Foundation/Services/SingleInstanceService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading;
6 |
7 | namespace Fap.Foundation.Services
8 | {
9 | public class SingleInstanceService
10 | {
11 | private Mutex mutex;
12 | private bool hasLock = false;
13 |
14 | public SingleInstanceService(string name)
15 | {
16 | mutex = new Mutex(false, name);
17 | mutex.WaitOne(0,false);
18 | }
19 |
20 | public void Dispose()
21 | {
22 | if (hasLock)
23 | mutex.ReleaseMutex();
24 | mutex.Close();
25 | mutex = null;
26 | }
27 |
28 | public bool GetLock()
29 | {
30 | if (hasLock)
31 | return hasLock;
32 | hasLock = mutex.WaitOne(0, false);
33 | return hasLock;
34 | }
35 |
36 | public bool HasLock
37 | {
38 | get { return hasLock; }
39 | }
40 |
41 | public void ReleaseLock()
42 | {
43 | if (!hasLock)
44 | throw new Exception("Cannot release a lock when we dont have one.");
45 | mutex.ReleaseMutex();
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/FAP.Foundation/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/FAP.Network/NetworkModule.cs:
--------------------------------------------------------------------------------
1 | #region Copyright Kayomani 2011. Licensed under the GPLv3 (Or later version), Expand for details. Do not remove this notice.
2 |
3 | /**
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or any
7 | later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | * */
17 |
18 | #endregion
19 |
20 | using Autofac;
21 | using FAP.Network.Services;
22 |
23 | namespace FAP.Network
24 | {
25 | public class NetworkModule : Module
26 | {
27 | protected override void Load(ContainerBuilder builder)
28 | {
29 | builder.RegisterType().SingleInstance();
30 | builder.RegisterType().SingleInstance();
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------
/FAP.Network/Services/MulticastCommon.cs:
--------------------------------------------------------------------------------
1 | #region Copyright Kayomani 2011. Licensed under the GPLv3 (Or later version), Expand for details. Do not remove this notice.
2 |
3 | /**
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or any
7 | later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | * */
17 |
18 | #endregion
19 |
20 | using System.Net;
21 |
22 | namespace FAP.Network.Services
23 | {
24 | public class MulticastCommon
25 | {
26 | protected readonly IPAddress broadcastAddress = IPAddress.Parse("239.1.1.1");
27 | protected readonly int broadcastPort = 12;
28 | }
29 | }
--------------------------------------------------------------------------------
/FAP.Network/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Installer/FAP.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 11.00
3 | # Visual Studio 2010
4 | Project("{6141683F-8A12-4E36-9623-2EB02B2C2303}") = "FAP", "FAP.isproj", "{8FD5B897-49B6-4452-AE47-713615C801C1}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | CD_ROM|Default = CD_ROM|Default
9 | DVD-5|Default = DVD-5|Default
10 | SingleImage|Default = SingleImage|Default
11 | EndGlobalSection
12 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
13 | {8FD5B897-49B6-4452-AE47-713615C801C1}.CD_ROM|Default.ActiveCfg = CD_ROM
14 | {8FD5B897-49B6-4452-AE47-713615C801C1}.CD_ROM|Default.Build.0 = CD_ROM
15 | {8FD5B897-49B6-4452-AE47-713615C801C1}.DVD-5|Default.ActiveCfg = DVD-5
16 | {8FD5B897-49B6-4452-AE47-713615C801C1}.DVD-5|Default.Build.0 = DVD-5
17 | {8FD5B897-49B6-4452-AE47-713615C801C1}.SingleImage|Default.ActiveCfg = SingleImage
18 | {8FD5B897-49B6-4452-AE47-713615C801C1}.SingleImage|Default.Build.0 = SingleImage
19 | EndGlobalSection
20 | GlobalSection(SolutionProperties) = preSolution
21 | HideSolutionNode = FALSE
22 | EndGlobalSection
23 | EndGlobal
24 |
--------------------------------------------------------------------------------
/Installer/SFX/7zsd.sfx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/Installer/SFX/7zsd.sfx
--------------------------------------------------------------------------------
/Installer/SFX/Create SFX.bat:
--------------------------------------------------------------------------------
1 | copy /b 7zSD.sfx + config.txt + DISK1.7z FAP.exe
--------------------------------------------------------------------------------
/Installer/SFX/config.txt:
--------------------------------------------------------------------------------
1 | ;!@Install@!UTF-8!
2 | RunProgram="setup.exe"
3 | ExtractTitle="Extracting installer.."
4 | GUIMode="1"
5 | ;!@InstallEnd@!
--------------------------------------------------------------------------------
/Licences/Autofac License.txt:
--------------------------------------------------------------------------------
1 | Autofac IoC Container
2 | Copyright (c) 2007-2010 Autofac Contributors
3 | http://code.google.com/p/autofac/wiki/Contributing
4 |
5 | Other software included in this distribution is owned and
6 | licensed separately, see the included license files for details.
7 |
8 | Permission is hereby granted, free of charge, to any person
9 | obtaining a copy of this software and associated documentation
10 | files (the "Software"), to deal in the Software without
11 | restriction, including without limitation the rights to use,
12 | copy, modify, merge, publish, distribute, sublicense, and/or sell
13 | copies of the Software, and to permit persons to whom the
14 | Software is furnished to do so, subject to the following
15 | conditions:
16 |
17 | The above copyright notice and this permission notice shall be
18 | included in all copies or substantial portions of the Software.
19 |
20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/Licences/Icon Licence.txt:
--------------------------------------------------------------------------------
1 | Yellow folder icon by fasticon.com
--------------------------------------------------------------------------------
/Licences/Json.NET Licence.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) 2007 James Newton-King
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4 |
5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6 |
7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/Licences/Messagebox Licence.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) 2009, Prajeesh Prathap
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
5 |
6 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7 |
8 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
9 |
10 | * Neither the name of blogsprajeesh.blogspot nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
11 |
12 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
/Readme.md:
--------------------------------------------------------------------------------
1 | ### Description
2 | FAP is a HTTP based lan file sharing tool. It features chat, system spec comparison, file search, network service scanning and queable file downloads. Shared files and folders can also be downloaded via a web browser. The tool is optimised for high bandwidth LAN enviroments i.e. Gigabit+.
3 |
4 | ### Binaries
5 | Releases are available from https://code.google.com/p/fap/
6 |
7 | ### Features
8 | - Finds all local LAN peers automatically - No need to worry about running servers unless you wish to.
9 | - Browse and download files via the client or via a web browser.
10 | - No requirement to hash shared files meaning you can usually share 15tb+ in under a minute.
11 | - Avatars.
12 | - High transfer throughput with low system resources.
13 | - Headless Linux/Mono builds (Todo).
14 | - Fast full network file search.
15 | - Full network system specification comparision
16 | - File transfer visualiser.
17 | - Upload and download limiter and queue.
18 | - Chat.
19 | - Statistics of the local client and the network as a whole.
20 | - Share and download files in a share via web browser via a customisable interface.
21 | - Unicode file names & Large file support - Theoretical max single file size 16TB (Based on NTFS).
--------------------------------------------------------------------------------
/UI/Client.Console/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using FAP.Network.Server;
6 |
7 | namespace Client.Console
8 | {
9 | class Program
10 | {
11 | static void Main(string[] a)
12 | {
13 | Program p = new Program();
14 | p.test();
15 |
16 | }
17 |
18 |
19 | private void test()
20 | {
21 | NodeServer server = new NodeServer();
22 | server.Start();
23 |
24 | for (int i = 0; i < 100; i++)
25 | {
26 | FAP.Network.Client.Client c = new FAP.Network.Client.Client();
27 | c.Test();
28 | }
29 | System.Console.ReadKey();
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/UI/Client.Console/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/UI/Client.WPF/FolderItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Windows.Media;
6 |
7 | namespace Fap.Presentation
8 | {
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/UI/Client.WPF/Images/Chart Bar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/UI/Client.WPF/Images/Chart Bar.png
--------------------------------------------------------------------------------
/UI/Client.WPF/Images/Cog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/UI/Client.WPF/Images/Cog.png
--------------------------------------------------------------------------------
/UI/Client.WPF/Images/Default_Avatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/UI/Client.WPF/Images/Default_Avatar.png
--------------------------------------------------------------------------------
/UI/Client.WPF/Images/Download.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/UI/Client.WPF/Images/Download.png
--------------------------------------------------------------------------------
/UI/Client.WPF/Images/Drawer Closed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/UI/Client.WPF/Images/Drawer Closed.png
--------------------------------------------------------------------------------
/UI/Client.WPF/Images/Folder Sync.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/UI/Client.WPF/Images/Folder Sync.png
--------------------------------------------------------------------------------
/UI/Client.WPF/Images/Search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/UI/Client.WPF/Images/Search.png
--------------------------------------------------------------------------------
/UI/Client.WPF/Images/Upload.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/UI/Client.WPF/Images/Upload.png
--------------------------------------------------------------------------------
/UI/Client.WPF/Images/folder-yellow.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/UI/Client.WPF/Images/folder-yellow.ico
--------------------------------------------------------------------------------
/UI/Client.WPF/Images/folder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/UI/Client.WPF/Images/folder.png
--------------------------------------------------------------------------------
/UI/Client.WPF/Images/newtab.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/UI/Client.WPF/Images/newtab.ico
--------------------------------------------------------------------------------
/UI/Client.WPF/Images/originals/defaultavatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/UI/Client.WPF/Images/originals/defaultavatar.png
--------------------------------------------------------------------------------
/UI/Client.WPF/Images/splash screens/1209850323723.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/UI/Client.WPF/Images/splash screens/1209850323723.jpg
--------------------------------------------------------------------------------
/UI/Client.WPF/Images/splash screens/1242976218726.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/UI/Client.WPF/Images/splash screens/1242976218726.jpg
--------------------------------------------------------------------------------
/UI/Client.WPF/Images/splash screens/1243840487105.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/UI/Client.WPF/Images/splash screens/1243840487105.jpg
--------------------------------------------------------------------------------
/UI/Client.WPF/Images/splash screens/1253754897671.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/UI/Client.WPF/Images/splash screens/1253754897671.jpg
--------------------------------------------------------------------------------
/UI/Client.WPF/Images/splash screens/1256029184403.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/UI/Client.WPF/Images/splash screens/1256029184403.jpg
--------------------------------------------------------------------------------
/UI/Client.WPF/Images/splash screens/1274249428281.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/UI/Client.WPF/Images/splash screens/1274249428281.jpg
--------------------------------------------------------------------------------
/UI/Client.WPF/Images/src.txt:
--------------------------------------------------------------------------------
1 | folder-yellow.ico http://www.iconarchive.com/category/computer/solid-icons-by-fasticon.html
2 | Default_Avatar.png http://blogs.tennessean.com/politics/files/2009/08/paper_bag_head_275.jpg
3 |
4 | http://www.freeiconsweb.com/Free-Downloads.asp?id=1302
5 | Chart Bar.png
6 | Cog.png
7 | Drawer Closed.png
8 | Folder Sync.png
9 | Search.png
--------------------------------------------------------------------------------
/UI/Client.WPF/InputWindow.xaml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/UI/Client.WPF/InterfaceSelection.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Windows;
6 | using System.Windows.Controls;
7 | using System.Windows.Data;
8 | using System.Windows.Documents;
9 | using System.Windows.Input;
10 | using System.Windows.Media;
11 | using System.Windows.Media.Imaging;
12 | using System.Windows.Shapes;
13 | using FAP.Application.Views;
14 |
15 |
16 | namespace Fap.Presentation
17 | {
18 | ///
19 | /// Interaction logic for InterfaceSelection.xaml
20 | ///
21 | public partial class InterfaceSelection : Window, IInterfaceSelectionView
22 | {
23 | public InterfaceSelection()
24 | {
25 | InitializeComponent();
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/UI/Client.WPF/MessageBox.xaml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/UI/Client.WPF/NLog.config:
--------------------------------------------------------------------------------
1 |
2 |
4 |
14 |
--------------------------------------------------------------------------------
/UI/Client.WPF/Panels/ComparePanel.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Windows;
6 | using System.Windows.Controls;
7 | using System.Windows.Data;
8 | using System.Windows.Documents;
9 | using System.Windows.Input;
10 | using System.Windows.Media;
11 | using System.Windows.Media.Imaging;
12 | using System.Windows.Navigation;
13 | using System.Windows.Shapes;
14 | using FAP.Application.Views;
15 |
16 | namespace Fap.Presentation.Panels
17 | {
18 | ///
19 | /// Interaction logic for ComparePanel.xaml
20 | ///
21 | public partial class ComparePanel : UserControl, ICompareView
22 | {
23 | public ComparePanel()
24 | {
25 | InitializeComponent();
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/UI/Client.WPF/Panels/LogPanel.xaml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/UI/Client.WPF/Panels/UserInfoPanel.xaml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/UI/Client.WPF/Panels/UserInfoPanel.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Windows;
6 | using System.Windows.Controls;
7 | using System.Windows.Data;
8 | using System.Windows.Documents;
9 | using System.Windows.Input;
10 | using System.Windows.Media;
11 | using System.Windows.Media.Imaging;
12 | using System.Windows.Navigation;
13 | using System.Windows.Shapes;
14 | using FAP.Application.Views;
15 |
16 | namespace Fap.Presentation.Panels
17 | {
18 | ///
19 | /// Interaction logic for UserInfoPanel.xaml
20 | ///
21 | public partial class UserInfoPanel : UserControl, IUserInfo
22 | {
23 | public UserInfoPanel()
24 | {
25 | InitializeComponent();
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/UI/Client.WPF/Panels/WebPanel.xaml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/UI/Client.WPF/Panels/WebPanel.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Windows;
6 | using System.Windows.Controls;
7 | using System.Windows.Data;
8 | using System.Windows.Documents;
9 | using System.Windows.Input;
10 | using System.Windows.Media;
11 | using System.Windows.Media.Imaging;
12 | using System.Windows.Navigation;
13 | using System.Windows.Shapes;
14 | using FAP.Application.Views;
15 |
16 | namespace Fap.Presentation.Panels
17 | {
18 | ///
19 | /// Interaction logic for WebPanel.xaml
20 | ///
21 | public partial class WebPanel : UserControl, IWebPanel
22 | {
23 | public WebPanel()
24 | {
25 | InitializeComponent();
26 | }
27 |
28 | public string Location
29 | {
30 | get
31 | {
32 | return browser.Source.AbsolutePath;
33 | }
34 | set
35 | {
36 | browser.Source = new Uri(value);
37 | }
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/UI/Client.WPF/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.34014
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Fap.Presentation.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/UI/Client.WPF/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/UI/Client.WPF/SessionTypeConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Windows.Data;
6 | using FAP.Domain.Entities;
7 |
8 | namespace Fap.Presentation
9 | {
10 | [ValueConversion(typeof(object), typeof(string))]
11 | public class SessionTypeConverter : IValueConverter
12 | {
13 | public object Convert(object value, Type targetType, object parameter,
14 | System.Globalization.CultureInfo culture)
15 | {
16 | TransferSession s = value as TransferSession;
17 | if (null != s)
18 | {
19 | if (s.IsDownload)
20 | return "/Fap.Presentation;component/Images/Download.png";
21 | else
22 | return "/Fap.Presentation;component/Images/Upload.png";
23 | }
24 | return string.Empty;
25 | }
26 |
27 | public object ConvertBack(object value, Type targetType, object parameter,
28 | System.Globalization.CultureInfo culture)
29 | {
30 | return null;
31 | }
32 |
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/UI/Client.WPF/TabEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.ComponentModel;
5 |
6 | namespace Wpf.Controls
7 | {
8 | public class TabItemEventArgs : EventArgs
9 | {
10 | public TabItem TabItem { get; private set; }
11 |
12 | public TabItemEventArgs(TabItem item)
13 | {
14 | TabItem = item;
15 | }
16 | }
17 | public class NewTabItemEventArgs : EventArgs
18 | {
19 | ///
20 | /// The object to be used as the Content for the new TabItem
21 | ///
22 | public object Content { get; set; }
23 | }
24 |
25 | public class TabItemCancelEventArgs : CancelEventArgs
26 | {
27 | public TabItem TabItem { get; private set; }
28 |
29 | public TabItemCancelEventArgs(TabItem item)
30 | {
31 | TabItem = item;
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/UI/Client.WPF/Web.Help/css/print.css:
--------------------------------------------------------------------------------
1 | /* -----------------------------------------------------------------------
2 |
3 |
4 | Blueprint CSS Framework 1.0.1
5 | http://blueprintcss.org
6 |
7 | * Copyright (c) 2007-Present. See LICENSE for more info.
8 | * See README for instructions on how to use Blueprint.
9 | * For credits and origins, see AUTHORS.
10 | * This is a compressed file. See the sources in the 'src' directory.
11 |
12 | ----------------------------------------------------------------------- */
13 |
14 | /* print.css */
15 | body {line-height:1.5;font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;color:#000;background:none;font-size:10pt;}
16 | .container {background:none;}
17 | hr {background:#ccc;color:#ccc;width:100%;height:2px;margin:2em 0;padding:0;border:none;}
18 | hr.space {background:#fff;color:#fff;visibility:hidden;}
19 | h1, h2, h3, h4, h5, h6 {font-family:"Helvetica Neue", Arial, "Lucida Grande", sans-serif;}
20 | code {font:.9em "Courier New", Monaco, Courier, monospace;}
21 | a img {border:none;}
22 | p img.top {margin-top:0;}
23 | blockquote {margin:1.5em;padding:1em;font-style:italic;font-size:.9em;}
24 | .small {font-size:.9em;}
25 | .large {font-size:1.1em;}
26 | .quiet {color:#999;}
27 | .hide {display:none;}
28 | a:link, a:visited {background:transparent;font-weight:700;text-decoration:underline;}
29 | a:link:after, a:visited:after {content:" (" attr(href) ")";font-size:90%;}
--------------------------------------------------------------------------------
/UI/Client.WPF/Web.Help/css/screen.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/UI/Client.WPF/Web.Help/css/screen.css
--------------------------------------------------------------------------------
/UI/Client.WPF/Web.Help/images/Chart Bar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/UI/Client.WPF/Web.Help/images/Chart Bar.png
--------------------------------------------------------------------------------
/UI/Client.WPF/Web.Help/images/Cog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/UI/Client.WPF/Web.Help/images/Cog.png
--------------------------------------------------------------------------------
/UI/Client.WPF/Web.Help/images/Drawer Closed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/UI/Client.WPF/Web.Help/images/Drawer Closed.png
--------------------------------------------------------------------------------
/UI/Client.WPF/Web.Help/images/Folder Sync.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/UI/Client.WPF/Web.Help/images/Folder Sync.png
--------------------------------------------------------------------------------
/UI/Client.WPF/Web.Help/images/Search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/UI/Client.WPF/Web.Help/images/Search.png
--------------------------------------------------------------------------------
/UI/Client.WPF/Web.Help/images/client.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/UI/Client.WPF/Web.Help/images/client.png
--------------------------------------------------------------------------------
/UI/Client.WPF/Web.Help/images/web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/UI/Client.WPF/Web.Help/images/web.png
--------------------------------------------------------------------------------
/UI/Client.WPF/Window1.xaml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/UI/Client.WPF/Window1.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Windows;
6 | using System.Windows.Controls;
7 | using System.Windows.Data;
8 | using System.Windows.Documents;
9 | using System.Windows.Input;
10 | using System.Windows.Media;
11 | using System.Windows.Media.Imaging;
12 | using System.Windows.Shapes;
13 |
14 | namespace Fap.Presentation
15 | {
16 | ///
17 | /// Interaction logic for Window1.xaml
18 | ///
19 | public partial class Window1 : Window
20 | {
21 | public Window1()
22 | {
23 | this.InitializeComponent();
24 |
25 | // Insert code required on object creation below this point.
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/UI/Client.WPF/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/UI/Client.WPF/merge.bat:
--------------------------------------------------------------------------------
1 | mkdir merge
2 | ilmerge /out:merge/Fap.Presentation.exe Fap.Presentation.exe Autofac.dll ContinuousLinq.dll LinqToWmi.Core.dll WpfApplicationFramework.dll Fap.Foundation.dll Fap.Network.dll Fap.Domain.dll Fap.Application.dll
3 | copy Odyssey.dll merge
4 | pause
--------------------------------------------------------------------------------
/UI/Client.WPF/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/UI/Server.Console/InterfaceSelectionView.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using FAP.Application.Views;
6 |
7 | namespace Server.Console
8 | {
9 | public class InterfaceSelectionView : IInterfaceSelectionView
10 | {
11 | #region IInterfaceSelectionView Members
12 |
13 | public bool? ShowDialog()
14 | {
15 | throw new NotImplementedException();
16 | }
17 |
18 | public void Close()
19 | {
20 | throw new NotImplementedException();
21 | }
22 |
23 | #endregion
24 |
25 | #region IView Members
26 |
27 | public object DataContext
28 | {
29 | get
30 | {
31 | throw new NotImplementedException();
32 | }
33 | set
34 | {
35 | }
36 | }
37 |
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/UI/Server.Console/MessageService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Waf.Applications.Services;
6 |
7 | namespace Server.Console
8 | {
9 | public class MessageService : IMessageService
10 | {
11 |
12 | public void ShowMessage(string message)
13 | {
14 | System.Console.WriteLine(message);
15 | }
16 |
17 | public void ShowWarning(string message)
18 | {
19 | System.Console.WriteLine("WARNING: " + message);
20 | }
21 |
22 | public void ShowError(string message)
23 | {
24 | System.Console.WriteLine("ERROR: " + message);
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/UI/Server.Console/NLog.config:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/UI/Server.Console/Query.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using FAP.Application.Views;
6 |
7 | namespace Server.Console
8 | {
9 | class Query : IQuery
10 | {
11 | #region IQuery Members
12 |
13 | public bool SelectFolder(out string result)
14 | {
15 | throw new NotImplementedException();
16 | }
17 |
18 | public bool SelectFile(out string result)
19 | {
20 | throw new NotImplementedException();
21 | }
22 |
23 | #endregion
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/UI/Server.Console/SharesView.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using FAP.Application.Views;
6 |
7 | namespace Server.Console
8 | {
9 | class SharesView : ISharesView
10 | {
11 | #region IView Members
12 |
13 | public object DataContext
14 | {
15 | get
16 | {
17 | throw new NotImplementedException();
18 | }
19 | set
20 | {
21 | }
22 | }
23 |
24 | #endregion
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/UI/Server.Console/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/UI/Server.Console/folder-yellow.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/UI/Server.Console/folder-yellow.ico
--------------------------------------------------------------------------------
/UI/Server.Console/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Web/updates.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/libs/Autofac/Autofac License.txt:
--------------------------------------------------------------------------------
1 | Autofac IoC Container
2 | Copyright (c) 2007-2010 Autofac Contributors
3 | http://code.google.com/p/autofac/wiki/Contributing
4 |
5 | Other software included in this distribution is owned and
6 | licensed separately, see the included license files for details.
7 |
8 | Permission is hereby granted, free of charge, to any person
9 | obtaining a copy of this software and associated documentation
10 | files (the "Software"), to deal in the Software without
11 | restriction, including without limitation the rights to use,
12 | copy, modify, merge, publish, distribute, sublicense, and/or sell
13 | copies of the Software, and to permit persons to whom the
14 | Software is furnished to do so, subject to the following
15 | conditions:
16 |
17 | The above copyright notice and this permission notice shall be
18 | included in all copies or substantial portions of the Software.
19 |
20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 | OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/libs/Autofac/Autofac.Configuration.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/libs/Autofac/Autofac.Configuration.dll
--------------------------------------------------------------------------------
/libs/Autofac/Autofac.Integration.Wcf.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/libs/Autofac/Autofac.Integration.Wcf.dll
--------------------------------------------------------------------------------
/libs/Autofac/Autofac.Integration.Web.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/libs/Autofac/Autofac.Integration.Web.dll
--------------------------------------------------------------------------------
/libs/Autofac/Autofac.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/libs/Autofac/Autofac.dll
--------------------------------------------------------------------------------
/libs/Bonjour/Interop.Bonjour.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/libs/Bonjour/Interop.Bonjour.dll
--------------------------------------------------------------------------------
/libs/HttpServer/Authentication/IAuthenticationProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace HttpServer.Authentication
6 | {
7 | ///
8 | /// Used to authenticate users
9 | ///
10 | ///
11 | /// Authentication is requested by throwing
12 | ///
13 | public interface IAuthenticationProvider
14 | {
15 | void RequestAuthentication(IHttpContext context, string realm);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/libs/HttpServer/Authentication/IAuthenticator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using HttpServer.Headers;
3 |
4 | namespace HttpServer.Authentication
5 | {
6 | ///
7 | /// Authenticates requests
8 | ///
9 | public interface IAuthenticator
10 | {
11 | ///
12 | /// Authenticate request
13 | ///
14 | /// Authorization header send by web client
15 | /// Realm to authenticate in, typically a domain name.
16 | /// HTTP Verb used in the request.
17 | /// User if authentication was successful; otherwise null.
18 | IAuthenticationUser Authenticate(AuthorizationHeader header, string realm, string httpVerb);
19 |
20 | ///
21 | /// Gets authenticator scheme
22 | ///
23 | ///
24 | /// digest
25 | ///
26 | string Scheme { get; }
27 |
28 | ///
29 | /// Create a authentication challenge.
30 | ///
31 | /// Realm that the user should authenticate in
32 | /// A WWW-Authenticate header.
33 | /// If realm is empty or null.
34 | IHeader CreateChallenge(string realm);
35 | }
36 |
37 | }
--------------------------------------------------------------------------------
/libs/HttpServer/AuthenticationRequiredException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Net;
3 | using HttpServer.Authentication;
4 |
5 | namespace HttpServer
6 | {
7 | ///
8 | /// User needs to authenticate.
9 | ///
10 | ///
11 | ///
12 | public class AuthenticationRequiredException : HttpException
13 | {
14 | ///
15 | /// Initializes a new instance of the class.
16 | ///
17 | /// Exception description.
18 | public AuthenticationRequiredException(string errMsg) : base(HttpStatusCode.Unauthorized, errMsg)
19 | {
20 | }
21 |
22 | ///
23 | /// Initializes a new instance of the class.
24 | ///
25 | /// Exception description.
26 | /// Inner exception.
27 | protected AuthenticationRequiredException(string errMsg, Exception inner)
28 | : base(HttpStatusCode.Unauthorized, errMsg, inner)
29 | {
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/libs/HttpServer/BadRequestException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Net;
3 |
4 | namespace HttpServer
5 | {
6 | ///
7 | /// Request couldn't be parsed successfully.
8 | ///
9 | public class BadRequestException : HttpException
10 | {
11 | ///
12 | /// Initializes a new instance of the class.
13 | ///
14 | /// Exception description.
15 | public BadRequestException(string errMsg) : base(HttpStatusCode.BadRequest, errMsg)
16 | {
17 | }
18 |
19 | ///
20 | /// Initializes a new instance of the class.
21 | ///
22 | /// Exception description.
23 | /// Exception description.
24 | public BadRequestException(string errMsg, Exception inner) : base(HttpStatusCode.BadRequest, errMsg, inner)
25 | {
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/libs/HttpServer/BodyDecoders/DecodedData.cs:
--------------------------------------------------------------------------------
1 | namespace HttpServer.BodyDecoders
2 | {
3 | ///
4 | /// Data decoded from a POST body.
5 | ///
6 | public class DecodedData
7 | {
8 | ///
9 | /// Initializes a new instance of the class.
10 | ///
11 | public DecodedData()
12 | {
13 | Parameters = new ParameterCollection();
14 | Files = new HttpFileCollection();
15 | }
16 |
17 | ///
18 | /// Gets or sets decoded files.
19 | ///
20 | public HttpFileCollection Files { get; set; }
21 |
22 | ///
23 | /// Gets or sets decoded parameters.
24 | ///
25 | public ParameterCollection Parameters { get; set; }
26 | }
27 | }
--------------------------------------------------------------------------------
/libs/HttpServer/BodyDecoders/IBodyDecoder.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Text;
5 | using HttpServer.Headers;
6 |
7 | namespace HttpServer.BodyDecoders
8 | {
9 | ///
10 | /// Decodes body stream.
11 | ///
12 | public interface IBodyDecoder
13 | {
14 | ///
15 | /// All content types that the decoder can parse.
16 | ///
17 | /// A collection of all content types that the decoder can handle.
18 | IEnumerable ContentTypes { get; }
19 |
20 | ///
21 | /// Decode body stream
22 | ///
23 | /// Stream containing the content
24 | /// Content type header
25 | /// Stream encoding
26 | /// Decoded data.
27 | /// Body format is invalid for the specified content type.
28 | /// Something unexpected failed.
29 | DecodedData Decode(Stream stream, ContentTypeHeader contentType, Encoding encoding);
30 | }
31 | }
--------------------------------------------------------------------------------
/libs/HttpServer/ComponentAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace HttpServer
6 | {
7 | ///
8 | /// Component that should be registered in the container.
9 | ///
10 | ///
11 | /// Register using all interfaces that is specified in this assembly.
12 | ///
13 | public class ComponentAttribute : Attribute
14 | {
15 |
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/libs/HttpServer/ErrorPageEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace HttpServer
4 | {
5 | ///
6 | /// Arguments for .
7 | ///
8 | public class ErrorPageEventArgs : EventArgs
9 | {
10 | ///
11 | /// Initializes a new instance of the class.
12 | ///
13 | /// The context.
14 | public ErrorPageEventArgs(IHttpContext context)
15 | {
16 | Context = context;
17 | }
18 |
19 | internal IHttpContext Context { get; private set; }
20 |
21 | ///
22 | /// Gets or sets thrown exception
23 | ///
24 | public Exception Exception { get; internal set; }
25 |
26 | ///
27 | /// Gets or sets if error page was provided.
28 | ///
29 | public bool IsHandled { get; set; }
30 |
31 | ///
32 | /// Gets requested resource.
33 | ///
34 | public IRequest Request { get { return Context.Request; } }
35 |
36 | ///
37 | /// Gets response to send
38 | ///
39 | public IResponse Response { get{ return Context.Response;} }
40 | }
41 | }
--------------------------------------------------------------------------------
/libs/HttpServer/ExceptionEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace HttpServer
4 | {
5 | ///
6 | /// An exception that can't be handled by the library have been thrown.
7 | ///
8 | public class ExceptionEventArgs : EventArgs
9 | {
10 | ///
11 | /// Initializes a new instance of the class.
12 | ///
13 | /// The exception.
14 | public ExceptionEventArgs(Exception exception)
15 | {
16 | Exception = exception;
17 | }
18 |
19 | ///
20 | /// Gets caught exception.
21 | ///
22 | public Exception Exception { get; private set; }
23 | }
24 | }
--------------------------------------------------------------------------------
/libs/HttpServer/ForbiddenException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Net;
3 |
4 | namespace HttpServer
5 | {
6 | ///
7 | /// Requested resource may not be accessed.
8 | ///
9 | ///
10 | /// Normally thrown after an authentication attempt have failed too many times.
11 | ///
12 | ///
13 | public class ForbiddenException : HttpException
14 | {
15 | ///
16 | /// Initializes a new instance of the class.
17 | ///
18 | /// Exception description.
19 | public ForbiddenException(string errMsg)
20 | : base(HttpStatusCode.Forbidden, errMsg)
21 | {
22 | }
23 |
24 | ///
25 | /// Initializes a new instance of the class.
26 | ///
27 | /// Exception description.
28 | /// Inner exception.
29 | protected ForbiddenException(string errMsg, Exception inner)
30 | : base(HttpStatusCode.Forbidden, errMsg, inner)
31 | {
32 | }
33 | }
34 | }
--------------------------------------------------------------------------------
/libs/HttpServer/Headers/IHeader.cs:
--------------------------------------------------------------------------------
1 | namespace HttpServer.Headers
2 | {
3 | ///
4 | /// Header in a message
5 | ///
6 | ///
7 | /// Important! Each header should override ToString()
8 | /// and return it's data correctly formatted as a HTTP header value.
9 | ///
10 | public interface IHeader
11 | {
12 | ///
13 | /// Gets header name
14 | ///
15 | string Name { get; }
16 |
17 | ///
18 | /// Gets value as it would be sent back to client.
19 | ///
20 | string HeaderValue { get; }
21 | }
22 | }
--------------------------------------------------------------------------------
/libs/HttpServer/Headers/IHeaderCollection.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace HttpServer.Headers
4 | {
5 | ///
6 | /// Collection of headers.
7 | ///
8 | public interface IHeaderCollection : IEnumerable
9 | {
10 | ///
11 | /// Gets a header
12 | ///
13 | /// header name.
14 | /// header if found; otherwise null.
15 | IHeader this[string name] { get; }
16 |
17 | }
18 | }
--------------------------------------------------------------------------------
/libs/HttpServer/Headers/Parsers/AuthorizationParser.cs:
--------------------------------------------------------------------------------
1 | using HttpServer.Tools;
2 |
3 | namespace HttpServer.Headers.Parsers
4 | {
5 | [ParserFor(AuthorizationHeader.Key)]
6 | internal class AuthorizationParser : IHeaderParser
7 | {
8 | #region IHeaderParser Members
9 |
10 | public IHeader Parse(string name, ITextReader reader)
11 | {
12 | var header = new AuthorizationHeader();
13 | reader.ConsumeWhiteSpaces();
14 | header.Scheme = reader.ReadWord();
15 | reader.ConsumeWhiteSpaces();
16 | header.Data = reader.ReadToEnd();
17 | return header;
18 | }
19 |
20 | #endregion
21 | }
22 | }
--------------------------------------------------------------------------------
/libs/HttpServer/Headers/Parsers/ContentTypeParser.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using HttpServer.Tools;
3 |
4 | namespace HttpServer.Headers.Parsers
5 | {
6 | ///
7 | /// Parses .
8 | ///
9 | [ParserFor(ContentTypeHeader.Key)]
10 | public class ContentTypeParser : IHeaderParser
11 | {
12 | #region IHeaderParser Members
13 |
14 | ///
15 | /// Parse a header
16 | ///
17 | /// Name of header.
18 | /// Reader containing value.
19 | /// HTTP Header
20 | /// Header value is not of the expected format.
21 | public IHeader Parse(string name, ITextReader reader)
22 | {
23 | string contentType = reader.ReadToEnd(';');
24 |
25 | // got parameters
26 | if (reader.Current == ';')
27 | {
28 | HeaderParameterCollection parameters = HeaderParameterCollection.Parse(reader);
29 | return new ContentTypeHeader(contentType, parameters);
30 | }
31 |
32 | return new ContentTypeHeader(contentType);
33 | }
34 |
35 | #endregion
36 | }
37 | }
--------------------------------------------------------------------------------
/libs/HttpServer/Headers/Parsers/DateParser.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using HttpServer.Tools;
4 |
5 | namespace HttpServer.Headers.Parsers
6 | {
7 | ///
8 | /// Parses "Date" header.
9 | ///
10 | [ParserFor(DateHeader.Key)]
11 | [ParserFor("If-Modified-Since")]
12 | internal class DateParser : IHeaderParser
13 | {
14 | #region IHeaderParser Members
15 |
16 | ///
17 | /// Parse a header
18 | ///
19 | /// Name of header.
20 | /// Reader containing value.
21 | /// HTTP Header
22 | /// Header value is not of the expected format.
23 | public IHeader Parse(string name, ITextReader reader)
24 | {
25 | string value = reader.ReadToEnd();
26 |
27 | try
28 | {
29 | return new DateHeader(name, DateTime.Parse(value, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal));
30 | }
31 | catch (FormatException err)
32 | {
33 | throw new BadRequestException("'" + name + "' do not contain a valid date", err);
34 | }
35 | }
36 |
37 | #endregion
38 | }
39 | }
--------------------------------------------------------------------------------
/libs/HttpServer/Headers/Parsers/IHeaderParser.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using HttpServer.Tools;
3 |
4 | namespace HttpServer.Headers.Parsers
5 | {
6 | ///
7 | /// Used to parse header values
8 | ///
9 | public interface IHeaderParser
10 | {
11 | ///
12 | /// Parse a header
13 | ///
14 | /// Name of header.
15 | /// Reader containing value.
16 | /// HTTP Header
17 | /// Header value is not of the expected format.
18 | IHeader Parse(string name, ITextReader reader);
19 | }
20 | }
--------------------------------------------------------------------------------
/libs/HttpServer/Headers/Parsers/NumericHeaderParser.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using HttpServer.Tools;
3 |
4 | namespace HttpServer.Headers.Parsers
5 | {
6 | ///
7 | /// Parses numerical values
8 | ///
9 | [ParserFor("Content-Length")]
10 | public class NumericHeaderParser : IHeaderParser
11 | {
12 | #region IHeaderParser Members
13 |
14 | ///
15 | /// Parse a header
16 | ///
17 | /// Name of header.
18 | /// Reader containing value.
19 | /// HTTP Header
20 | /// Header value is not of the expected format.
21 | public IHeader Parse(string name, ITextReader reader)
22 | {
23 | string temp = reader.ReadToEnd();
24 | int value;
25 | if (!int.TryParse(temp, out value))
26 | throw new FormatException("Header '" + name + "' do not contain a numerical value ('" + temp + "').");
27 | return new NumericHeader(name, value);
28 | }
29 |
30 | #endregion
31 | }
32 | }
--------------------------------------------------------------------------------
/libs/HttpServer/Headers/Parsers/ParserForAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace HttpServer.Headers.Parsers
4 | {
5 | ///
6 | /// Used to define which headers a parse is for.
7 | ///
8 | [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
9 | public class ParserForAttribute : Attribute
10 | {
11 | ///
12 | /// Initializes a new instance of the class.
13 | ///
14 | /// Name of the header.
15 | public ParserForAttribute(string headerName)
16 | {
17 | HeaderName = headerName;
18 | }
19 |
20 | ///
21 | /// Gets name of header that this parser is for.
22 | ///
23 | public string HeaderName { get; private set; }
24 | }
25 | }
--------------------------------------------------------------------------------
/libs/HttpServer/Headers/Parsers/StringParser.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using HttpServer.Tools;
3 |
4 | namespace HttpServer.Headers.Parsers
5 | {
6 | ///
7 | /// Parses .
8 | ///
9 | public class StringParser : IHeaderParser
10 | {
11 | #region IHeaderParser Members
12 |
13 | ///
14 | /// Parse a header
15 | ///
16 | /// Name of header.
17 | /// Reader containing value.
18 | /// HTTP Header
19 | /// Header value is not of the expected format.
20 | public IHeader Parse(string name, ITextReader reader)
21 | {
22 | return new StringHeader(name, reader.ReadToEnd());
23 | }
24 |
25 | #endregion
26 | }
27 | }
--------------------------------------------------------------------------------
/libs/HttpServer/Headers/StringHeader.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace HttpServer.Headers
4 | {
5 | ///
6 | /// Used to store all headers that that aren't recognized.
7 | ///
8 | public class StringHeader : IHeader
9 | {
10 | ///
11 | /// Initializes a new instance of the class.
12 | ///
13 | /// The name.
14 | /// The value.
15 | public StringHeader(string name, string value)
16 | {
17 | Name = name;
18 | Value = value;
19 | }
20 |
21 | ///
22 | /// Gets or sets value
23 | ///
24 | public string Value { get; set; }
25 |
26 | #region IHeader Members
27 |
28 | ///
29 | /// Gets header name
30 | ///
31 | public string Name { get; private set; }
32 |
33 | public string HeaderValue
34 | {
35 | get { return Value; }
36 | }
37 |
38 | #endregion
39 |
40 | public override string ToString()
41 | {
42 | return Value;
43 | }
44 | }
45 | }
--------------------------------------------------------------------------------
/libs/HttpServer/HttpException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Net;
3 |
4 | namespace HttpServer
5 | {
6 | ///
7 | /// Exception thrown from HTTP server.
8 | ///
9 | public class HttpException : Exception
10 | {
11 | ///
12 | /// Initializes a new instance of the class.
13 | ///
14 | /// HTTP status code.
15 | /// Exception description.
16 | public HttpException(HttpStatusCode code, string errMsg) : base(errMsg)
17 | {
18 | Code = code;
19 | }
20 |
21 | ///
22 | /// Initializes a new instance of the class.
23 | ///
24 | /// HTTP status code.
25 | /// Exception description.
26 | /// Inner exception.
27 | protected HttpException(HttpStatusCode code, string errMsg, Exception inner)
28 | : base(errMsg, inner)
29 | {
30 | Code = code;
31 | }
32 |
33 | ///
34 | /// Gets HTTP status code.
35 | ///
36 | public HttpStatusCode Code { get; private set; }
37 | }
38 | }
--------------------------------------------------------------------------------
/libs/HttpServer/HttpFile.cs:
--------------------------------------------------------------------------------
1 | namespace HttpServer
2 | {
3 | ///
4 | /// File sent from remote end.
5 | ///
6 | public class HttpFile
7 | {
8 | ///
9 | /// Gets or sets content type.
10 | ///
11 | public string ContentType { get; set; }
12 |
13 | ///
14 | /// Gets or sets name in form.
15 | ///
16 | public string Name { get; set; }
17 |
18 | ///
19 | /// Gets or sets name original file name
20 | ///
21 | public string OriginalFileName { get; set; }
22 |
23 | ///
24 | /// Gets or sets filename for locally stored file.
25 | ///
26 | public string TempFileName { get; set; }
27 | }
28 | }
--------------------------------------------------------------------------------
/libs/HttpServer/HttpServer.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | en-US
11 | false
12 |
13 |
--------------------------------------------------------------------------------
/libs/HttpServer/IHttpFactory.cs:
--------------------------------------------------------------------------------
1 | namespace HttpServer
2 | {
3 | ///
4 | /// Get or create components used in the web server framework
5 | ///
6 | ///
7 | ///
8 | ///
9 | public interface IHttpFactory
10 | {
11 | ///
12 | /// Get or create a type.
13 | ///
14 | /// Type to create
15 | /// Created type.
16 | ///
17 | /// Gets or creates types in the framework.
18 | /// Check for more information on which
19 | /// types the factory should contain.
20 | ///
21 | T Get(params object[] constructorArguments) where T : class;
22 | }
23 | }
--------------------------------------------------------------------------------
/libs/HttpServer/IServiceResolver.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace HttpServer
6 | {
7 | class IServiceResolver
8 | {
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/libs/HttpServer/InternalServerException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Net;
3 |
4 | namespace HttpServer
5 | {
6 | ///
7 | /// Something unexpected went wrong.
8 | ///
9 | public class InternalServerException : HttpException
10 | {
11 | ///
12 | /// Initializes a new instance of the class.
13 | ///
14 | /// Exception description.
15 | public InternalServerException(string errMsg)
16 | : base(HttpStatusCode.InternalServerError, errMsg)
17 | {
18 | }
19 |
20 | ///
21 | /// Initializes a new instance of the class.
22 | ///
23 | /// Exception description.
24 | /// Inner exception.
25 | public InternalServerException(string errMsg, Exception inner)
26 | : base(HttpStatusCode.InternalServerError, errMsg, inner)
27 | {
28 | }
29 | }
30 | }
--------------------------------------------------------------------------------
/libs/HttpServer/Logging/ConsoleLogFactory.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace HttpServer.Logging
4 | {
5 | ///
6 | /// Creates a console logger.
7 | ///
8 | public class ConsoleLogFactory : ILogFactory
9 | {
10 | private readonly ILogFilter _filter;
11 |
12 | ///
13 | /// Initializes a new instance of the class.
14 | ///
15 | /// The filter.
16 | public ConsoleLogFactory(ILogFilter filter)
17 | {
18 | _filter = filter;
19 | }
20 |
21 | #region ILogFactory Members
22 |
23 | ///
24 | /// Create a new logger.
25 | ///
26 | /// Type that requested a logger.
27 | /// Logger for the specified type;
28 | ///
29 | /// MUST ALWAYS return a logger. Return if no logging
30 | /// should be used.
31 | ///
32 | public ILogger CreateLogger(Type type)
33 | {
34 | return new ConsoleLogger(type, _filter);
35 | }
36 |
37 | #endregion
38 | }
39 | }
--------------------------------------------------------------------------------
/libs/HttpServer/Logging/ILogFactory.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace HttpServer.Logging
4 | {
5 | ///
6 | /// Factory implementation used to create logs.
7 | ///
8 | public interface ILogFactory
9 | {
10 | ///
11 | /// Create a new logger.
12 | ///
13 | /// Type that requested a logger.
14 | /// Logger for the specified type;
15 | ///
16 | /// MUST ALWAYS return a logger. Return if no logging
17 | /// should be used.
18 | ///
19 | ILogger CreateLogger(Type type);
20 | }
21 | }
--------------------------------------------------------------------------------
/libs/HttpServer/Logging/ILogFilter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace HttpServer.Logging
4 | {
5 | ///
6 | /// Determines which classes can log
7 | ///
8 | public interface ILogFilter
9 | {
10 | ///
11 | /// Checks if the specified type can send
12 | /// log entries at the specified level.
13 | ///
14 | /// Log level
15 | /// Type that want to write a log entry.
16 | /// true if logging is allowed; otherwise false.
17 | bool CanLog(LogLevel level, Type type);
18 | }
19 | }
--------------------------------------------------------------------------------
/libs/HttpServer/Logging/LogFactory.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace HttpServer.Logging
4 | {
5 | ///
6 | /// Factory is used to create new logs in the system.
7 | ///
8 | public static class LogFactory
9 | {
10 | private static ILogFactory _factory = NullLogFactory.Instance;
11 | private static bool _isAssigned;
12 |
13 | ///
14 | /// Assigns log factory being used.
15 | ///
16 | /// The log factory.
17 | /// A factory have already been assigned.
18 | public static void Assign(ILogFactory logFactory)
19 | {
20 | if (logFactory == _factory)
21 | return;
22 | if (_isAssigned)
23 | throw new InvalidOperationException("A factory have already been assigned.");
24 | _isAssigned = true;
25 | _factory = logFactory;
26 | }
27 |
28 | ///
29 | /// Create a new logger.
30 | ///
31 | /// Type that requested a logger.
32 | /// Logger for the specified type;
33 | public static ILogger CreateLogger(Type type)
34 | {
35 | return _factory.CreateLogger(type);
36 | }
37 | }
38 | }
--------------------------------------------------------------------------------
/libs/HttpServer/Logging/LogLevel.cs:
--------------------------------------------------------------------------------
1 | namespace HttpServer.Logging
2 | {
3 | ///
4 | /// Priority for log entries
5 | ///
6 | ///
7 | public enum LogLevel
8 | {
9 | ///
10 | /// Very detailed logs to be able to follow the flow of the program.
11 | ///
12 | Trace,
13 |
14 | ///
15 | /// Logs to help debug errors in the application
16 | ///
17 | Debug,
18 |
19 | ///
20 | /// Information to be able to keep track of state changes etc.
21 | ///
22 | Info,
23 |
24 | ///
25 | /// Something did not go as we expected, but it's no problem.
26 | ///
27 | Warning,
28 |
29 | ///
30 | /// Something that should not fail failed, but we can still keep
31 | /// on going.
32 | ///
33 | Error,
34 |
35 | ///
36 | /// Something failed, and we cannot handle it properly.
37 | ///
38 | Fatal
39 | }
40 | }
--------------------------------------------------------------------------------
/libs/HttpServer/Logging/NullLogFactory.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace HttpServer.Logging
4 | {
5 | ///
6 | /// Factory creating null logger.
7 | ///
8 | public class NullLogFactory : ILogFactory
9 | {
10 | private static readonly NullLogFactory _instance = new NullLogFactory();
11 |
12 | ///
13 | /// Initializes a new instance of the class.
14 | ///
15 | private NullLogFactory()
16 | {
17 | }
18 |
19 | ///
20 | /// Logger instance.
21 | ///
22 | public static ILogFactory Instance
23 | {
24 | get { return _instance; }
25 | }
26 |
27 | #region ILogFactory Members
28 |
29 | ///
30 | /// Create a new logger.
31 | ///
32 | /// Type that requested a logger.
33 | /// Logger for the specified type;
34 | ///
35 | /// MUST ALWAYS return a logger. Return if no logging
36 | /// should be used.
37 | ///
38 | public ILogger CreateLogger(Type type)
39 | {
40 | return new NullLogWriter();
41 | }
42 |
43 | #endregion
44 | }
45 | }
--------------------------------------------------------------------------------
/libs/HttpServer/Messages/FactoryRequestEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace HttpServer.Messages
4 | {
5 | ///
6 | /// A request have been parsed successfully by the server.
7 | ///
8 | public class FactoryRequestEventArgs : EventArgs
9 | {
10 | ///
11 | /// Initializes a new instance of the class.
12 | ///
13 | /// Received request.
14 | public FactoryRequestEventArgs(IRequest request)
15 | {
16 | Request = request;
17 | }
18 |
19 | ///
20 | /// Gets received request.
21 | ///
22 | public IRequest Request { get; private set; }
23 | }
24 | }
--------------------------------------------------------------------------------
/libs/HttpServer/Messages/Parser/FactoryResponseEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace HttpServer.Messages.Parser
4 | {
5 | ///
6 | /// A response have been received.
7 | ///
8 | public class FactoryResponseEventArgs : EventArgs
9 | {
10 | ///
11 | /// Initializes a new instance of the class.
12 | ///
13 | /// The response.
14 | public FactoryResponseEventArgs(IResponse response)
15 | {
16 | Response = response;
17 | }
18 |
19 | ///
20 | /// Gets or sets response.
21 | ///
22 | public IResponse Response { get; private set; }
23 | }
24 | }
--------------------------------------------------------------------------------
/libs/HttpServer/Messages/Parser/ParserException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace HttpServer.Messages.Parser
4 | {
5 | ///
6 | /// Something failed during parsing.
7 | ///
8 | public class ParserException : BadRequestException
9 | {
10 | ///
11 | /// Initializes a new instance of the class.
12 | ///
13 | /// Exception description.
14 | public ParserException(string errMsg) : base(errMsg)
15 | {
16 | }
17 |
18 | ///
19 | /// Initializes a new instance of the class.
20 | ///
21 | /// Exception description.
22 | /// Inner exception.
23 | public ParserException(string errMsg, Exception inner)
24 | : base(errMsg, inner)
25 | {
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/libs/HttpServer/Messages/Parser/RequestEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Net;
3 |
4 | namespace HttpServer.Messages.Parser
5 | {
6 | ///
7 | /// A request have been received.
8 | ///
9 | public class RequestEventArgs : EventArgs
10 | {
11 | ///
12 | /// Initializes a new instance of the class.
13 | ///
14 | /// The request.
15 | /// End point that the request was received from.
16 | public RequestEventArgs(IRequest request, EndPoint endPoint)
17 | {
18 | Request = request;
19 | RemoteEndPoint = endPoint;
20 | }
21 |
22 | ///
23 | /// End point that the message was received from.
24 | ///
25 | public EndPoint RemoteEndPoint { get; private set; }
26 |
27 | ///
28 | /// Received request.
29 | ///
30 | public IRequest Request { get; private set; }
31 | }
32 | }
--------------------------------------------------------------------------------
/libs/HttpServer/Messages/Parser/ResponseLineEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Net;
3 |
4 | namespace HttpServer.Messages.Parser
5 | {
6 | ///
7 | /// First line in a response have been received
8 | ///
9 | public class ResponseLineEventArgs : EventArgs
10 | {
11 | ///
12 | /// Gets or sets motivation to why the status code was used.
13 | ///
14 | public string ReasonPhrase { get; set; }
15 |
16 | ///
17 | /// Gets or sets message status code
18 | ///
19 | public HttpStatusCode StatusCode { get; set; }
20 |
21 | ///
22 | /// Gets or sets sip protocol version used.
23 | ///
24 | public string Version { get; set; }
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/HttpServer/Modules/IModule.cs:
--------------------------------------------------------------------------------
1 | namespace HttpServer.Modules
2 | {
3 | ///
4 | /// HTTP Module
5 | ///
6 | public interface IModule
7 | {
8 | ///
9 | /// Process a request.
10 | ///
11 | /// Request information
12 | /// What to do next.
13 | ProcessingResult Process(RequestContext context);
14 | }
15 | }
--------------------------------------------------------------------------------
/libs/HttpServer/NotFoundException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Net;
3 |
4 | namespace HttpServer
5 | {
6 | ///
7 | /// Request couldn't be parsed successfully.
8 | ///
9 | public class NotFoundException : HttpException
10 | {
11 | ///
12 | /// Initializes a new instance of the class.
13 | ///
14 | /// Exception description.
15 | public NotFoundException(string errMsg) : base(HttpStatusCode.NotFound, errMsg)
16 | {
17 | }
18 |
19 | ///
20 | /// Initializes a new instance of the class.
21 | ///
22 | /// Exception description.
23 | /// Exception description.
24 | public NotFoundException(string errMsg, Exception inner)
25 | : base(HttpStatusCode.NotFound, errMsg, inner)
26 | {
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/libs/HttpServer/ProcessingResult.cs:
--------------------------------------------------------------------------------
1 | namespace HttpServer
2 | {
3 | ///
4 | /// Result of processing.
5 | ///
6 | public enum ProcessingResult
7 | {
8 | ///
9 | /// Continue with the next handler
10 | ///
11 | Continue,
12 |
13 | ///
14 | /// No more handlers can process the request.
15 | ///
16 | ///
17 | /// The server will process the response object and
18 | /// generate a HTTP response from it.
19 | ///
20 | SendResponse,
21 |
22 | ///
23 | /// Response have been sent back by the handler.
24 | ///
25 | ///
26 | /// This option should only be used if you are streaming
27 | /// something or sending back a custom result. The server will
28 | /// not process the response object or send anything back
29 | /// to the client.
30 | ///
31 | Abort
32 | }
33 | }
--------------------------------------------------------------------------------
/libs/HttpServer/RequestContext.cs:
--------------------------------------------------------------------------------
1 | namespace HttpServer
2 | {
3 | ///
4 | /// Request context
5 | ///
6 | ///
7 | /// Contains information about a HTTP request and where it came from.
8 | ///
9 | public class RequestContext
10 | {
11 | ///
12 | /// Gets or sets http context.
13 | ///
14 | public IHttpContext HttpContext { get; set; }
15 |
16 | ///
17 | /// Gets or sets http request.
18 | ///
19 | public IRequest Request { get; set; }
20 |
21 | ///
22 | /// Gets or sets http response.
23 | ///
24 | public IResponse Response { get; set; }
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/HttpServer/Resources/Resource.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 |
4 | namespace HttpServer.Resources
5 | {
6 | ///
7 | /// Resource information.
8 | ///
9 | ///
10 | /// Used by content providers to be able to get information
11 | /// on resources (views, files etc).
12 | ///
13 | public class Resource
14 | {
15 | ///
16 | /// Gets or sets date when resource was modified.
17 | ///
18 | ///
19 | /// if not used.
20 | ///
21 | ///
22 | /// Should always be universal time.
23 | ///
24 | public DateTime ModifiedAt { get; set; }
25 |
26 | ///
27 | /// Gets or sets resource stream.
28 | ///
29 | public Stream Stream { get; set; }
30 | }
31 | }
--------------------------------------------------------------------------------
/libs/HttpServer/Routing/IRouter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace HttpServer.Routing
4 | {
5 | ///
6 | /// Rules are used to perform operations before a request is being handled.
7 | /// Rules can be used to create routing etc.
8 | ///
9 | public interface IRouter
10 | {
11 | ///
12 | /// Process the incoming request.
13 | ///
14 | /// Request context information.
15 | /// Processing result.
16 | /// If any parameter is null.
17 | ProcessingResult Process(RequestContext context);
18 | }
19 | }
--------------------------------------------------------------------------------
/libs/HttpServer/Sessions/ISessionProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace HttpServer.Sessions
6 | {
7 | class ISessionProvider
8 | {
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/libs/HttpServer/Sessions/ISessionStore.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace HttpServer.Sessions
6 | {
7 | ///
8 | /// Stores sessions in your favorite store
9 | ///
10 | ///
11 | ///
12 | ///
13 | public interface ISessionStore
14 | {
15 | ///
16 | /// Saves the specified session.
17 | ///
18 | /// The session.
19 | void Save(Session session);
20 |
21 | ///
22 | /// Touches the specified session
23 | ///
24 | /// Session id.
25 | ///
26 | /// Used to prevent sessions from expiring.
27 | ///
28 | void Touch(string id);
29 |
30 |
31 | ///
32 | /// Loads a session
33 | ///
34 | /// Session id.
35 | /// Session if found; otherwise null.
36 | Session Load(string id);
37 |
38 | ///
39 | /// Delete a session
40 | ///
41 | /// Id of session
42 | void Delete(string id);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/libs/HttpServer/Sessions/Session.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace HttpServer.Sessions
4 | {
5 | ///
6 | /// Session in the system
7 | ///
8 | [Serializable]
9 | public class Session
10 | {
11 | public Session(string sessionId)
12 | {
13 | SessionId = sessionId;
14 | }
15 |
16 | public Session()
17 | {
18 | SessionId = Guid.NewGuid().ToString("N");
19 | }
20 |
21 | ///
22 | /// Gets or sets session id.
23 | ///
24 | public string SessionId { get; set; }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/libs/HttpServer/SocketFilterEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Net.Sockets;
3 |
4 | namespace HttpServer
5 | {
6 | ///
7 | /// Used by to filter out unwanted connections.
8 | ///
9 | public class SocketFilterEventArgs : EventArgs
10 | {
11 | ///
12 | /// Initializes a new instance of the class.
13 | ///
14 | /// The socket.
15 | public SocketFilterEventArgs(Socket socket)
16 | {
17 | Socket = socket;
18 | IsSocketOk = true;
19 | }
20 |
21 | ///
22 | /// Gets or sets if socket can be accepted.
23 | ///
24 | public bool IsSocketOk { get; set; }
25 |
26 | ///
27 | /// Gets socket.
28 | ///
29 | public Socket Socket { get; private set; }
30 | }
31 | }
--------------------------------------------------------------------------------
/libs/HttpServer/Tools/Properties/EmitReflector.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Reflection;
3 |
4 | namespace HttpServer.Tools.Properties
5 | {
6 | class EmitReflector
7 | {
8 | public object Instantiate(Type type)
9 | {
10 | return EmitHelper.CreateParameterlessConstructorHandler(type)();
11 | }
12 |
13 | public object GetValue(MemberInfo member, object instance)
14 | {
15 | if (member is PropertyInfo)
16 | return EmitHelper.CreatePropertyGetterHandler(member as PropertyInfo)(instance);
17 | if (member is FieldInfo)
18 | return EmitHelper.CreateFieldGetterHandler(member as FieldInfo)(instance);
19 | throw new NotSupportedException();
20 | }
21 |
22 | public void SetValue(MemberInfo member, object instance, object value)
23 | {
24 | if (member is PropertyInfo)
25 | EmitHelper.CreatePropertySetterHandler(member as PropertyInfo)(instance, value);
26 | else if (member is FieldInfo)
27 | EmitHelper.CreateFieldSetterHandler(member as FieldInfo)(instance, value);
28 | else throw new NotSupportedException();
29 | }
30 |
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/libs/HttpServer/Tools/Properties/PropertyProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace HttpServer.Tools.Properties
5 | {
6 | ///
7 | /// Used to get or set properties on objects.
8 | ///
9 | ///
10 | /// This class should be a bit faster than the standard reflection.
11 | ///
12 | public class PropertyProvider
13 | {
14 | private static Dictionary _types = new Dictionary();
15 | private static EmitReflector _emitReflector = new EmitReflector();
16 |
17 | ///
18 | /// Get cached type.
19 | ///
20 | /// Type to get/set properties in
21 | /// Type to use
22 | public static ICachedType Get(Type type)
23 | {
24 | CachedType cachedType;
25 | if (_types.TryGetValue(type, out cachedType))
26 | return cachedType;
27 |
28 | lock (_types)
29 | {
30 | if (_types.TryGetValue(type, out cachedType))
31 | return cachedType;
32 |
33 | cachedType = new CachedType(type, _emitReflector);
34 | _types[type] = cachedType;
35 | return cachedType;
36 | }
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/libs/HttpServer/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/libs/HttpServer/httpserver.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/libs/HttpServer/httpserver.snk
--------------------------------------------------------------------------------
/libs/Json.NET/Newtonsoft.Json.Net35.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/libs/Json.NET/Newtonsoft.Json.Net35.dll
--------------------------------------------------------------------------------
/libs/Json.NET/Newtonsoft.Json.Net35.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/libs/Json.NET/Newtonsoft.Json.Net35.pdb
--------------------------------------------------------------------------------
/libs/LinqToWmi/LinqToWmi.ClassGenerator/ArgumentParser/ArgumentAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace LinqToWmi.ProtoGenerator
6 | {
7 | ///
8 | /// Indicates that an property can be used as an argument in an commandline application
9 | ///
10 | public class ArgumentAttribute : Attribute
11 | {
12 | private bool _required;
13 | private string _help;
14 | private string _cmd;
15 |
16 | public ArgumentAttribute(string cmd) {
17 | _cmd = cmd;
18 | }
19 |
20 | ///
21 | /// The user input command
22 | ///
23 | public string Cmd
24 | {
25 | get { return _cmd; }
26 | }
27 |
28 | ///
29 | /// Wheter the command is required as input
30 | ///
31 | public bool Required
32 | {
33 | get { return _required; }
34 | set { _required = value; }
35 | }
36 |
37 | ///
38 | /// The helptext when an user inputs an invalid command
39 | ///
40 | public string HelpText
41 | {
42 | get { return _help; }
43 | set { _help = value; }
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/libs/LinqToWmi/LinqToWmi.ClassGenerator/ArgumentParser/ArgumentParseException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace LinqToWmi.ProtoGenerator
6 | {
7 | ///
8 | /// Exception that is thrown when invalid arguments are
9 | ///
10 | class ArgumentParseException : ApplicationException
11 | {
12 | private ArgumentAttribute [] _arguments;
13 |
14 | public ArgumentParseException(ArgumentAttribute[] arguments) {
15 | _arguments = arguments;
16 | }
17 |
18 | public ArgumentAttribute [] Arguments
19 | {
20 | get { return _arguments; }
21 | }
22 |
23 | public override string Message
24 | {
25 | get
26 | {
27 | return String.Format("ERROR: Required parameter missing\n\n{0}", SwitchesHelpText);
28 | }
29 | }
30 |
31 | public string SwitchesHelpText
32 | {
33 | get {
34 | string switches = "Switches:\n";
35 | foreach(ArgumentAttribute attr in Arguments) {
36 | switches += String.Format(" /{0}- {1} {2}\n",
37 | attr.Cmd.PadRight(10), attr.HelpText, attr.Required ? "(Required)" :"");
38 | }
39 | return switches;
40 | }
41 | }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/libs/LinqToWmi/LinqToWmi.ClassGenerator/Arguments.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace LinqToWmi.ProtoGenerator
6 | {
7 | class Arguments
8 | {
9 | private string _wmi;
10 | private string _out;
11 | private string _ns = "WmiEntities";
12 | private string _provider = "CSharp";
13 |
14 | [Argument("wmi", Required = true, HelpText = "WMI object to create class for!")]
15 | public string Wmi
16 | {
17 | get { return _wmi; }
18 | set { _wmi = value; }
19 | }
20 |
21 | [Argument("out", HelpText = "Filename to create")]
22 | public string Out
23 | {
24 | get { return _out; }
25 | set { _out = value; }
26 | }
27 |
28 | [Argument("ns", HelpText = "Namespace")]
29 | public string Ns
30 | {
31 | get { return _ns; }
32 | set { _ns = value; }
33 | }
34 |
35 | [Argument("provider", HelpText = "Language to generate the file for (IE. CSharp)")]
36 | public string Provider
37 | {
38 | get { return _provider; }
39 | set { _provider = value; }
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/libs/LinqToWmi/LinqToWmi.ClassGenerator/Builder/WmiObjectQuery.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.Management;
5 | using System.Linq;
6 |
7 | namespace LinqToWmi.ProtoGenerator
8 | {
9 | class WmiMetaInformation
10 | {
11 | public ManagementObject GetMetaInformation(string name)
12 | {
13 | ManagementObject value = null;
14 | ManagementScope scope = new ManagementScope(@"\\localhost");
15 |
16 | ManagementPath path = new ManagementPath(name);
17 | ManagementClass management = new ManagementClass(scope, path, null);
18 |
19 | foreach (ManagementObject child in management.GetInstances())
20 | {
21 | value = child;
22 | break;
23 | }
24 | management.Dispose();
25 | return value;
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/libs/LinqToWmi/LinqToWmi.ClassGenerator/LinqToWmi.ClassGenerator.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 | /wmi:Win32_ComputerSystem
4 |
5 |
--------------------------------------------------------------------------------
/libs/LinqToWmi/LinqToWmi.Core/Visitor/AbstractVisitor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.Linq;
5 | using System.Linq.Expressions;
6 |
7 | namespace LinqToWmi.Core.WMI
8 | {
9 | ///
10 | /// Abstract visitor, does some neat casting for you, and some other tricks that
11 | /// make life easier
12 | ///
13 | abstract class AbstractVisitor : IVisitor where T: Expression
14 | {
15 | public abstract string Visit(T element);
16 | private VistorContext _context = null;
17 |
18 | public Type ExpressionType
19 | {
20 | get
21 | {
22 | return typeof(T);
23 | }
24 | }
25 |
26 | public string Visit(Expression ex)
27 | {
28 | return Visit((T)ex);
29 | }
30 |
31 | public VistorContext Context
32 | {
33 | get {
34 | return _context;
35 | }
36 | set {
37 | _context = value;
38 | }
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/libs/LinqToWmi/LinqToWmi.Core/Visitor/IVisitor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq.Expressions;
3 |
4 | namespace LinqToWmi.Core.WMI
5 | {
6 | ///
7 | /// Basic Visitor interface to work with
8 | ///
9 | interface IVisitor
10 | {
11 | Type ExpressionType { get; }
12 | string Visit(Expression ex);
13 | VistorContext Context { get; set; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/libs/LinqToWmi/LinqToWmi.Core/WMI/IWmiQuery.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq.Expressions;
3 |
4 | namespace LinqToWmi.Core.WMI
5 | {
6 | ///
7 | /// Generic interface for WmiQuery provides access to Expression and Type for our generic concrete types.
8 | ///
9 | public interface IWmiQuery
10 | {
11 | Expression WhereExpression { get; set; }
12 |
13 | Type Type { get; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/libs/LinqToWmi/LinqToWmi.Core/WMI/Visitors/BinaryVisitor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.Linq.Expressions;
5 |
6 | namespace LinqToWmi.Core.WMI
7 | {
8 | ///
9 | /// Visit an binary expression. Binary expressions are used for equations,
10 | /// since the left or the right part can be of any type we just recurse.
11 | ///
12 | internal class BinaryVisitor : AbstractVisitor
13 | {
14 | public override string Visit(BinaryExpression expression)
15 | {
16 | string where = null;
17 |
18 | where += Context.Visit(expression.Left);
19 | where += WmiQueryUtility.ConvertBinaryTypeToSql(expression.NodeType);
20 |
21 | if (expression.Right.Type == typeof(String))
22 | {
23 | where += String.Format("'{0}'", Context.Visit(expression.Right));
24 | }
25 | else
26 | {
27 | where += Context.Visit(expression.Right);
28 | }
29 |
30 | return where;
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------
/libs/LinqToWmi/LinqToWmi.Core/WMI/Visitors/ConstantVisitor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.Linq.Expressions;
5 |
6 | namespace LinqToWmi.Core.WMI
7 | {
8 | ///
9 | /// Visits constant expression, constant expressions are just resolved
10 | /// variables, like ints or strings which are put directly in the query
11 | ///
12 | internal class ConstantVisitor : AbstractVisitor
13 | {
14 | public override string Visit(ConstantExpression expression)
15 | {
16 | if (expression.Value == null)
17 | {
18 | return "NULL";
19 | }
20 | else
21 | {
22 | return expression.Value.ToString();
23 | }
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/libs/LinqToWmi/LinqToWmi.Core/WMI/Visitors/MemberVisitor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.Linq.Expressions;
5 | using System.Reflection;
6 |
7 | namespace LinqToWmi.Core.WMI
8 | {
9 | ///
10 | /// Converts an WmiQuery member to an WQL field
11 | ///
12 | internal class MemberVisitor : AbstractVisitor
13 | {
14 | public override string Visit(MemberExpression expression)
15 | {
16 | return ConvertCommonOperations(expression);
17 | }
18 |
19 | ///
20 | /// Convert common operation for an Member
21 | ///
22 | public string ConvertCommonOperations(MemberExpression expression)
23 | {
24 | PropertyInfo property = expression.Member as PropertyInfo;
25 |
26 | if (property != null && property.PropertyType == typeof(bool))
27 | {
28 | return WmiQueryUtility.ConvertBinaryBooleanToSQL(expression.Member, true);
29 | }
30 |
31 | return WmiQueryUtility.ConvertMemberToSql(expression.Member);
32 | }
33 | }
34 | }
--------------------------------------------------------------------------------
/libs/LinqToWmi/LinqToWmi.Core/WMI/WmiExtensionMethods.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.Runtime.CompilerServices;
5 | using System.Linq.Expressions;
6 |
7 | namespace LinqToWmi.Core.WMI
8 | {
9 | ///
10 | /// Create some extension methods so that the compiler can do its sexy type deferrence. IE.
11 | /// Lookup compatible methods for building up the expression tree.
12 | ///
13 | public static class WmiExtensions
14 | {
15 | //Note the "Expression" syntax, it triggers the compiler to convert this to an expression tree.
16 | //We want that tree so we store it in the Query
17 | public static WmiQuery Where(this WmiQuery context, Expression> expression)
18 | {
19 | context.WhereExpression = expression.Body;
20 |
21 | return context;
22 | }
23 |
24 |
25 |
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/libs/LinqToWmi/LinqToWmi.Core/WMI/WmiObjectTypeAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.Reflection;
5 |
6 | namespace LinqToWmi.Core.WMI
7 | {
8 | ///
9 | /// Provides type decoration for the WMI object
10 | ///
11 | public class WmiMapAttribute : Attribute
12 | {
13 |
14 | private string _name;
15 |
16 | public WmiMapAttribute(string name)
17 | {
18 | _name = name;
19 | }
20 |
21 | ///
22 | /// Returns the name of the current WMI m
23 | ///
24 | public string Name
25 | {
26 | get
27 | {
28 | return _name;
29 | }
30 | }
31 |
32 | ///
33 | /// Retrieves the attribute from an type
34 | ///
35 | public static WmiMapAttribute Get(Type type)
36 | {
37 | return (WmiMapAttribute)WmiMapAttribute.GetCustomAttribute(type, typeof(WmiMapAttribute));
38 | }
39 |
40 | ///
41 | /// Extracts the attribute from an MemberInfo
42 | ///
43 | public static WmiMapAttribute Get(MemberInfo info)
44 | {
45 | return (WmiMapAttribute)WmiMapAttribute.GetCustomAttribute(info, typeof(WmiMapAttribute));
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/libs/Messagebox/BlogsPrajeesh.BlogSpot.WPFControls.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/libs/Messagebox/BlogsPrajeesh.BlogSpot.WPFControls.dll
--------------------------------------------------------------------------------
/libs/Odyssey/Common/EmptyStringVisibilityConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Windows.Data;
6 | using System.Windows;
7 |
8 | namespace Odyssey.Controls
9 | {
10 | public class EmptyStringVisibilityConverter:IValueConverter
11 | {
12 | #region IValueConverter Members
13 |
14 | public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
15 | {
16 | string s = value as string;
17 | return string.IsNullOrEmpty(s) ? Visibility.Visible : Visibility.Collapsed;
18 | }
19 |
20 | public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
21 | {
22 | throw new NotImplementedException();
23 | }
24 |
25 | #endregion
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/libs/Odyssey/Common/IKeyTipControl.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace Odyssey.Controls.Interfaces
7 | {
8 | public interface IKeyTipControl
9 | {
10 | void ExecuteKeyTip();
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/libs/Odyssey/Common/PopupHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Windows;
6 | using System.Windows.Media;
7 |
8 | namespace Odyssey.Common
9 | {
10 | public static class PopupHelper
11 | {
12 | public static bool IsLogicalAncestorOf(this UIElement ancestor, UIElement child)
13 | {
14 | if (child != null)
15 | {
16 | FrameworkElement obj = child as FrameworkElement;
17 | while (obj != null)
18 | {
19 | FrameworkElement parent = VisualTreeHelper.GetParent(obj) as FrameworkElement;
20 | obj = parent == null ? obj.Parent as FrameworkElement : parent as FrameworkElement;
21 | if (obj == ancestor) return true;
22 | }
23 | }
24 | return false;
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/libs/Odyssey/Common/SkinId.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | #region Copyright
7 | // Odyssey.Controls.Ribbonbar
8 | // (c) copyright 2009 Thomas Gerber
9 | // This source code and files, is licensed under The Microsoft Public License (Ms-PL)
10 | #endregion
11 | namespace Odyssey.Controls.Classes
12 | {
13 | public enum SkinId
14 | {
15 | OfficeBlue,
16 | OfficeSilver,
17 | OfficeBlack,
18 | Windows7,
19 | Vista
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/libs/Odyssey/Common/Skins.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | #region Copyright
7 | // Odyssey.Controls.Ribbonbar
8 | // (c) copyright 2009 Thomas Gerber
9 | // This source code and files, is licensed under The Microsoft Public License (Ms-PL)
10 | #endregion
11 | namespace Odyssey.Controls
12 | {
13 | public static class Skins
14 | {
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/libs/Odyssey/Controls/ClickableTreeView.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Windows.Controls;
6 |
7 | namespace Odyssey.Controls
8 | {
9 | public class ClickableTreeView:TreeView
10 | {
11 |
12 | protected override bool IsItemItsOwnContainerOverride(object item)
13 | {
14 | return (item is Separator) || (item is TreeViewItem);
15 | }
16 |
17 | protected override System.Windows.DependencyObject GetContainerForItemOverride()
18 | {
19 | return new ClickableTreeViewItem();
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/libs/Odyssey/Controls/OdcButton.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Windows.Controls;
6 | using Odyssey.Controls.Interfaces;
7 | using System.Windows.Controls.Primitives;
8 |
9 | namespace Odyssey.Controls
10 | {
11 | ///
12 | /// Derived Button that implements IKeyTipControl.
13 | ///
14 | public class OdcButton:Button,IKeyTipControl
15 | {
16 | #region IKeyTipControl Members
17 |
18 | void IKeyTipControl.ExecuteKeyTip()
19 | {
20 | OnClick();
21 | }
22 |
23 | #endregion
24 | }
25 |
26 | ///
27 | /// Derived ToggleButon that implements IKeyTipControl.
28 | ///
29 | public class OdcToggleButton:ToggleButton,IKeyTipControl
30 | {
31 | #region IKeyTipControl Members
32 |
33 | void IKeyTipControl.ExecuteKeyTip()
34 | {
35 | OnClick();
36 | }
37 |
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/libs/Odyssey/Effects/GrayscaleEffect.fx:
--------------------------------------------------------------------------------
1 | sampler2D implicitInput : register(s0);
2 | float factor : register(c0);
3 |
4 | float4 main(float2 uv : TEXCOORD) : COLOR
5 | {
6 | float4 color = tex2D(implicitInput, uv);
7 | float gray = color.r * 0.3 + color.g * 0.59 + color.b *0.11;
8 |
9 | float4 result;
10 | result.r = (color.r - gray) * factor + gray;
11 | result.g = (color.g - gray) * factor + gray;
12 | result.b = (color.b - gray) * factor + gray;
13 | result.a = color.a;
14 |
15 | return result;
16 | }
--------------------------------------------------------------------------------
/libs/Odyssey/Effects/GrayscaleEffect.ps:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kayomani/FAP/25119f13aa4544d68a6d82c8c4101522bb911e2b/libs/Odyssey/Effects/GrayscaleEffect.ps
--------------------------------------------------------------------------------
/libs/Odyssey/Odyssey.csproj.vspscc:
--------------------------------------------------------------------------------
1 | ""
2 | {
3 | "FILE_VERSION" = "9237"
4 | "ENLISTMENT_CHOICE" = "NEVER"
5 | "PROJECT_FILE_RELATIVE_PATH" = "relative:Odyssey\\Odyssey"
6 | "NUMBER_OF_EXCLUDED_FILES" = "0"
7 | "ORIGINAL_PROJECT_FILE_PATH" = ""
8 | "NUMBER_OF_NESTED_PROJECTS" = "0"
9 | "SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
10 | }
11 |
--------------------------------------------------------------------------------
/libs/Odyssey/OutlookBar/ExpandPosition.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace Odyssey.Controls
7 | {
8 | public enum ExpandPosition
9 | {
10 | Left,
11 | Right
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/libs/Odyssey/OutlookBar/OverflowMenuCreatedEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Collections.ObjectModel;
6 |
7 | namespace Odyssey.Controls
8 | {
9 | public class OverflowMenuCreatedEventArgs:EventArgs
10 | {
11 | public OverflowMenuCreatedEventArgs(Collection