├── .vs └── FileManageSystem │ └── v14 │ └── .suo ├── FileManageSystem.sln ├── FileManageSystem ├── App.config ├── App.xaml ├── App.xaml.cs ├── AttributeWindow.xaml ├── AttributeWindow.xaml.cs ├── Block.cs ├── CategoryManage.cs ├── DetailWindow.xaml ├── DetailWindow.xaml.cs ├── DiskManage.cs ├── EditWindow.xaml ├── EditWindow.xaml.cs ├── File.cs ├── FileManageSystem.csproj ├── FormatControl.xaml ├── FormatControl.xaml.cs ├── IsFolder.cs ├── MainWindow.xaml ├── MainWindow.xaml.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── RenameControl.xaml ├── RenameControl.xaml.cs ├── Transform.cs ├── back.jpg ├── bin │ ├── Debug │ │ ├── CategoryDisk.dat │ │ ├── FileManageSystem.exe │ │ ├── FileManageSystem.exe.config │ │ ├── FileManageSystem.pdb │ │ ├── FileManageSystem.vshost.exe │ │ ├── FileManageSystem.vshost.exe.config │ │ ├── FileManageSystem.vshost.exe.manifest │ │ ├── FileManageSystem.zip │ │ ├── MaterialDesignColors.dll │ │ ├── MaterialDesignThemes.Wpf.dll │ │ ├── MaterialDesignThemes.Wpf.pdb │ │ ├── MaterialDesignThemes.Wpf.xml │ │ └── myDisk.dat │ ├── Release.zip │ └── Release │ │ ├── CategoryDisk.dat │ │ ├── FileManageSystem.exe │ │ ├── FileManageSystem.exe.config │ │ ├── FileManageSystem.pdb │ │ ├── FileManageSystem.vshost.exe │ │ ├── FileManageSystem.vshost.exe.config │ │ ├── FileManageSystem.vshost.exe.manifest │ │ ├── MaterialDesignColors.dll │ │ ├── MaterialDesignThemes.Wpf.dll │ │ ├── MaterialDesignThemes.Wpf.pdb │ │ ├── MaterialDesignThemes.Wpf.xml │ │ └── myDisk.dat ├── myDisk.dat ├── obj │ ├── Debug │ │ ├── App.baml │ │ ├── App.g.cs │ │ ├── App.g.i.cs │ │ ├── AttributeWindow.baml │ │ ├── AttributeWindow.g.cs │ │ ├── AttributeWindow.g.i.cs │ │ ├── Attributes.g.i.cs │ │ ├── AttributesForm.g.i.cs │ │ ├── DesignTimeResolveAssemblyReferences.cache │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ ├── DetailWindow.baml │ │ ├── DetailWindow.g.cs │ │ ├── DetailWindow.g.i.cs │ │ ├── Domain │ │ │ ├── Sample4Dialog.g.i.cs │ │ │ ├── SampleDialog.g.i.cs │ │ │ ├── SampleMessageDialog.g.i.cs │ │ │ └── SampleProgressDialog.g.i.cs │ │ ├── EditWindow.baml │ │ ├── EditWindow.g.cs │ │ ├── EditWindow.g.i.cs │ │ ├── FileDetailWindow.g.i.cs │ │ ├── FileManageSystem.Properties.Resources.resources │ │ ├── FileManageSystem.csproj.FileListAbsolute.txt │ │ ├── FileManageSystem.csproj.GenerateResource.Cache │ │ ├── FileManageSystem.csprojResolveAssemblyReference.cache │ │ ├── FileManageSystem.exe │ │ ├── FileManageSystem.g.resources │ │ ├── FileManageSystem.pdb │ │ ├── FileManageSystem_Content.g.i.cs │ │ ├── FileManageSystem_MarkupCompile.cache │ │ ├── FileManageSystem_MarkupCompile.i.cache │ │ ├── FileManageSystem_MarkupCompile.i.lref │ │ ├── FileManageSystem_MarkupCompile.lref │ │ ├── FormatControl.baml │ │ ├── FormatControl.g.cs │ │ ├── FormatControl.g.i.cs │ │ ├── GeneratedInternalTypeHelper.g.cs │ │ ├── GeneratedInternalTypeHelper.g.i.cs │ │ ├── MainWindow.baml │ │ ├── MainWindow.g.cs │ │ ├── MainWindow.g.i.cs │ │ ├── RenameControl - 复制.g.i.cs │ │ ├── RenameControl.baml │ │ ├── RenameControl.g.cs │ │ ├── RenameControl.g.i.cs │ │ ├── TempPE │ │ │ └── Properties.Resources.Designer.cs.dll │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ └── Release │ │ ├── App.baml │ │ ├── App.g.cs │ │ ├── App.g.i.cs │ │ ├── AttributeWindow.baml │ │ ├── AttributeWindow.g.cs │ │ ├── AttributeWindow.g.i.cs │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ ├── DetailWindow.baml │ │ ├── DetailWindow.g.cs │ │ ├── DetailWindow.g.i.cs │ │ ├── EditWindow.baml │ │ ├── EditWindow.g.cs │ │ ├── EditWindow.g.i.cs │ │ ├── FileManageSystem.Properties.Resources.resources │ │ ├── FileManageSystem.csproj.FileListAbsolute.txt │ │ ├── FileManageSystem.csproj.GenerateResource.Cache │ │ ├── FileManageSystem.csprojResolveAssemblyReference.cache │ │ ├── FileManageSystem.exe │ │ ├── FileManageSystem.g.resources │ │ ├── FileManageSystem.pdb │ │ ├── FileManageSystem_MarkupCompile.cache │ │ ├── FileManageSystem_MarkupCompile.i.cache │ │ ├── FileManageSystem_MarkupCompile.lref │ │ ├── FormatControl.baml │ │ ├── FormatControl.g.cs │ │ ├── FormatControl.g.i.cs │ │ ├── GeneratedInternalTypeHelper.g.cs │ │ ├── GeneratedInternalTypeHelper.g.i.cs │ │ ├── MainWindow.baml │ │ ├── MainWindow.g.cs │ │ ├── MainWindow.g.i.cs │ │ ├── RenameControl.baml │ │ ├── RenameControl.g.cs │ │ ├── RenameControl.g.i.cs │ │ ├── TempPE │ │ └── Properties.Resources.Designer.cs.dll │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs └── packages.config ├── README.md └── packages ├── MaterialDesignColors.1.1.2 ├── MaterialDesignColors.1.1.2.nupkg └── lib │ └── net45 │ └── MaterialDesignColors.dll └── MaterialDesignThemes.2.3.0.823 ├── MaterialDesignThemes.2.3.0.823.nupkg ├── lib └── net45 │ ├── MaterialDesignThemes.Wpf.XML │ ├── MaterialDesignThemes.Wpf.dll │ └── MaterialDesignThemes.Wpf.pdb └── src └── net45 ├── Badged.cs ├── Card.cs ├── Chip.cs ├── Clock.cs ├── ClockChoiceMadeEventArgs.cs ├── ClockItemButton.cs ├── ColorZone.cs ├── ColorZoneAssist.cs ├── ComboBoxAssist.cs ├── ComboBoxPopup.cs ├── Converters ├── BooleanToVisibilityConverter.cs ├── BrushRoundConverter.cs ├── BrushToRadialGradientBrushConverter.cs ├── CalendarDateCoalesceConverter.cs ├── CircularProgressBar │ ├── ArcEndPointConverter.cs │ ├── ArcSizeConverter.cs │ ├── LargeArcConverter.cs │ ├── LocalEx.cs │ ├── RotateTransformCentreConverter.cs │ ├── RotateTransformConverter.cs │ └── StartPointConverter.cs ├── ClockItemIsCheckedConverter.cs ├── ClockLineConverter.cs ├── DrawerOffsetConverter.cs ├── EqualityToVisibilityConverter.cs ├── HintProxyFabricConverter.cs ├── ListViewItemContainerStyleConverter.cs ├── MathConverter.cs ├── MathMultipleConverter.cs ├── NotConverter.cs ├── NotZeroToVisibilityConverter.cs ├── NullToVisibilityConverter.cs ├── NullableDateTimeToCurrentDateConverter.cs ├── PointValueConverter.cs ├── RangePositionConverterConverter.cs ├── ShadowConverter.cs ├── SizeToRectConverter.cs ├── SnackbarMessageTypeConverter.cs ├── TextFieldHintVisibilityConverter.cs └── TimeToVisibilityConverter.cs ├── CustomPopupPlacementCallbackHelper.cs ├── DataGridAssist.cs ├── DateTimeEx.cs ├── DialogClosingEventArgs.cs ├── DialogClosingEventHandler.cs ├── DialogHost.cs ├── DialogHostEx.cs ├── DialogOpenedEventArgs.cs ├── DialogOpenedEventHandler.cs ├── DialogSession.cs ├── DpiHelper.cs ├── DrawerHost.cs ├── Extensions.cs ├── Flipper.cs ├── HintAssist.cs ├── HintProxyFabric.ComboBox.cs ├── HintProxyFabric.PasswordBox.cs ├── HintProxyFabric.TextBox.cs ├── HintProxyFabric.cs ├── IHintProxy.cs ├── ISnackbarMessageQueue.cs ├── Icon.cs ├── IconType.cs ├── ListBoxAssist.cs ├── ListSortDirectionIndicator.cs ├── ListViewAssist.cs ├── MaterialDataGridComboBoxColumn.cs ├── MaterialDataGridTextColumn.cs ├── MaterialDateDisplay.cs ├── MessageQueueExtension.cs ├── PackIcon.cs ├── PackIconDataFactory.cs ├── PackIconExtension.cs ├── PackIconKind.cs ├── Palette.cs ├── PaletteHelper.cs ├── Plane3D.cs ├── PopupBox.cs ├── Properties ├── AssemblyInfo.cs ├── Resources.Designer.cs └── Settings.Designer.cs ├── RatingBar.cs ├── RatingBarButton.cs ├── Ripple.cs ├── RippleAssist.cs ├── ScaleHost.cs ├── ShadowAssist.cs ├── SmartHint.cs ├── Snackbar.cs ├── SnackbarMessage.cs ├── SnackbarMessageEventArgs.cs ├── SnackbarMessageQueue.cs ├── SnackbarMessageQueueItem.cs ├── StringExtensions.cs ├── TextFieldAssist.cs ├── TimePicker.cs ├── ToggleButtonAssist.cs ├── ToolTipAssist.cs ├── Transitions ├── CircleWipe.cs ├── ITransitionEffect.cs ├── ITransitionEffectSubject.cs ├── ITransitionWipe.cs ├── IZIndexController.cs ├── IndexedItemOffsetMultiplierExtension.cs ├── SlideOutWipe.cs ├── TransitionAssist.cs ├── TransitionEffect.cs ├── TransitionEffectBase.cs ├── TransitionEffectExtension.cs ├── TransitionEffectKind.cs ├── TransitionEffectTypeConverter.cs ├── Transitioner.cs ├── TransitionerSlide.cs ├── TransitionerSlideState.cs ├── TransitioningContent.cs └── TransitioningContentBase.cs ├── TreeHelper.cs ├── Underline.cs ├── ValidationAssist.cs └── obj └── AppVeyor └── GeneratedInternalTypeHelper.g.cs /.vs/FileManageSystem/v14/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/.vs/FileManageSystem/v14/.suo -------------------------------------------------------------------------------- /FileManageSystem.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.23107.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FileManageSystem", "FileManageSystem\FileManageSystem.csproj", "{0A61801D-9D6E-4741-9830-4359F4DB6C6F}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {0A61801D-9D6E-4741-9830-4359F4DB6C6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {0A61801D-9D6E-4741-9830-4359F4DB6C6F}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {0A61801D-9D6E-4741-9830-4359F4DB6C6F}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {0A61801D-9D6E-4741-9830-4359F4DB6C6F}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /FileManageSystem/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /FileManageSystem/App.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /FileManageSystem/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | 9 | namespace FileManageSystem 10 | { 11 | /// 12 | /// App.xaml 的交互逻辑 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /FileManageSystem/Block.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace FileManageSystem 8 | { 9 | public class Block 10 | { 11 | public byte[] content; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /FileManageSystem/DetailWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Shapes; 14 | 15 | namespace FileManageSystem 16 | { 17 | /// 18 | /// FileDetailWindow.xaml 的交互逻辑 19 | /// 20 | public partial class DetailWindow : Window 21 | { 22 | public DetailWindow(File file) 23 | { 24 | InitializeComponent(); 25 | showFile(file); 26 | this.Title = file.Name + " 属性"; 27 | } 28 | //显示文件 29 | public void showFile(File file) 30 | { 31 | detains_name.Text = file.Name; 32 | detains_size.Text = file.Size+ " B"; 33 | detains_op_size.Text = file.Occupation_space + " B"; 34 | 35 | detains_path.Text = file.Path; 36 | detains_date.Text = file.Date; 37 | detains_type.Text = file.Type; 38 | if(file.Authority == File.FileAuthority.OR) 39 | { 40 | detains_is_read.IsChecked = true; 41 | detains_is_write.IsChecked = false; 42 | } 43 | else 44 | { 45 | detains_is_read.IsChecked = false; 46 | detains_is_write.IsChecked = true; 47 | } 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /FileManageSystem/EditWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Shapes; 14 | 15 | namespace FileManageSystem 16 | { 17 | /// 18 | /// EditWindow.xaml 的交互逻辑 19 | /// 20 | public partial class EditWindow : Window 21 | { 22 | public EditWindow() 23 | { 24 | InitializeComponent(); 25 | text_content.Text = DiskManage.getStrContent(CategoryManage.selectedFile.Disk_start, CategoryManage.selectedFile.Size); 26 | } 27 | 28 | public void save_MenuItem_Click(object sender, RoutedEventArgs e) 29 | { 30 | int size = 0; 31 | DiskManage.deleteFile(CategoryManage.selectedFile.Disk_start); //删除原本磁盘 32 | int start = DiskManage.saveContent(text_content.Text, ref size); 33 | CategoryManage.selectedFile.Disk_start = start; 34 | CategoryManage.selectedFile.Size = size; 35 | CategoryManage.selectedFile.Occupation_space = (int)Math.Ceiling(Convert.ToDouble(size / 512.0)) * 512; 36 | CategoryManage.selectedFile.Date = DateTime.Now.ToString(); 37 | CategoryManage.Update(); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /FileManageSystem/FormatControl.xaml: -------------------------------------------------------------------------------- 1 |  11 | 12 | 13 | 14 | 15 | 16 | 17 | 你确定要格式化?(不可撤销) 18 | 19 | 21 | 28 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /FileManageSystem/FormatControl.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Collections.ObjectModel; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | using System.Windows.Controls; 9 | using System.Windows.Data; 10 | using System.Windows.Documents; 11 | using System.Windows.Input; 12 | using System.Windows.Media; 13 | using System.Windows.Media.Imaging; 14 | using System.Windows.Navigation; 15 | using System.Windows.Shapes; 16 | 17 | namespace FileManageSystem 18 | { 19 | /// 20 | /// RenameControl.xaml 的交互逻辑 21 | /// 22 | public partial class FormatControl : UserControl 23 | { 24 | public FormatControl() 25 | { 26 | InitializeComponent(); 27 | } 28 | 29 | void sure_click(object sender, RoutedEventArgs e) 30 | { 31 | CategoryManage.Create.SubFiles = new ObservableCollection(); 32 | CategoryManage.Create.Date = DateTime.Now.ToString(); 33 | CategoryManage.Create.Name = "CxtDisk"; 34 | CategoryManage.Create.Path = "CxtDisk"; 35 | CategoryManage.Create.Size = 0; 36 | CategoryManage.Create.Occupation_space = 0; 37 | CategoryManage.listFiles = CategoryManage.Create.SubFiles; 38 | CategoryManage.CurrentFile = CategoryManage.Create; 39 | DiskManage.clearDisk(); 40 | CategoryManage.Update(); 41 | 42 | } 43 | void cancle_click(object sender, RoutedEventArgs e) 44 | { 45 | 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /FileManageSystem/IsFolder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Collections.ObjectModel; 4 | using System.Globalization; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | using System.Windows.Data; 9 | 10 | namespace FileManageSystem 11 | { 12 | public class IsFolder : IValueConverter 13 | { 14 | 15 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 16 | { 17 | throw new NotImplementedException(); 18 | } 19 | 20 | object IValueConverter.Convert(object value, Type targetType, object parameter, CultureInfo culture) 21 | { 22 | 23 | ObservableCollection files = (ObservableCollection)value; 24 | //ObservableCollection m = new ObservableCollection(); 25 | //for (int i = 0; i < files.Count; i++) 26 | //{ 27 | // m.Add(files[i]); 28 | //} 29 | //bool b = false; 30 | for(int i = 0; i < files.Count; i++) 31 | { 32 | if (files[i].Type.Equals("Folder")) 33 | { 34 | //b = true; 35 | return value; 36 | //for(int j = 0; j < files[i].SubFiles.Count; j++) 37 | //{ 38 | // if (files[i].SubFiles[j].Type.Equals("File")) 39 | // { 40 | // files[i].SubFiles.Remove(files[i].SubFiles[j]); 41 | // } 42 | // } 43 | } 44 | 45 | } 46 | return null; 47 | // return (ObservableCollection)value; 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /FileManageSystem/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Resources; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | using System.Windows; 6 | 7 | // 有关程序集的一般信息由以下 8 | // 控制。更改这些特性值可修改 9 | // 与程序集关联的信息。 10 | [assembly: AssemblyTitle("FileManageSystem")] 11 | [assembly: AssemblyDescription("")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("")] 14 | [assembly: AssemblyProduct("FileManageSystem")] 15 | [assembly: AssemblyCopyright("Copyright © 2017")] 16 | [assembly: AssemblyTrademark("")] 17 | [assembly: AssemblyCulture("")] 18 | 19 | //将 ComVisible 设置为 false 将使此程序集中的类型 20 | //对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, 21 | //请将此类型的 ComVisible 特性设置为 true。 22 | [assembly: ComVisible(false)] 23 | 24 | //若要开始生成可本地化的应用程序,请 25 | // 中的 .csproj 文件中 26 | //例如,如果您在源文件中使用的是美国英语, 27 | //使用的是美国英语,请将 设置为 en-US。 然后取消 28 | //对以下 NeutralResourceLanguage 特性的注释。 更新 29 | //以下行中的“en-US”以匹配项目文件中的 UICulture 设置。 30 | 31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 32 | 33 | 34 | [assembly: ThemeInfo( 35 | ResourceDictionaryLocation.None, //主题特定资源词典所处位置 36 | //(当资源未在页面 37 | //或应用程序资源字典中找到时使用) 38 | ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置 39 | //(当资源未在页面 40 | //、应用程序或任何主题专用资源字典中找到时使用) 41 | )] 42 | 43 | 44 | // 程序集的版本信息由下列四个值组成: 45 | // 46 | // 主版本 47 | // 次版本 48 | // 生成号 49 | // 修订号 50 | // 51 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, 52 | // 方法是按如下所示使用“*”: : 53 | // [assembly: AssemblyVersion("1.0.*")] 54 | [assembly: AssemblyVersion("1.0.0.0")] 55 | [assembly: AssemblyFileVersion("1.0.0.0")] 56 | -------------------------------------------------------------------------------- /FileManageSystem/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本: 4.0.30319.42000 5 | // 6 | // 对此文件的更改可能导致不正确的行为,如果 7 | // 重新生成代码,则所做更改将丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace FileManageSystem.Properties 12 | { 13 | 14 | 15 | /// 16 | /// 强类型资源类,用于查找本地化字符串等。 17 | /// 18 | // 此类是由 StronglyTypedResourceBuilder 19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 20 | // 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen 21 | // (以 /str 作为命令选项),或重新生成 VS 项目。 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources 26 | { 27 | 28 | private static global::System.Resources.ResourceManager resourceMan; 29 | 30 | private static global::System.Globalization.CultureInfo resourceCulture; 31 | 32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 33 | internal Resources() 34 | { 35 | } 36 | 37 | /// 38 | /// 返回此类使用的缓存 ResourceManager 实例。 39 | /// 40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 41 | internal static global::System.Resources.ResourceManager ResourceManager 42 | { 43 | get 44 | { 45 | if ((resourceMan == null)) 46 | { 47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FileManageSystem.Properties.Resources", typeof(Resources).Assembly); 48 | resourceMan = temp; 49 | } 50 | return resourceMan; 51 | } 52 | } 53 | 54 | /// 55 | /// 覆盖当前线程的 CurrentUICulture 属性 56 | /// 使用此强类型的资源类的资源查找。 57 | /// 58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 59 | internal static global::System.Globalization.CultureInfo Culture 60 | { 61 | get 62 | { 63 | return resourceCulture; 64 | } 65 | set 66 | { 67 | resourceCulture = value; 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /FileManageSystem/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 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 FileManageSystem.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /FileManageSystem/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /FileManageSystem/RenameControl.xaml: -------------------------------------------------------------------------------- 1 |  11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 重命名 : 19 | 22 | 23 | 24 | 26 | 33 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /FileManageSystem/RenameControl.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace FileManageSystem 17 | { 18 | /// 19 | /// RenameControl.xaml 的交互逻辑 20 | /// 21 | public partial class RenameControl : UserControl 22 | { 23 | public RenameControl() 24 | { 25 | InitializeComponent(); 26 | rename_textbox.Text = CategoryManage.selectedFile.Name; 27 | } 28 | 29 | void save_click(object sender, RoutedEventArgs e) 30 | { 31 | if (!rename_textbox.Text.Equals("")) 32 | { 33 | if(rename_textbox.Text.Length > 19) 34 | { 35 | MessageBox.Show("文件名过长!"); 36 | } 37 | else if(!CategoryManage.IsSameName(CategoryManage.selectedFile, rename_textbox.Text)) 38 | { 39 | CategoryManage.selectedFile.Name = rename_textbox.Text; 40 | CategoryManage.selectedFile.Path = CategoryManage.selectedFile.Path.Substring(0, CategoryManage.selectedFile.Path.LastIndexOf('/')+1) + 41 | rename_textbox.Text; 42 | CategoryManage.selectedFile.Date = DateTime.Now.ToString(); 43 | CategoryManage.Update(); 44 | } 45 | else 46 | { 47 | MessageBox.Show("文件名已存在!"); 48 | } 49 | } 50 | } 51 | void cancle_click(object sender, RoutedEventArgs e) 52 | { 53 | 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /FileManageSystem/Transform.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace FileManageSystem 8 | { 9 | public static class Transform 10 | { 11 | //字节转字符串 12 | public static string getString(byte[] bytes) 13 | { 14 | return System.Text.Encoding.Default.GetString(bytes); 15 | } 16 | //字符串转字节 17 | public static byte[] getBytes(string str) 18 | { 19 | return System.Text.Encoding.Default.GetBytes(str); 20 | } 21 | //int转字节 22 | public static byte[] getBytes(int i) 23 | { 24 | return BitConverter.GetBytes(i); 25 | } 26 | //字节转int 27 | public static int getInt(byte[] bytes) 28 | { 29 | return BitConverter.ToInt32(bytes, 0); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /FileManageSystem/back.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/back.jpg -------------------------------------------------------------------------------- /FileManageSystem/bin/Debug/CategoryDisk.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/bin/Debug/CategoryDisk.dat -------------------------------------------------------------------------------- /FileManageSystem/bin/Debug/FileManageSystem.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/bin/Debug/FileManageSystem.exe -------------------------------------------------------------------------------- /FileManageSystem/bin/Debug/FileManageSystem.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /FileManageSystem/bin/Debug/FileManageSystem.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/bin/Debug/FileManageSystem.pdb -------------------------------------------------------------------------------- /FileManageSystem/bin/Debug/FileManageSystem.vshost.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/bin/Debug/FileManageSystem.vshost.exe -------------------------------------------------------------------------------- /FileManageSystem/bin/Debug/FileManageSystem.vshost.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /FileManageSystem/bin/Debug/FileManageSystem.vshost.exe.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /FileManageSystem/bin/Debug/FileManageSystem.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/bin/Debug/FileManageSystem.zip -------------------------------------------------------------------------------- /FileManageSystem/bin/Debug/MaterialDesignColors.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/bin/Debug/MaterialDesignColors.dll -------------------------------------------------------------------------------- /FileManageSystem/bin/Debug/MaterialDesignThemes.Wpf.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/bin/Debug/MaterialDesignThemes.Wpf.dll -------------------------------------------------------------------------------- /FileManageSystem/bin/Debug/MaterialDesignThemes.Wpf.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/bin/Debug/MaterialDesignThemes.Wpf.pdb -------------------------------------------------------------------------------- /FileManageSystem/bin/Debug/myDisk.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/bin/Debug/myDisk.dat -------------------------------------------------------------------------------- /FileManageSystem/bin/Release.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/bin/Release.zip -------------------------------------------------------------------------------- /FileManageSystem/bin/Release/CategoryDisk.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/bin/Release/CategoryDisk.dat -------------------------------------------------------------------------------- /FileManageSystem/bin/Release/FileManageSystem.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/bin/Release/FileManageSystem.exe -------------------------------------------------------------------------------- /FileManageSystem/bin/Release/FileManageSystem.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /FileManageSystem/bin/Release/FileManageSystem.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/bin/Release/FileManageSystem.pdb -------------------------------------------------------------------------------- /FileManageSystem/bin/Release/FileManageSystem.vshost.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/bin/Release/FileManageSystem.vshost.exe -------------------------------------------------------------------------------- /FileManageSystem/bin/Release/FileManageSystem.vshost.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /FileManageSystem/bin/Release/FileManageSystem.vshost.exe.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /FileManageSystem/bin/Release/MaterialDesignColors.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/bin/Release/MaterialDesignColors.dll -------------------------------------------------------------------------------- /FileManageSystem/bin/Release/MaterialDesignThemes.Wpf.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/bin/Release/MaterialDesignThemes.Wpf.dll -------------------------------------------------------------------------------- /FileManageSystem/bin/Release/MaterialDesignThemes.Wpf.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/bin/Release/MaterialDesignThemes.Wpf.pdb -------------------------------------------------------------------------------- /FileManageSystem/bin/Release/myDisk.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/bin/Release/myDisk.dat -------------------------------------------------------------------------------- /FileManageSystem/myDisk.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/myDisk.dat -------------------------------------------------------------------------------- /FileManageSystem/obj/Debug/App.baml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/obj/Debug/App.baml -------------------------------------------------------------------------------- /FileManageSystem/obj/Debug/App.g.cs: -------------------------------------------------------------------------------- 1 | #pragma checksum "..\..\App.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "1A9A79609D314F3E3905609A6C7AAC10" 2 | //------------------------------------------------------------------------------ 3 | // 4 | // 此代码由工具生成。 5 | // 运行时版本:4.0.30319.42000 6 | // 7 | // 对此文件的更改可能会导致不正确的行为,并且如果 8 | // 重新生成代码,这些更改将会丢失。 9 | // 10 | //------------------------------------------------------------------------------ 11 | 12 | using FileManageSystem; 13 | using System; 14 | using System.Diagnostics; 15 | using System.Windows; 16 | using System.Windows.Automation; 17 | using System.Windows.Controls; 18 | using System.Windows.Controls.Primitives; 19 | using System.Windows.Data; 20 | using System.Windows.Documents; 21 | using System.Windows.Ink; 22 | using System.Windows.Input; 23 | using System.Windows.Markup; 24 | using System.Windows.Media; 25 | using System.Windows.Media.Animation; 26 | using System.Windows.Media.Effects; 27 | using System.Windows.Media.Imaging; 28 | using System.Windows.Media.Media3D; 29 | using System.Windows.Media.TextFormatting; 30 | using System.Windows.Navigation; 31 | using System.Windows.Shapes; 32 | using System.Windows.Shell; 33 | 34 | 35 | namespace FileManageSystem { 36 | 37 | 38 | /// 39 | /// App 40 | /// 41 | public partial class App : System.Windows.Application { 42 | 43 | private bool _contentLoaded; 44 | 45 | /// 46 | /// InitializeComponent 47 | /// 48 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 49 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 50 | public void InitializeComponent() { 51 | if (_contentLoaded) { 52 | return; 53 | } 54 | _contentLoaded = true; 55 | 56 | #line 5 "..\..\App.xaml" 57 | this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative); 58 | 59 | #line default 60 | #line hidden 61 | System.Uri resourceLocater = new System.Uri("/FileManageSystem;component/app.xaml", System.UriKind.Relative); 62 | 63 | #line 1 "..\..\App.xaml" 64 | System.Windows.Application.LoadComponent(this, resourceLocater); 65 | 66 | #line default 67 | #line hidden 68 | } 69 | 70 | /// 71 | /// Application Entry Point. 72 | /// 73 | [System.STAThreadAttribute()] 74 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 75 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 76 | public static void Main() { 77 | FileManageSystem.App app = new FileManageSystem.App(); 78 | app.InitializeComponent(); 79 | app.Run(); 80 | } 81 | } 82 | } 83 | 84 | -------------------------------------------------------------------------------- /FileManageSystem/obj/Debug/App.g.i.cs: -------------------------------------------------------------------------------- 1 | #pragma checksum "..\..\App.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "1A9A79609D314F3E3905609A6C7AAC10" 2 | //------------------------------------------------------------------------------ 3 | // 4 | // 此代码由工具生成。 5 | // 运行时版本:4.0.30319.42000 6 | // 7 | // 对此文件的更改可能会导致不正确的行为,并且如果 8 | // 重新生成代码,这些更改将会丢失。 9 | // 10 | //------------------------------------------------------------------------------ 11 | 12 | using FileManageSystem; 13 | using System; 14 | using System.Diagnostics; 15 | using System.Windows; 16 | using System.Windows.Automation; 17 | using System.Windows.Controls; 18 | using System.Windows.Controls.Primitives; 19 | using System.Windows.Data; 20 | using System.Windows.Documents; 21 | using System.Windows.Ink; 22 | using System.Windows.Input; 23 | using System.Windows.Markup; 24 | using System.Windows.Media; 25 | using System.Windows.Media.Animation; 26 | using System.Windows.Media.Effects; 27 | using System.Windows.Media.Imaging; 28 | using System.Windows.Media.Media3D; 29 | using System.Windows.Media.TextFormatting; 30 | using System.Windows.Navigation; 31 | using System.Windows.Shapes; 32 | using System.Windows.Shell; 33 | 34 | 35 | namespace FileManageSystem { 36 | 37 | 38 | /// 39 | /// App 40 | /// 41 | public partial class App : System.Windows.Application { 42 | 43 | private bool _contentLoaded; 44 | 45 | /// 46 | /// InitializeComponent 47 | /// 48 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 49 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 50 | public void InitializeComponent() { 51 | if (_contentLoaded) { 52 | return; 53 | } 54 | _contentLoaded = true; 55 | 56 | #line 5 "..\..\App.xaml" 57 | this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative); 58 | 59 | #line default 60 | #line hidden 61 | System.Uri resourceLocater = new System.Uri("/FileManageSystem;component/app.xaml", System.UriKind.Relative); 62 | 63 | #line 1 "..\..\App.xaml" 64 | System.Windows.Application.LoadComponent(this, resourceLocater); 65 | 66 | #line default 67 | #line hidden 68 | } 69 | 70 | /// 71 | /// Application Entry Point. 72 | /// 73 | [System.STAThreadAttribute()] 74 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 75 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 76 | public static void Main() { 77 | FileManageSystem.App app = new FileManageSystem.App(); 78 | app.InitializeComponent(); 79 | app.Run(); 80 | } 81 | } 82 | } 83 | 84 | -------------------------------------------------------------------------------- /FileManageSystem/obj/Debug/AttributeWindow.baml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/obj/Debug/AttributeWindow.baml -------------------------------------------------------------------------------- /FileManageSystem/obj/Debug/DesignTimeResolveAssemblyReferences.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/obj/Debug/DesignTimeResolveAssemblyReferences.cache -------------------------------------------------------------------------------- /FileManageSystem/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /FileManageSystem/obj/Debug/DetailWindow.baml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/obj/Debug/DetailWindow.baml -------------------------------------------------------------------------------- /FileManageSystem/obj/Debug/Domain/Sample4Dialog.g.i.cs: -------------------------------------------------------------------------------- 1 | #pragma checksum "..\..\..\Domain\Sample4Dialog.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "2031ED03627A0164A5BB0BD40EF0C90B" 2 | //------------------------------------------------------------------------------ 3 | // 4 | // 此代码由工具生成。 5 | // 运行时版本:4.0.30319.42000 6 | // 7 | // 对此文件的更改可能会导致不正确的行为,并且如果 8 | // 重新生成代码,这些更改将会丢失。 9 | // 10 | //------------------------------------------------------------------------------ 11 | 12 | using MaterialDesignThemes.Wpf; 13 | using System; 14 | using System.Diagnostics; 15 | using System.Windows; 16 | using System.Windows.Automation; 17 | using System.Windows.Controls; 18 | using System.Windows.Controls.Primitives; 19 | using System.Windows.Data; 20 | using System.Windows.Documents; 21 | using System.Windows.Ink; 22 | using System.Windows.Input; 23 | using System.Windows.Markup; 24 | using System.Windows.Media; 25 | using System.Windows.Media.Animation; 26 | using System.Windows.Media.Effects; 27 | using System.Windows.Media.Imaging; 28 | using System.Windows.Media.Media3D; 29 | using System.Windows.Media.TextFormatting; 30 | using System.Windows.Navigation; 31 | using System.Windows.Shapes; 32 | using System.Windows.Shell; 33 | 34 | 35 | namespace FileManageSystem.Domain { 36 | 37 | 38 | /// 39 | /// Sample4Dialog 40 | /// 41 | public partial class Sample4Dialog : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector { 42 | 43 | private bool _contentLoaded; 44 | 45 | /// 46 | /// InitializeComponent 47 | /// 48 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 49 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 50 | public void InitializeComponent() { 51 | if (_contentLoaded) { 52 | return; 53 | } 54 | _contentLoaded = true; 55 | System.Uri resourceLocater = new System.Uri("/FileManageSystem;component/domain/sample4dialog.xaml", System.UriKind.Relative); 56 | 57 | #line 1 "..\..\..\Domain\Sample4Dialog.xaml" 58 | System.Windows.Application.LoadComponent(this, resourceLocater); 59 | 60 | #line default 61 | #line hidden 62 | } 63 | 64 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 65 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 66 | [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 67 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] 68 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] 69 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] 70 | void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { 71 | this._contentLoaded = true; 72 | } 73 | } 74 | } 75 | 76 | -------------------------------------------------------------------------------- /FileManageSystem/obj/Debug/Domain/SampleProgressDialog.g.i.cs: -------------------------------------------------------------------------------- 1 | #pragma checksum "..\..\..\Domain\SampleProgressDialog.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "BD9C74E6310C55712EEF3C8540092D95" 2 | //------------------------------------------------------------------------------ 3 | // 4 | // 此代码由工具生成。 5 | // 运行时版本:4.0.30319.42000 6 | // 7 | // 对此文件的更改可能会导致不正确的行为,并且如果 8 | // 重新生成代码,这些更改将会丢失。 9 | // 10 | //------------------------------------------------------------------------------ 11 | 12 | using System; 13 | using System.Diagnostics; 14 | using System.Windows; 15 | using System.Windows.Automation; 16 | using System.Windows.Controls; 17 | using System.Windows.Controls.Primitives; 18 | using System.Windows.Data; 19 | using System.Windows.Documents; 20 | using System.Windows.Ink; 21 | using System.Windows.Input; 22 | using System.Windows.Markup; 23 | using System.Windows.Media; 24 | using System.Windows.Media.Animation; 25 | using System.Windows.Media.Effects; 26 | using System.Windows.Media.Imaging; 27 | using System.Windows.Media.Media3D; 28 | using System.Windows.Media.TextFormatting; 29 | using System.Windows.Navigation; 30 | using System.Windows.Shapes; 31 | using System.Windows.Shell; 32 | 33 | 34 | namespace FileManageSystem.Domain { 35 | 36 | 37 | /// 38 | /// SampleProgressDialog 39 | /// 40 | public partial class SampleProgressDialog : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector { 41 | 42 | private bool _contentLoaded; 43 | 44 | /// 45 | /// InitializeComponent 46 | /// 47 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 48 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 49 | public void InitializeComponent() { 50 | if (_contentLoaded) { 51 | return; 52 | } 53 | _contentLoaded = true; 54 | System.Uri resourceLocater = new System.Uri("/FileManageSystem;component/domain/sampleprogressdialog.xaml", System.UriKind.Relative); 55 | 56 | #line 1 "..\..\..\Domain\SampleProgressDialog.xaml" 57 | System.Windows.Application.LoadComponent(this, resourceLocater); 58 | 59 | #line default 60 | #line hidden 61 | } 62 | 63 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 64 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 65 | [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 66 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] 67 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] 68 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] 69 | void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { 70 | this._contentLoaded = true; 71 | } 72 | } 73 | } 74 | 75 | -------------------------------------------------------------------------------- /FileManageSystem/obj/Debug/EditWindow.baml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/obj/Debug/EditWindow.baml -------------------------------------------------------------------------------- /FileManageSystem/obj/Debug/FileDetailWindow.g.i.cs: -------------------------------------------------------------------------------- 1 | #pragma checksum "..\..\FileDetailWindow.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "6C6613FC643F5D8A89B0F8C7CC3F1CA4" 2 | //------------------------------------------------------------------------------ 3 | // 4 | // 此代码由工具生成。 5 | // 运行时版本:4.0.30319.42000 6 | // 7 | // 对此文件的更改可能会导致不正确的行为,并且如果 8 | // 重新生成代码,这些更改将会丢失。 9 | // 10 | //------------------------------------------------------------------------------ 11 | 12 | using FileManageSystem; 13 | using System; 14 | using System.Diagnostics; 15 | using System.Windows; 16 | using System.Windows.Automation; 17 | using System.Windows.Controls; 18 | using System.Windows.Controls.Primitives; 19 | using System.Windows.Data; 20 | using System.Windows.Documents; 21 | using System.Windows.Ink; 22 | using System.Windows.Input; 23 | using System.Windows.Markup; 24 | using System.Windows.Media; 25 | using System.Windows.Media.Animation; 26 | using System.Windows.Media.Effects; 27 | using System.Windows.Media.Imaging; 28 | using System.Windows.Media.Media3D; 29 | using System.Windows.Media.TextFormatting; 30 | using System.Windows.Navigation; 31 | using System.Windows.Shapes; 32 | using System.Windows.Shell; 33 | 34 | 35 | namespace FileManageSystem { 36 | 37 | 38 | /// 39 | /// FileDetailWindow 40 | /// 41 | public partial class FileDetailWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector { 42 | 43 | private bool _contentLoaded; 44 | 45 | /// 46 | /// InitializeComponent 47 | /// 48 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 49 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 50 | public void InitializeComponent() { 51 | if (_contentLoaded) { 52 | return; 53 | } 54 | _contentLoaded = true; 55 | System.Uri resourceLocater = new System.Uri("/FileManageSystem;component/filedetailwindow.xaml", System.UriKind.Relative); 56 | 57 | #line 1 "..\..\FileDetailWindow.xaml" 58 | System.Windows.Application.LoadComponent(this, resourceLocater); 59 | 60 | #line default 61 | #line hidden 62 | } 63 | 64 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 65 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 66 | [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 67 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] 68 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] 69 | [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] 70 | void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { 71 | this._contentLoaded = true; 72 | } 73 | } 74 | } 75 | 76 | -------------------------------------------------------------------------------- /FileManageSystem/obj/Debug/FileManageSystem.Properties.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/obj/Debug/FileManageSystem.Properties.Resources.resources -------------------------------------------------------------------------------- /FileManageSystem/obj/Debug/FileManageSystem.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\bin\Debug\FileManageSystem.exe.config 2 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\bin\Debug\FileManageSystem.exe 3 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\bin\Debug\FileManageSystem.pdb 4 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\bin\Debug\MaterialDesignColors.dll 5 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\bin\Debug\MaterialDesignThemes.Wpf.dll 6 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\bin\Debug\MaterialDesignThemes.Wpf.pdb 7 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\bin\Debug\MaterialDesignThemes.Wpf.xml 8 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Debug\FileManageSystem.csprojResolveAssemblyReference.cache 9 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Debug\MainWindow.g.cs 10 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Debug\App.g.cs 11 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Debug\FileManageSystem_MarkupCompile.cache 12 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Debug\FileManageSystem_MarkupCompile.lref 13 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Debug\App.baml 14 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Debug\MainWindow.baml 15 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Debug\FileManageSystem.g.resources 16 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Debug\FileManageSystem.Properties.Resources.resources 17 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Debug\FileManageSystem.csproj.GenerateResource.Cache 18 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Debug\FileManageSystem.exe 19 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Debug\FileManageSystem.pdb 20 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Debug\GeneratedInternalTypeHelper.g.cs 21 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Debug\EditWindow.g.cs 22 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Debug\DetailWindow.g.cs 23 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Debug\EditWindow.baml 24 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Debug\DetailWindow.baml 25 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Debug\RenameControl.g.cs 26 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Debug\RenameControl.baml 27 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Debug\AttributeWindow.g.cs 28 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Debug\AttributeWindow.baml 29 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Debug\FormatControl.g.cs 30 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Debug\FormatControl.baml 31 | -------------------------------------------------------------------------------- /FileManageSystem/obj/Debug/FileManageSystem.csproj.GenerateResource.Cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/obj/Debug/FileManageSystem.csproj.GenerateResource.Cache -------------------------------------------------------------------------------- /FileManageSystem/obj/Debug/FileManageSystem.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/obj/Debug/FileManageSystem.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /FileManageSystem/obj/Debug/FileManageSystem.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/obj/Debug/FileManageSystem.exe -------------------------------------------------------------------------------- /FileManageSystem/obj/Debug/FileManageSystem.g.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/obj/Debug/FileManageSystem.g.resources -------------------------------------------------------------------------------- /FileManageSystem/obj/Debug/FileManageSystem.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/obj/Debug/FileManageSystem.pdb -------------------------------------------------------------------------------- /FileManageSystem/obj/Debug/FileManageSystem_Content.g.i.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本:4.0.30319.42000 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将会丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | [assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("back.jpg")] 12 | 13 | 14 | -------------------------------------------------------------------------------- /FileManageSystem/obj/Debug/FileManageSystem_MarkupCompile.cache: -------------------------------------------------------------------------------- 1 | FileManageSystem 2 | 3 | 4 | winexe 5 | C# 6 | .cs 7 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Debug\ 8 | FileManageSystem 9 | none 10 | false 11 | DEBUG;TRACE 12 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\App.xaml 13 | 61010916316 14 | 15 | 16-1973054738 16 | 171304694942 17 | AttributeWindow.xaml;EditWindow.xaml;DetailWindow.xaml;MainWindow.xaml;FormatControl.xaml;RenameControl.xaml; 18 | 19 | False 20 | 21 | -------------------------------------------------------------------------------- /FileManageSystem/obj/Debug/FileManageSystem_MarkupCompile.i.cache: -------------------------------------------------------------------------------- 1 | FileManageSystem 2 | 3 | 4 | winexe 5 | C# 6 | .cs 7 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Debug\ 8 | FileManageSystem 9 | none 10 | false 11 | DEBUG;TRACE 12 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\App.xaml 13 | 61010916316 14 | 15 | 20886457928 16 | 171304694942 17 | AttributeWindow.xaml;EditWindow.xaml;DetailWindow.xaml;MainWindow.xaml;FormatControl.xaml;RenameControl.xaml; 18 | 19 | True 20 | 21 | -------------------------------------------------------------------------------- /FileManageSystem/obj/Debug/FileManageSystem_MarkupCompile.i.lref: -------------------------------------------------------------------------------- 1 |  2 | 3 | FC:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\MainWindow.xaml;; 4 | 5 | -------------------------------------------------------------------------------- /FileManageSystem/obj/Debug/FileManageSystem_MarkupCompile.lref: -------------------------------------------------------------------------------- 1 |  2 | FC:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\App.xaml;; 3 | FC:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\AttributeWindow.xaml;; 4 | FC:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\EditWindow.xaml;; 5 | FC:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\DetailWindow.xaml;; 6 | FC:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\MainWindow.xaml;; 7 | FC:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\RenameControl.xaml;; 8 | FC:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\FormatControl.xaml;; 9 | 10 | -------------------------------------------------------------------------------- /FileManageSystem/obj/Debug/FormatControl.baml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/obj/Debug/FormatControl.baml -------------------------------------------------------------------------------- /FileManageSystem/obj/Debug/GeneratedInternalTypeHelper.g.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本:4.0.30319.42000 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将会丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace XamlGeneratedNamespace { 12 | 13 | 14 | /// 15 | /// GeneratedInternalTypeHelper 16 | /// 17 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 18 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 19 | [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 20 | public sealed class GeneratedInternalTypeHelper : System.Windows.Markup.InternalTypeHelper { 21 | 22 | /// 23 | /// CreateInstance 24 | /// 25 | protected override object CreateInstance(System.Type type, System.Globalization.CultureInfo culture) { 26 | return System.Activator.CreateInstance(type, ((System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic) 27 | | (System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.CreateInstance)), null, null, culture); 28 | } 29 | 30 | /// 31 | /// GetPropertyValue 32 | /// 33 | protected override object GetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, System.Globalization.CultureInfo culture) { 34 | return propertyInfo.GetValue(target, System.Reflection.BindingFlags.Default, null, null, culture); 35 | } 36 | 37 | /// 38 | /// SetPropertyValue 39 | /// 40 | protected override void SetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, object value, System.Globalization.CultureInfo culture) { 41 | propertyInfo.SetValue(target, value, System.Reflection.BindingFlags.Default, null, null, culture); 42 | } 43 | 44 | /// 45 | /// CreateDelegate 46 | /// 47 | protected override System.Delegate CreateDelegate(System.Type delegateType, object target, string handler) { 48 | return ((System.Delegate)(target.GetType().InvokeMember("_CreateDelegate", (System.Reflection.BindingFlags.InvokeMethod 49 | | (System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)), null, target, new object[] { 50 | delegateType, 51 | handler}, null))); 52 | } 53 | 54 | /// 55 | /// AddEventHandler 56 | /// 57 | protected override void AddEventHandler(System.Reflection.EventInfo eventInfo, object target, System.Delegate handler) { 58 | eventInfo.AddEventHandler(target, handler); 59 | } 60 | } 61 | } 62 | 63 | -------------------------------------------------------------------------------- /FileManageSystem/obj/Debug/GeneratedInternalTypeHelper.g.i.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本:4.0.30319.42000 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将会丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace XamlGeneratedNamespace { 12 | 13 | 14 | /// 15 | /// GeneratedInternalTypeHelper 16 | /// 17 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 18 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 19 | [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 20 | public sealed class GeneratedInternalTypeHelper : System.Windows.Markup.InternalTypeHelper { 21 | 22 | /// 23 | /// CreateInstance 24 | /// 25 | protected override object CreateInstance(System.Type type, System.Globalization.CultureInfo culture) { 26 | return System.Activator.CreateInstance(type, ((System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic) 27 | | (System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.CreateInstance)), null, null, culture); 28 | } 29 | 30 | /// 31 | /// GetPropertyValue 32 | /// 33 | protected override object GetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, System.Globalization.CultureInfo culture) { 34 | return propertyInfo.GetValue(target, System.Reflection.BindingFlags.Default, null, null, culture); 35 | } 36 | 37 | /// 38 | /// SetPropertyValue 39 | /// 40 | protected override void SetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, object value, System.Globalization.CultureInfo culture) { 41 | propertyInfo.SetValue(target, value, System.Reflection.BindingFlags.Default, null, null, culture); 42 | } 43 | 44 | /// 45 | /// CreateDelegate 46 | /// 47 | protected override System.Delegate CreateDelegate(System.Type delegateType, object target, string handler) { 48 | return ((System.Delegate)(target.GetType().InvokeMember("_CreateDelegate", (System.Reflection.BindingFlags.InvokeMethod 49 | | (System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)), null, target, new object[] { 50 | delegateType, 51 | handler}, null))); 52 | } 53 | 54 | /// 55 | /// AddEventHandler 56 | /// 57 | protected override void AddEventHandler(System.Reflection.EventInfo eventInfo, object target, System.Delegate handler) { 58 | eventInfo.AddEventHandler(target, handler); 59 | } 60 | } 61 | } 62 | 63 | -------------------------------------------------------------------------------- /FileManageSystem/obj/Debug/MainWindow.baml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/obj/Debug/MainWindow.baml -------------------------------------------------------------------------------- /FileManageSystem/obj/Debug/RenameControl.baml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/obj/Debug/RenameControl.baml -------------------------------------------------------------------------------- /FileManageSystem/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll -------------------------------------------------------------------------------- /FileManageSystem/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs -------------------------------------------------------------------------------- /FileManageSystem/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs -------------------------------------------------------------------------------- /FileManageSystem/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs -------------------------------------------------------------------------------- /FileManageSystem/obj/Release/App.baml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/obj/Release/App.baml -------------------------------------------------------------------------------- /FileManageSystem/obj/Release/App.g.cs: -------------------------------------------------------------------------------- 1 | #pragma checksum "..\..\App.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "1A9A79609D314F3E3905609A6C7AAC10" 2 | //------------------------------------------------------------------------------ 3 | // 4 | // 此代码由工具生成。 5 | // 运行时版本:4.0.30319.42000 6 | // 7 | // 对此文件的更改可能会导致不正确的行为,并且如果 8 | // 重新生成代码,这些更改将会丢失。 9 | // 10 | //------------------------------------------------------------------------------ 11 | 12 | using FileManageSystem; 13 | using System; 14 | using System.Diagnostics; 15 | using System.Windows; 16 | using System.Windows.Automation; 17 | using System.Windows.Controls; 18 | using System.Windows.Controls.Primitives; 19 | using System.Windows.Data; 20 | using System.Windows.Documents; 21 | using System.Windows.Ink; 22 | using System.Windows.Input; 23 | using System.Windows.Markup; 24 | using System.Windows.Media; 25 | using System.Windows.Media.Animation; 26 | using System.Windows.Media.Effects; 27 | using System.Windows.Media.Imaging; 28 | using System.Windows.Media.Media3D; 29 | using System.Windows.Media.TextFormatting; 30 | using System.Windows.Navigation; 31 | using System.Windows.Shapes; 32 | using System.Windows.Shell; 33 | 34 | 35 | namespace FileManageSystem { 36 | 37 | 38 | /// 39 | /// App 40 | /// 41 | public partial class App : System.Windows.Application { 42 | 43 | private bool _contentLoaded; 44 | 45 | /// 46 | /// InitializeComponent 47 | /// 48 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 49 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 50 | public void InitializeComponent() { 51 | if (_contentLoaded) { 52 | return; 53 | } 54 | _contentLoaded = true; 55 | 56 | #line 5 "..\..\App.xaml" 57 | this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative); 58 | 59 | #line default 60 | #line hidden 61 | System.Uri resourceLocater = new System.Uri("/FileManageSystem;component/app.xaml", System.UriKind.Relative); 62 | 63 | #line 1 "..\..\App.xaml" 64 | System.Windows.Application.LoadComponent(this, resourceLocater); 65 | 66 | #line default 67 | #line hidden 68 | } 69 | 70 | /// 71 | /// Application Entry Point. 72 | /// 73 | [System.STAThreadAttribute()] 74 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 75 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 76 | public static void Main() { 77 | FileManageSystem.App app = new FileManageSystem.App(); 78 | app.InitializeComponent(); 79 | app.Run(); 80 | } 81 | } 82 | } 83 | 84 | -------------------------------------------------------------------------------- /FileManageSystem/obj/Release/App.g.i.cs: -------------------------------------------------------------------------------- 1 | #pragma checksum "..\..\App.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "1A9A79609D314F3E3905609A6C7AAC10" 2 | //------------------------------------------------------------------------------ 3 | // 4 | // 此代码由工具生成。 5 | // 运行时版本:4.0.30319.42000 6 | // 7 | // 对此文件的更改可能会导致不正确的行为,并且如果 8 | // 重新生成代码,这些更改将会丢失。 9 | // 10 | //------------------------------------------------------------------------------ 11 | 12 | using FileManageSystem; 13 | using System; 14 | using System.Diagnostics; 15 | using System.Windows; 16 | using System.Windows.Automation; 17 | using System.Windows.Controls; 18 | using System.Windows.Controls.Primitives; 19 | using System.Windows.Data; 20 | using System.Windows.Documents; 21 | using System.Windows.Ink; 22 | using System.Windows.Input; 23 | using System.Windows.Markup; 24 | using System.Windows.Media; 25 | using System.Windows.Media.Animation; 26 | using System.Windows.Media.Effects; 27 | using System.Windows.Media.Imaging; 28 | using System.Windows.Media.Media3D; 29 | using System.Windows.Media.TextFormatting; 30 | using System.Windows.Navigation; 31 | using System.Windows.Shapes; 32 | using System.Windows.Shell; 33 | 34 | 35 | namespace FileManageSystem { 36 | 37 | 38 | /// 39 | /// App 40 | /// 41 | public partial class App : System.Windows.Application { 42 | 43 | private bool _contentLoaded; 44 | 45 | /// 46 | /// InitializeComponent 47 | /// 48 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 49 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 50 | public void InitializeComponent() { 51 | if (_contentLoaded) { 52 | return; 53 | } 54 | _contentLoaded = true; 55 | 56 | #line 5 "..\..\App.xaml" 57 | this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative); 58 | 59 | #line default 60 | #line hidden 61 | System.Uri resourceLocater = new System.Uri("/FileManageSystem;component/app.xaml", System.UriKind.Relative); 62 | 63 | #line 1 "..\..\App.xaml" 64 | System.Windows.Application.LoadComponent(this, resourceLocater); 65 | 66 | #line default 67 | #line hidden 68 | } 69 | 70 | /// 71 | /// Application Entry Point. 72 | /// 73 | [System.STAThreadAttribute()] 74 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 75 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 76 | public static void Main() { 77 | FileManageSystem.App app = new FileManageSystem.App(); 78 | app.InitializeComponent(); 79 | app.Run(); 80 | } 81 | } 82 | } 83 | 84 | -------------------------------------------------------------------------------- /FileManageSystem/obj/Release/AttributeWindow.baml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/obj/Release/AttributeWindow.baml -------------------------------------------------------------------------------- /FileManageSystem/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /FileManageSystem/obj/Release/DetailWindow.baml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/obj/Release/DetailWindow.baml -------------------------------------------------------------------------------- /FileManageSystem/obj/Release/EditWindow.baml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/obj/Release/EditWindow.baml -------------------------------------------------------------------------------- /FileManageSystem/obj/Release/FileManageSystem.Properties.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/obj/Release/FileManageSystem.Properties.Resources.resources -------------------------------------------------------------------------------- /FileManageSystem/obj/Release/FileManageSystem.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\bin\Release\FileManageSystem.exe.config 2 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\bin\Release\FileManageSystem.exe 3 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\bin\Release\FileManageSystem.pdb 4 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\bin\Release\MaterialDesignColors.dll 5 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\bin\Release\MaterialDesignThemes.Wpf.dll 6 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\bin\Release\MaterialDesignThemes.Wpf.pdb 7 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\bin\Release\MaterialDesignThemes.Wpf.xml 8 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Release\AttributeWindow.g.cs 9 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Release\EditWindow.g.cs 10 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Release\DetailWindow.g.cs 11 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Release\MainWindow.g.cs 12 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Release\FormatControl.g.cs 13 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Release\RenameControl.g.cs 14 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Release\App.g.cs 15 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Release\GeneratedInternalTypeHelper.g.cs 16 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Release\FileManageSystem_MarkupCompile.cache 17 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Release\FileManageSystem_MarkupCompile.lref 18 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Release\App.baml 19 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Release\AttributeWindow.baml 20 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Release\EditWindow.baml 21 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Release\DetailWindow.baml 22 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Release\MainWindow.baml 23 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Release\FormatControl.baml 24 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Release\RenameControl.baml 25 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Release\FileManageSystem.g.resources 26 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Release\FileManageSystem.Properties.Resources.resources 27 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Release\FileManageSystem.csproj.GenerateResource.Cache 28 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Release\FileManageSystem.exe 29 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Release\FileManageSystem.pdb 30 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Release\FileManageSystem.csprojResolveAssemblyReference.cache 31 | -------------------------------------------------------------------------------- /FileManageSystem/obj/Release/FileManageSystem.csproj.GenerateResource.Cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/obj/Release/FileManageSystem.csproj.GenerateResource.Cache -------------------------------------------------------------------------------- /FileManageSystem/obj/Release/FileManageSystem.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/obj/Release/FileManageSystem.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /FileManageSystem/obj/Release/FileManageSystem.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/obj/Release/FileManageSystem.exe -------------------------------------------------------------------------------- /FileManageSystem/obj/Release/FileManageSystem.g.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/obj/Release/FileManageSystem.g.resources -------------------------------------------------------------------------------- /FileManageSystem/obj/Release/FileManageSystem.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/obj/Release/FileManageSystem.pdb -------------------------------------------------------------------------------- /FileManageSystem/obj/Release/FileManageSystem_MarkupCompile.cache: -------------------------------------------------------------------------------- 1 | FileManageSystem 2 | 3 | 4 | winexe 5 | C# 6 | .cs 7 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Release\ 8 | FileManageSystem 9 | none 10 | false 11 | TRACE 12 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\App.xaml 13 | 61010916316 14 | 15 | 16-1973054738 16 | 171304694942 17 | AttributeWindow.xaml;EditWindow.xaml;DetailWindow.xaml;MainWindow.xaml;FormatControl.xaml;RenameControl.xaml; 18 | 19 | False 20 | 21 | -------------------------------------------------------------------------------- /FileManageSystem/obj/Release/FileManageSystem_MarkupCompile.i.cache: -------------------------------------------------------------------------------- 1 | FileManageSystem 2 | 3 | 4 | winexe 5 | C# 6 | .cs 7 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\obj\Release\ 8 | FileManageSystem 9 | none 10 | false 11 | TRACE 12 | C:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\App.xaml 13 | 61010916316 14 | 15 | 201776940443 16 | 171304694942 17 | AttributeWindow.xaml;EditWindow.xaml;DetailWindow.xaml;MainWindow.xaml;FormatControl.xaml;RenameControl.xaml; 18 | 19 | False 20 | 21 | -------------------------------------------------------------------------------- /FileManageSystem/obj/Release/FileManageSystem_MarkupCompile.lref: -------------------------------------------------------------------------------- 1 |  2 | FC:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\App.xaml;; 3 | FC:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\AttributeWindow.xaml;; 4 | FC:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\EditWindow.xaml;; 5 | FC:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\DetailWindow.xaml;; 6 | FC:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\MainWindow.xaml;; 7 | FC:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\FormatControl.xaml;; 8 | FC:\Users\Wzes\Desktop\操作系统\FileManageSystem\FileManageSystem\RenameControl.xaml;; 9 | 10 | -------------------------------------------------------------------------------- /FileManageSystem/obj/Release/FormatControl.baml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/obj/Release/FormatControl.baml -------------------------------------------------------------------------------- /FileManageSystem/obj/Release/GeneratedInternalTypeHelper.g.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本:4.0.30319.42000 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将会丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace XamlGeneratedNamespace { 12 | 13 | 14 | /// 15 | /// GeneratedInternalTypeHelper 16 | /// 17 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 18 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 19 | [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 20 | public sealed class GeneratedInternalTypeHelper : System.Windows.Markup.InternalTypeHelper { 21 | 22 | /// 23 | /// CreateInstance 24 | /// 25 | protected override object CreateInstance(System.Type type, System.Globalization.CultureInfo culture) { 26 | return System.Activator.CreateInstance(type, ((System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic) 27 | | (System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.CreateInstance)), null, null, culture); 28 | } 29 | 30 | /// 31 | /// GetPropertyValue 32 | /// 33 | protected override object GetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, System.Globalization.CultureInfo culture) { 34 | return propertyInfo.GetValue(target, System.Reflection.BindingFlags.Default, null, null, culture); 35 | } 36 | 37 | /// 38 | /// SetPropertyValue 39 | /// 40 | protected override void SetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, object value, System.Globalization.CultureInfo culture) { 41 | propertyInfo.SetValue(target, value, System.Reflection.BindingFlags.Default, null, null, culture); 42 | } 43 | 44 | /// 45 | /// CreateDelegate 46 | /// 47 | protected override System.Delegate CreateDelegate(System.Type delegateType, object target, string handler) { 48 | return ((System.Delegate)(target.GetType().InvokeMember("_CreateDelegate", (System.Reflection.BindingFlags.InvokeMethod 49 | | (System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)), null, target, new object[] { 50 | delegateType, 51 | handler}, null))); 52 | } 53 | 54 | /// 55 | /// AddEventHandler 56 | /// 57 | protected override void AddEventHandler(System.Reflection.EventInfo eventInfo, object target, System.Delegate handler) { 58 | eventInfo.AddEventHandler(target, handler); 59 | } 60 | } 61 | } 62 | 63 | -------------------------------------------------------------------------------- /FileManageSystem/obj/Release/GeneratedInternalTypeHelper.g.i.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本:4.0.30319.42000 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将会丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace XamlGeneratedNamespace { 12 | 13 | 14 | /// 15 | /// GeneratedInternalTypeHelper 16 | /// 17 | [System.Diagnostics.DebuggerNonUserCodeAttribute()] 18 | [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] 19 | [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 20 | public sealed class GeneratedInternalTypeHelper : System.Windows.Markup.InternalTypeHelper { 21 | 22 | /// 23 | /// CreateInstance 24 | /// 25 | protected override object CreateInstance(System.Type type, System.Globalization.CultureInfo culture) { 26 | return System.Activator.CreateInstance(type, ((System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic) 27 | | (System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.CreateInstance)), null, null, culture); 28 | } 29 | 30 | /// 31 | /// GetPropertyValue 32 | /// 33 | protected override object GetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, System.Globalization.CultureInfo culture) { 34 | return propertyInfo.GetValue(target, System.Reflection.BindingFlags.Default, null, null, culture); 35 | } 36 | 37 | /// 38 | /// SetPropertyValue 39 | /// 40 | protected override void SetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, object value, System.Globalization.CultureInfo culture) { 41 | propertyInfo.SetValue(target, value, System.Reflection.BindingFlags.Default, null, null, culture); 42 | } 43 | 44 | /// 45 | /// CreateDelegate 46 | /// 47 | protected override System.Delegate CreateDelegate(System.Type delegateType, object target, string handler) { 48 | return ((System.Delegate)(target.GetType().InvokeMember("_CreateDelegate", (System.Reflection.BindingFlags.InvokeMethod 49 | | (System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)), null, target, new object[] { 50 | delegateType, 51 | handler}, null))); 52 | } 53 | 54 | /// 55 | /// AddEventHandler 56 | /// 57 | protected override void AddEventHandler(System.Reflection.EventInfo eventInfo, object target, System.Delegate handler) { 58 | eventInfo.AddEventHandler(target, handler); 59 | } 60 | } 61 | } 62 | 63 | -------------------------------------------------------------------------------- /FileManageSystem/obj/Release/MainWindow.baml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/obj/Release/MainWindow.baml -------------------------------------------------------------------------------- /FileManageSystem/obj/Release/RenameControl.baml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/obj/Release/RenameControl.baml -------------------------------------------------------------------------------- /FileManageSystem/obj/Release/TempPE/Properties.Resources.Designer.cs.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/obj/Release/TempPE/Properties.Resources.Designer.cs.dll -------------------------------------------------------------------------------- /FileManageSystem/obj/Release/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/obj/Release/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs -------------------------------------------------------------------------------- /FileManageSystem/obj/Release/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/obj/Release/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs -------------------------------------------------------------------------------- /FileManageSystem/obj/Release/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/FileManageSystem/obj/Release/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs -------------------------------------------------------------------------------- /FileManageSystem/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FileManageSystem 2 | 操作系统 - 文件管理系统模拟 3 | ## 一、项目概述 4 | ### 1.1需求分析 5 | 本项目旨在实现一个简单的文件管理系统。在内存中开辟一个空间作为文件存储器,模拟操作系统磁盘管理,在项目退出时,需要该文件系统的内容保存到磁盘上,以便下次可以将其回复到内存中来。一个简单的文件系统,包括目录和文件,每个目录和文件都有其共同的属性,因此首先需要实现目录结构的定义。此外,文件有其内容,文件内容存储使用链式存储方式。程序需要实现的功能为: 显示分级目录,以及显示某目录下的所以文件,以及基本的创建文件,文件夹,删除文件,文件夹,复制,粘贴,剪切文件,文件读写,本地存储恢复。 6 | 7 | ### 1.2系统功能 8 | ### 1.2.1基础功能 9 | #### 1.2.1.1 格式化 10 | 将磁盘格式化,目录,文件清空,恢复原始设置。 11 | #### 1.2.1.2 创建、删除、显示目录 12 | 在任意文件夹下可以创建目录,并更新UI,或者删除目录,删除目录会删除该目录下所有文件。目录以树形结构的方式来显示,可先点击树形目录切换到任意目录,显示该目录下所有文件及目录。 13 | #### 1.2.1.3 读写、打开、关闭、删除文件 14 | 对于文件,可双击或右键打开,或者选择其它方式打开,打开文件后显示文件内容,可对其进行编辑修改,保存,删除等操作。 15 | 16 | #### 1.2.1.4 右键菜单显示 17 | 选中文件目录,右键菜单显示可对文件进行基本操作,在空白处右键,则显示对当前文件夹所能进行的操作。 18 | #### 1.2.1.5 查看文件、目录属性 19 | 点击查看属性,或者右键点击文件或者目录,选择属性菜单,可显示选中文件或目录信息,若未选中文件,则显示当前目录信息。 20 | #### 1.2.1.6 文件、目录重命名 21 | 可对文件,或者目录进行重命名,重命名后更新文件路径以及子目录文件路径。 22 | #### 1.2.1.7 文件保存、恢复目录 23 | 关闭程序后,对目录,文件内容进行保存,重新打开程序是读取文件,恢复目录结构并显示,以及恢复文件内容。 24 | #### 1.2.1.8 显示当前磁盘空间使用情况 25 | 在程序底部显示程序磁盘空间使用情况。 26 | ### 1.2.2高级功能 27 | #### 1.2.2.1 复制、粘贴、剪切文件 28 | 可对文件进行复制,复制过程中先缓存一个复制文件,在粘贴时更改复制文件的相关属性,文件内容重新开辟空间;剪切文件则删除原来文件。 29 | #### 1.2.2.2 前进、后退,返回上层目录操作 30 | 使用两个栈空间来记录前序操作文件夹,后续操作文件夹,可向前向后切换文件夹,也可返回上层目录。 31 | #### 1.2.2.3 搜索目录操作 32 | 实现搜索功能,现在当前目录级子目录下进行搜索,若没有结果,则在全文搜索文件,搜索结束显示搜索结果。 33 | ### 1.3开发环境 34 | 该系统使用C# WPF进行开发, VS 2015作为开发工具,运行在Window系统上。 35 | 36 | ## 二、关键技术 37 | ### 2.1 目录属性及结构设计 38 | #### 2.1.1目录属性 39 | 如下图所示 40 | 41 | #### 2.1.2 目录结构 42 | 目录结构采用树状结构目录,任意高度,存在根目录,每个文件都有唯一路径名。 43 | ### 2.2 文件存储空间管理方式 44 | 本系统采用链接分配方式,目录包括文件第一块指针,每一块512B,后四个字节记录下一块的指针,最后一块后四位记为-1,每次读到-1则标记文件读取结束。 45 | ### 2.3 空闲空间管理方式 46 | 使用位向量管理空闲空间,0表示空闲,1表示已用。 47 | 48 | -------------------------------------------------------------------------------- /packages/MaterialDesignColors.1.1.2/MaterialDesignColors.1.1.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/packages/MaterialDesignColors.1.1.2/MaterialDesignColors.1.1.2.nupkg -------------------------------------------------------------------------------- /packages/MaterialDesignColors.1.1.2/lib/net45/MaterialDesignColors.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/packages/MaterialDesignColors.1.1.2/lib/net45/MaterialDesignColors.dll -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/MaterialDesignThemes.2.3.0.823.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/packages/MaterialDesignThemes.2.3.0.823/MaterialDesignThemes.2.3.0.823.nupkg -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/lib/net45/MaterialDesignThemes.Wpf.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/packages/MaterialDesignThemes.2.3.0.823/lib/net45/MaterialDesignThemes.Wpf.dll -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/lib/net45/MaterialDesignThemes.Wpf.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wzes/FileManageSystem/ffc6346adb78b06a1fb96903954d03e735974428/packages/MaterialDesignThemes.2.3.0.823/lib/net45/MaterialDesignThemes.Wpf.pdb -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Badged.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using ControlzEx; 3 | 4 | namespace MaterialDesignThemes.Wpf 5 | { 6 | [TemplatePart(Name = BadgeContainerPartName, Type = typeof(UIElement))] 7 | public class Badged : BadgedEx 8 | { 9 | static Badged() 10 | { 11 | DefaultStyleKeyProperty.OverrideMetadata(typeof(Badged), new FrameworkPropertyMetadata(typeof(Badged))); 12 | } 13 | 14 | public static readonly DependencyProperty BadgeColorZoneModeProperty = DependencyProperty.Register( 15 | "BadgeColorZoneMode", typeof(ColorZoneMode), typeof(Badged), new PropertyMetadata(default(ColorZoneMode))); 16 | 17 | public ColorZoneMode BadgeColorZoneMode 18 | { 19 | get { return (ColorZoneMode) GetValue(BadgeColorZoneModeProperty); } 20 | set { SetValue(BadgeColorZoneModeProperty, value); } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Card.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Media; 9 | 10 | namespace MaterialDesignThemes.Wpf 11 | { 12 | /// 13 | /// A card is a content control, styled according to Material Design guidelines. 14 | /// 15 | [TemplatePart(Name = ClipBorderPartName, Type = typeof(Border))] 16 | public class Card : ContentControl 17 | { 18 | public const string ClipBorderPartName = "PART_ClipBorder"; 19 | 20 | private Border _clipBorder; 21 | 22 | static Card() 23 | { 24 | DefaultStyleKeyProperty.OverrideMetadata(typeof(Card), new FrameworkPropertyMetadata(typeof(Card))); 25 | } 26 | 27 | public override void OnApplyTemplate() 28 | { 29 | base.OnApplyTemplate(); 30 | 31 | _clipBorder = Template.FindName(ClipBorderPartName, this) as Border; 32 | } 33 | 34 | protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo) 35 | { 36 | base.OnRenderSizeChanged(sizeInfo); 37 | 38 | if (_clipBorder == null) return; 39 | 40 | var farPoint = new Point( 41 | Math.Max(0, _clipBorder.ActualWidth), 42 | Math.Max(0, _clipBorder.ActualHeight)); 43 | 44 | var clipRect = new Rect( 45 | new Point(), 46 | new Point(farPoint.X, farPoint.Y)); 47 | 48 | ContentClip = new RectangleGeometry(clipRect, UniformCornerRadius, UniformCornerRadius); 49 | } 50 | 51 | public static readonly DependencyProperty UniformCornerRadiusProperty = DependencyProperty.Register( 52 | nameof(UniformCornerRadius), typeof (double), typeof (Card), new FrameworkPropertyMetadata(2.0, FrameworkPropertyMetadataOptions.AffectsMeasure)); 53 | 54 | public double UniformCornerRadius 55 | { 56 | get { return (double) GetValue(UniformCornerRadiusProperty); } 57 | set { SetValue(UniformCornerRadiusProperty, value); } 58 | } 59 | 60 | private static readonly DependencyPropertyKey ContentClipPropertyKey = 61 | DependencyProperty.RegisterReadOnly( 62 | "ContentClip", typeof (Geometry), typeof (Card), 63 | new PropertyMetadata(default(Geometry))); 64 | 65 | public static readonly DependencyProperty ContentClipProperty = 66 | ContentClipPropertyKey.DependencyProperty; 67 | 68 | public Geometry ContentClip 69 | { 70 | get { return (Geometry) GetValue(ContentClipProperty); } 71 | private set { SetValue(ContentClipPropertyKey, value); } 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/ClockChoiceMadeEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace MaterialDesignThemes.Wpf 4 | { 5 | public delegate void ClockChoiceMadeEventHandler(object sender, ClockChoiceMadeEventArgs e); 6 | 7 | public class ClockChoiceMadeEventArgs : RoutedEventArgs 8 | { 9 | private readonly ClockDisplayMode _displayMode; 10 | 11 | public ClockChoiceMadeEventArgs(ClockDisplayMode displayMode) 12 | { 13 | _displayMode = displayMode; 14 | } 15 | 16 | public ClockChoiceMadeEventArgs(ClockDisplayMode displayMode, RoutedEvent routedEvent) : base(routedEvent) 17 | { 18 | _displayMode = displayMode; 19 | } 20 | 21 | public ClockChoiceMadeEventArgs(ClockDisplayMode displayMode, RoutedEvent routedEvent, object source) : base(routedEvent, source) 22 | { 23 | _displayMode = displayMode; 24 | } 25 | 26 | public ClockDisplayMode Mode 27 | { 28 | get { return _displayMode; } 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/ColorZone.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace MaterialDesignThemes.Wpf 17 | { 18 | public enum ColorZoneMode 19 | { 20 | Standard, 21 | Inverted, 22 | PrimaryLight, 23 | PrimaryMid, 24 | PrimaryDark, 25 | Accent, 26 | Light, 27 | Dark 28 | } 29 | 30 | /// 31 | /// User a colour zone to easily switch the background and foreground colours, whilst still remaining within the selected Material Design palette. 32 | /// 33 | public class ColorZone : ContentControl 34 | { 35 | static ColorZone() 36 | { 37 | DefaultStyleKeyProperty.OverrideMetadata(typeof(ColorZone), new FrameworkPropertyMetadata(typeof(ColorZone))); 38 | } 39 | 40 | public static readonly DependencyProperty ModeProperty = DependencyProperty.Register( 41 | nameof(Mode), typeof (ColorZoneMode), typeof (ColorZone), new PropertyMetadata(default(ColorZoneMode))); 42 | 43 | public ColorZoneMode Mode 44 | { 45 | get { return (ColorZoneMode) GetValue(ModeProperty); } 46 | set { SetValue(ModeProperty, value); } 47 | } 48 | 49 | public static readonly DependencyProperty CornerRadiusProperty = DependencyProperty.Register( 50 | nameof(CornerRadius), typeof (CornerRadius), typeof (ColorZone), new PropertyMetadata(default(CornerRadius))); 51 | 52 | public CornerRadius CornerRadius 53 | { 54 | get { return (CornerRadius) GetValue(CornerRadiusProperty); } 55 | set { SetValue(CornerRadiusProperty, value); } 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/ColorZoneAssist.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | 8 | namespace MaterialDesignThemes.Wpf 9 | { 10 | public static class ColorZoneAssist 11 | { 12 | public static readonly DependencyProperty ModeProperty = DependencyProperty.RegisterAttached( 13 | "Mode", typeof(ColorZoneMode), typeof(ColorZoneAssist), new FrameworkPropertyMetadata(default(ColorZoneMode), FrameworkPropertyMetadataOptions.Inherits)); 14 | 15 | public static void SetMode(DependencyObject element, ColorZoneMode value) 16 | { 17 | element.SetValue(ModeProperty, value); 18 | } 19 | 20 | public static ColorZoneMode GetMode(DependencyObject element) 21 | { 22 | return (ColorZoneMode)element.GetValue(ModeProperty); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/ComboBoxAssist.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Media; 8 | 9 | namespace MaterialDesignThemes.Wpf 10 | { 11 | public static class ComboBoxAssist 12 | { 13 | /// 14 | /// By default ComboBox uses the wrapper popup. Popup can be switched to classic Windows desktop view by means of this attached property. 15 | /// 16 | public static readonly DependencyProperty ClassicModeProperty = DependencyProperty.RegisterAttached( 17 | "ClassicMode", 18 | typeof (bool), 19 | typeof (ComboBoxAssist), 20 | new FrameworkPropertyMetadata(false, 21 | FrameworkPropertyMetadataOptions.AffectsRender | FrameworkPropertyMetadataOptions.Inherits)); 22 | 23 | public static bool GetClassicMode(DependencyObject element, object value) 24 | { 25 | return (bool)element.GetValue(ClassicModeProperty); 26 | } 27 | 28 | public static void SetClassicMode(DependencyObject element, object value) 29 | { 30 | element.SetValue(ClassicModeProperty, value); 31 | } 32 | 33 | /// 34 | /// By default the selected item is hidden from the drop down list, as per Material Design specifications. 35 | /// To revert to a more classic Windows desktop behaviour, and show the currently selected item again in the drop 36 | /// down, set this attached propety to true. 37 | /// 38 | public static readonly DependencyProperty ShowSelectedItemProperty = DependencyProperty.RegisterAttached( 39 | "ShowSelectedItem", 40 | typeof (bool), 41 | typeof (ComboBoxAssist), 42 | new FrameworkPropertyMetadata(false, 43 | FrameworkPropertyMetadataOptions.AffectsRender | FrameworkPropertyMetadataOptions.Inherits)); 44 | 45 | public static bool GetShowSelectedItem(DependencyObject element, object value) 46 | { 47 | return (bool)element.GetValue(ShowSelectedItemProperty); 48 | } 49 | 50 | public static void SetShowSelectedItem(DependencyObject element, object value) 51 | { 52 | element.SetValue(ShowSelectedItemProperty, value); 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Converters/BooleanToVisibilityConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows; 4 | using System.Windows.Data; 5 | 6 | namespace MaterialDesignThemes.Wpf.Converters 7 | { 8 | public class BooleanToVisibilityConverter : IValueConverter 9 | { 10 | public Visibility TrueValue { get; set; } = Visibility.Visible; 11 | public Visibility FalseValue { get; set; } = Visibility.Collapsed; 12 | 13 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 14 | { 15 | bool bValue = false; 16 | if (value is bool) 17 | { 18 | bValue = (bool)value; 19 | } 20 | 21 | return (bValue) ? TrueValue : FalseValue; 22 | } 23 | 24 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 25 | { 26 | return value as Visibility? == TrueValue; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Converters/BrushRoundConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows; 4 | using System.Windows.Data; 5 | using System.Windows.Media; 6 | 7 | namespace MaterialDesignThemes.Wpf.Converters 8 | { 9 | public class BrushRoundConverter : IValueConverter 10 | { 11 | public Brush HighValue { get; set; } = Brushes.White; 12 | 13 | public Brush LowValue { get; set; } = Brushes.Black; 14 | 15 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 16 | { 17 | var solidColorBrush = value as SolidColorBrush; 18 | if (solidColorBrush == null) return null; 19 | 20 | var color = solidColorBrush.Color; 21 | 22 | var brightness = 0.3 * color.R + 0.59 * color.G + 0.11 * color.B; 23 | 24 | return brightness < 123 ? LowValue : HighValue; 25 | } 26 | 27 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 28 | { 29 | return Binding.DoNothing; 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Converters/BrushToRadialGradientBrushConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows; 4 | using System.Windows.Data; 5 | using System.Windows.Media; 6 | 7 | namespace MaterialDesignThemes.Wpf.Converters 8 | { 9 | public class BrushToRadialGradientBrushConverter : IValueConverter 10 | { 11 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 12 | { 13 | var solidColorBrush = value as SolidColorBrush; 14 | if (solidColorBrush == null) return Binding.DoNothing; 15 | 16 | return new RadialGradientBrush(solidColorBrush.Color, Colors.Transparent) 17 | { 18 | Center = new Point(.5, .5), 19 | GradientOrigin = new Point(.5, .5), 20 | RadiusX = .75, 21 | RadiusY = .75, 22 | Opacity = .39 23 | }; 24 | } 25 | 26 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 27 | { 28 | return Binding.DoNothing; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Converters/CalendarDateCoalesceConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows.Data; 4 | 5 | namespace MaterialDesignThemes.Wpf.Converters 6 | { 7 | /// 8 | /// Help us format the content of a header button in a calendar. 9 | /// 10 | /// 11 | /// Expected items, in the following order: 12 | /// 1) DateTime Calendar.DisplayDate 13 | /// 2) DateTime? Calendar.SelectedDate 14 | /// 15 | public class CalendarDateCoalesceConverter : IMultiValueConverter 16 | { 17 | public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) 18 | { 19 | if (values.Length != 2) throw new ArgumentException("Unexpected", "values"); 20 | if (!(values[0] is DateTime)) throw new ArgumentException("Unexpected", "values"); 21 | if (values[1] != null && !(values[1] is DateTime?)) throw new ArgumentException("Unexpected", "values"); 22 | 23 | var selectedDate = (DateTime?) values[1]; 24 | 25 | return selectedDate ?? values[0]; 26 | } 27 | 28 | public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) 29 | { 30 | return null; 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Converters/CircularProgressBar/ArcEndPointConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows; 4 | using System.Windows.Data; 5 | 6 | namespace MaterialDesignThemes.Wpf.Converters.CircularProgressBar 7 | { 8 | public class ArcEndPointConverter : IMultiValueConverter 9 | { 10 | public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) 11 | { 12 | var actualWidth = values[0].ExtractDouble(); 13 | var value = values[1].ExtractDouble(); 14 | var minimum = values[2].ExtractDouble(); 15 | var maximum = values[3].ExtractDouble(); 16 | 17 | if (new[] {actualWidth, value, minimum, maximum}.AnyNan()) 18 | return Binding.DoNothing; 19 | 20 | if (values.Length == 5) 21 | { 22 | var fullIndeterminateScaling = values[4].ExtractDouble(); 23 | if (!double.IsNaN(fullIndeterminateScaling) && fullIndeterminateScaling > 0.0) 24 | { 25 | value = (maximum - minimum)*fullIndeterminateScaling; 26 | } 27 | } 28 | 29 | var percent = maximum <= minimum ? 1.0 : (value - minimum)/(maximum - minimum); 30 | var degrees = 360*percent; 31 | var radians = degrees*(Math.PI/180); 32 | 33 | var centre = new Point(actualWidth/2, actualWidth/2); 34 | var hypotenuseRadius = (actualWidth/2); 35 | 36 | var adjacent = Math.Cos(radians)*hypotenuseRadius; 37 | var opposite = Math.Sin(radians)*hypotenuseRadius; 38 | 39 | return new Point(centre.X + opposite, centre.Y - adjacent); 40 | } 41 | 42 | public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) 43 | { 44 | throw new NotImplementedException(); 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Converters/CircularProgressBar/ArcSizeConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows; 4 | using System.Windows.Data; 5 | 6 | namespace MaterialDesignThemes.Wpf.Converters.CircularProgressBar 7 | { 8 | public class ArcSizeConverter : IValueConverter 9 | { 10 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 11 | { 12 | if (value is double && ((double)value > 0.0)) 13 | { 14 | return new Size((double)value / 2, (double)value / 2); 15 | } 16 | 17 | return new Point(); 18 | } 19 | 20 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 21 | { 22 | return Binding.DoNothing; 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Converters/CircularProgressBar/LargeArcConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows.Data; 4 | 5 | namespace MaterialDesignThemes.Wpf.Converters.CircularProgressBar 6 | { 7 | public class LargeArcConverter : IMultiValueConverter 8 | { 9 | public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) 10 | { 11 | var value = values[0].ExtractDouble(); 12 | var minimum = values[1].ExtractDouble(); 13 | var maximum = values[2].ExtractDouble(); 14 | 15 | if (new[] { value, minimum, maximum }.AnyNan()) 16 | return Binding.DoNothing; 17 | 18 | if (values.Length == 4) 19 | { 20 | var fullIndeterminateScaling = values[3].ExtractDouble(); 21 | if (!double.IsNaN(fullIndeterminateScaling) && fullIndeterminateScaling > 0.0) 22 | { 23 | value = (maximum - minimum) * fullIndeterminateScaling; 24 | } 25 | } 26 | 27 | var percent = maximum <= minimum ? 1.0 : (value - minimum) / (maximum - minimum); 28 | 29 | return percent > 0.5; 30 | } 31 | 32 | public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) 33 | { 34 | throw new NotImplementedException(); 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Converters/CircularProgressBar/LocalEx.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using System.Text; 4 | using System.Threading.Tasks; 5 | 6 | namespace MaterialDesignThemes.Wpf.Converters.CircularProgressBar 7 | { 8 | internal static class LocalEx 9 | { 10 | public static double ExtractDouble(this object val) 11 | { 12 | var d = val as double? ?? double.NaN; 13 | return double.IsInfinity(d) ? double.NaN : d; 14 | } 15 | 16 | 17 | public static bool AnyNan(this IEnumerable vals) 18 | { 19 | return vals.Any(double.IsNaN); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Converters/CircularProgressBar/RotateTransformCentreConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows.Data; 4 | 5 | namespace MaterialDesignThemes.Wpf.Converters.CircularProgressBar 6 | { 7 | public class RotateTransformCentreConverter : IValueConverter 8 | { 9 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 10 | { 11 | //value == actual width 12 | return (double) value/2; 13 | } 14 | 15 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 16 | { 17 | return Binding.DoNothing; 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Converters/CircularProgressBar/RotateTransformConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows.Data; 4 | 5 | namespace MaterialDesignThemes.Wpf.Converters.CircularProgressBar 6 | { 7 | public class RotateTransformConverter : IMultiValueConverter 8 | { 9 | public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) 10 | { 11 | var value = values[0].ExtractDouble(); 12 | var minimum = values[1].ExtractDouble(); 13 | var maximum = values[2].ExtractDouble(); 14 | 15 | if (new[] { value, minimum, maximum }.AnyNan()) 16 | return Binding.DoNothing; 17 | 18 | var percent = maximum <= minimum ? 1.0 : (value - minimum) / (maximum - minimum); 19 | 20 | return 360*percent; 21 | } 22 | 23 | public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) 24 | { 25 | throw new NotImplementedException(); 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Converters/CircularProgressBar/StartPointConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows; 4 | using System.Windows.Data; 5 | 6 | namespace MaterialDesignThemes.Wpf.Converters.CircularProgressBar 7 | { 8 | public class StartPointConverter : IValueConverter 9 | { 10 | [Obsolete] 11 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 12 | { 13 | if (value is double && ((double) value > 0.0)) 14 | { 15 | return new Point((double)value / 2, 0); 16 | } 17 | 18 | return new Point(); 19 | } 20 | 21 | [Obsolete] 22 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 23 | { 24 | return Binding.DoNothing; 25 | } 26 | 27 | } 28 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Converters/ClockItemIsCheckedConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Linq; 5 | using System.Reflection.Emit; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | using System.Windows.Data; 9 | 10 | namespace MaterialDesignThemes.Wpf.Converters 11 | { 12 | internal class ClockItemIsCheckedConverter : IValueConverter 13 | { 14 | private readonly Func _currentTimeGetter; 15 | private readonly ClockDisplayMode _displayMode; 16 | private readonly bool _is24Hours; 17 | 18 | public ClockItemIsCheckedConverter(Func currentTimeGetter, ClockDisplayMode displayMode, bool is24Hours) 19 | { 20 | if (currentTimeGetter == null) throw new ArgumentNullException(nameof(currentTimeGetter)); 21 | 22 | _currentTimeGetter = currentTimeGetter; 23 | _displayMode = displayMode; 24 | _is24Hours = is24Hours; 25 | } 26 | 27 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 28 | { 29 | var dateTime = (DateTime) value; 30 | var i = (int) parameter; 31 | 32 | return (_displayMode == ClockDisplayMode.Hours ? MassageHour(dateTime.Hour, _is24Hours) : MassageMinute(dateTime.Minute)) == i; 33 | } 34 | 35 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 36 | { 37 | if ((bool)value != true) return Binding.DoNothing; 38 | 39 | var currentTime = _currentTimeGetter(); 40 | 41 | return new DateTime( 42 | currentTime.Year, currentTime.Month, currentTime.Day, 43 | (_displayMode == ClockDisplayMode.Hours) ? ReverseMassageHour((int)parameter, currentTime, _is24Hours) : currentTime.Hour, 44 | (_displayMode == ClockDisplayMode.Minutes) ? ReverseMassageMinute((int)parameter) : currentTime.Minute, 45 | currentTime.Second); 46 | } 47 | 48 | private static int MassageHour(int val, bool is24Hours) 49 | { 50 | if (is24Hours) 51 | { 52 | return val == 0 ? 24 : val; 53 | } 54 | 55 | if (val == 0) return 12; 56 | if (val > 12) return val - 12; 57 | return val; 58 | } 59 | 60 | private static int MassageMinute(int val) 61 | { 62 | return val == 0 ? 60 : val; 63 | } 64 | 65 | private static int ReverseMassageHour(int val, DateTime currentTime, bool is24Hours) 66 | { 67 | if (is24Hours) 68 | { 69 | return val == 24 ? 0 : val; 70 | } 71 | 72 | return currentTime.Hour < 12 73 | ? (val == 12 ? 0 : val) 74 | : (val == 12 ? 12 : val + 12); 75 | } 76 | 77 | private static int ReverseMassageMinute(int val) 78 | { 79 | return val == 60 ? 0 : val; 80 | } 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Converters/ClockLineConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows.Data; 4 | using System.Windows.Markup; 5 | 6 | namespace MaterialDesignThemes.Wpf.Converters 7 | { 8 | public class ClockLineConverter : MarkupExtension, IValueConverter 9 | { 10 | public ClockDisplayMode DisplayMode { get; set; } 11 | 12 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 13 | { 14 | var time = (DateTime) value; 15 | 16 | return DisplayMode == ClockDisplayMode.Hours 17 | ? ((time.Hour > 13) ? time.Hour - 12 : time.Hour)*(360/12) 18 | : (time.Minute == 0 ? 60 : time.Minute)*(360/60); 19 | } 20 | 21 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 22 | { 23 | return Binding.DoNothing; 24 | } 25 | 26 | public override object ProvideValue(IServiceProvider serviceProvider) 27 | { 28 | return this; 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Converters/DrawerOffsetConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | using System.Windows.Controls; 9 | using System.Windows.Data; 10 | 11 | namespace MaterialDesignThemes.Wpf.Converters 12 | { 13 | public class DrawerOffsetConverter : IValueConverter 14 | { 15 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 16 | { 17 | var d = value as double? ?? 0; 18 | if (double.IsInfinity(d) || double.IsNaN(d)) d = 0; 19 | 20 | var dock = (parameter is Dock) ? (Dock)parameter : Dock.Left; 21 | switch (dock) 22 | { 23 | case Dock.Top: 24 | return new Thickness(0, 0 - d, 0, 0); 25 | case Dock.Bottom: 26 | return new Thickness(0, 0, 0, 0 - d); 27 | case Dock.Right: 28 | return new Thickness(0, 0, 0 - d, 0); 29 | case Dock.Left: 30 | default: 31 | return new Thickness(0 - d, 0, 0, 0); 32 | } 33 | } 34 | 35 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 36 | { 37 | throw new NotImplementedException(); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Converters/EqualityToVisibilityConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows; 4 | using System.Windows.Data; 5 | 6 | namespace MaterialDesignThemes.Wpf.Converters 7 | { 8 | public class EqualityToVisibilityConverter : IValueConverter 9 | { 10 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 11 | { 12 | if (value != null && value.Equals(parameter)) return Visibility.Visible; 13 | 14 | return Visibility.Collapsed; 15 | } 16 | 17 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 18 | { 19 | throw new NotImplementedException(); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Converters/HintProxyFabricConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | using System.Windows.Controls; 9 | using System.Windows.Controls.Primitives; 10 | using System.Windows.Data; 11 | 12 | namespace MaterialDesignThemes.Wpf.Converters 13 | { 14 | /// 15 | /// Converter for control. Can be extended by method. 16 | /// 17 | public class HintProxyFabricConverter : IValueConverter 18 | { 19 | private static readonly Lazy _instance = new Lazy(); 20 | 21 | public static HintProxyFabricConverter Instance => _instance.Value; 22 | 23 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 24 | { 25 | return HintProxyFabric.Get(value as Control); 26 | } 27 | 28 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 29 | { 30 | return Binding.DoNothing; 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Converters/ListViewItemContainerStyleConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows; 4 | using System.Windows.Controls; 5 | using System.Windows.Data; 6 | 7 | namespace MaterialDesignThemes.Wpf.Converters 8 | { 9 | /// 10 | /// Helps coerce the correct item container style for a , according to whether the list is displaying in standard mode, or using a , such as a . 11 | /// 12 | public class ListViewGridViewConverter : IValueConverter 13 | { 14 | /// 15 | /// Item container style to use when is null. 16 | /// 17 | public object DefaultValue { get; set; } 18 | 19 | /// 20 | /// Item container style to use when is not null, typically when a is applied. 21 | /// 22 | public object ViewValue { get; set; } 23 | 24 | /// 25 | /// Returns the item container to use for a . 26 | /// 27 | /// Should be a or instance. 28 | /// 29 | /// 30 | /// 31 | /// 32 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 33 | { 34 | var listView = value as ListView; 35 | if (listView != null) 36 | { 37 | return listView.View != null ? ViewValue : DefaultValue; 38 | } 39 | 40 | return value is ViewBase ? ViewValue : DefaultValue; 41 | } 42 | 43 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 44 | { 45 | return Binding.DoNothing; 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Converters/MathConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows.Data; 8 | 9 | namespace MaterialDesignThemes.Wpf.Converters 10 | { 11 | public enum MathOperation 12 | { 13 | Add, 14 | Subtract, 15 | Multiply, 16 | Divide 17 | } 18 | 19 | public sealed class MathConverter : IValueConverter 20 | { 21 | public MathOperation Operation { get; set; } 22 | 23 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 24 | { 25 | try 26 | { 27 | double value1 = System.Convert.ToDouble(value, CultureInfo.InvariantCulture); 28 | double value2 = System.Convert.ToDouble(parameter, CultureInfo.InvariantCulture); 29 | switch (Operation) 30 | { 31 | case MathOperation.Add: 32 | return value1 + value2; 33 | case MathOperation.Divide: 34 | return value1 / value2; 35 | case MathOperation.Multiply: 36 | return value1 * value2; 37 | case MathOperation.Subtract: 38 | return value1 - value2; 39 | default: 40 | return Binding.DoNothing; 41 | } 42 | } 43 | catch (FormatException) 44 | { 45 | return Binding.DoNothing; 46 | } 47 | } 48 | 49 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 50 | { 51 | return Binding.DoNothing; 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Converters/MathMultipleConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Globalization; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | using System.Windows.Data; 9 | 10 | namespace MaterialDesignThemes.Wpf.Converters 11 | { 12 | public sealed class MathMultipleConverter : IMultiValueConverter 13 | { 14 | public MathOperation Operation { get; set; } 15 | 16 | public object Convert(object[] value, Type targetType, object parameter, CultureInfo culture) 17 | { 18 | if (value == null || value.Length < 2 || value[0] == null || value[1] == null) return Binding.DoNothing; 19 | 20 | double value1, value2; 21 | if (!double.TryParse(value[0].ToString(), out value1) || !double.TryParse(value[1].ToString(), out value2)) 22 | return 0; 23 | 24 | switch (Operation) 25 | { 26 | default: 27 | // (case MathOperation.Add:) 28 | return value1 + value2; 29 | case MathOperation.Divide: 30 | return value1 / value2; 31 | case MathOperation.Multiply: 32 | return value1 * value2; 33 | case MathOperation.Subtract: 34 | return value1 - value2; 35 | } 36 | 37 | } 38 | 39 | public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) 40 | { 41 | throw new NotImplementedException(); 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Converters/NotConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows; 4 | using System.Windows.Data; 5 | 6 | namespace MaterialDesignThemes.Wpf.Converters 7 | { 8 | public class NotConverter : IValueConverter 9 | { 10 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 11 | { 12 | return !(value as bool?) ?? !bool.Parse(value.ToString()); 13 | } 14 | 15 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 16 | { 17 | return !(value as bool?) ?? !bool.Parse(value.ToString()); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Converters/NotZeroToVisibilityConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows; 4 | using System.Windows.Data; 5 | 6 | namespace MaterialDesignThemes.Wpf.Converters 7 | { 8 | public class NotZeroToVisibilityConverter : IValueConverter 9 | { 10 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 11 | { 12 | double val; 13 | double.TryParse((value ?? "").ToString(), out val); 14 | 15 | return Math.Abs(val) > 0.0 ? Visibility.Visible : Visibility.Collapsed; 16 | } 17 | 18 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 19 | { 20 | return Binding.DoNothing; 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Converters/NullToVisibilityConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows; 4 | using System.Windows.Data; 5 | 6 | namespace MaterialDesignThemes.Wpf.Converters 7 | { 8 | public class NullableToVisibilityConverter : IValueConverter 9 | { 10 | public Visibility NullValue { get; set; } = Visibility.Collapsed; 11 | public Visibility NotNullValue { get; set; } = Visibility.Visible; 12 | 13 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 14 | { 15 | return value == null ? NullValue : NotNullValue; 16 | } 17 | 18 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 19 | { 20 | return Binding.DoNothing; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Converters/NullableDateTimeToCurrentDateConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows.Data; 8 | 9 | namespace MaterialDesignThemes.Wpf.Converters 10 | { 11 | public class NullableDateTimeToCurrentDateConverter : IValueConverter 12 | { 13 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 14 | { 15 | if (value is DateTime) 16 | return value; 17 | return DateTime.Now.Date; 18 | } 19 | 20 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 21 | { 22 | return value; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Converters/PointValueConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows; 4 | using System.Windows.Data; 5 | 6 | namespace MaterialDesignThemes.Wpf.Converters 7 | { 8 | public class PointValueConverter : IMultiValueConverter 9 | { 10 | public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) 11 | { 12 | if (values?.Length == 2 && values[0] != null && values[1] != null) 13 | { 14 | double x, y; 15 | if (double.TryParse(values[0].ToString(), out x) && 16 | double.TryParse(values[1].ToString(), out y)) 17 | 18 | return new Point(x, y); 19 | } 20 | 21 | return new Point(); 22 | } 23 | 24 | public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) 25 | { 26 | if (value is Point) 27 | { 28 | var point = (Point) value; 29 | return new object[] { point.X, point.Y }; 30 | } 31 | 32 | return new object[0]; 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Converters/RangePositionConverterConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows.Data; 8 | 9 | namespace MaterialDesignThemes.Wpf.Converters 10 | { 11 | public class RangePositionConverter : IMultiValueConverter 12 | { 13 | public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) 14 | { 15 | if(values == null || values.Length != 3 || values[0] == null || values[1] == null || values[2] == null) 16 | return Binding.DoNothing; 17 | 18 | double positionAsScaleFactor, lower, upper; 19 | if (!double.TryParse(values[0].ToString(), out positionAsScaleFactor) 20 | || !double.TryParse(values[1].ToString(), out lower) 21 | || !double.TryParse(values[2].ToString(), out upper)) 22 | 23 | return Binding.DoNothing; 24 | 25 | var result = upper + (lower - upper)*positionAsScaleFactor; 26 | 27 | return result; 28 | } 29 | 30 | public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) 31 | { 32 | throw new NotImplementedException(); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Converters/ShadowConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | using System.Windows.Data; 9 | using System.Windows.Media.Effects; 10 | 11 | namespace MaterialDesignThemes.Wpf.Converters 12 | { 13 | public class ShadowConverter : IValueConverter 14 | { 15 | private static readonly IDictionary ShadowsDictionary; 16 | public static readonly ShadowConverter Instance = new ShadowConverter(); 17 | 18 | static ShadowConverter() 19 | { 20 | var resourceDictionary = new ResourceDictionary { Source = new Uri("pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Shadows.xaml", UriKind.Absolute) }; 21 | 22 | ShadowsDictionary = new Dictionary 23 | { 24 | { ShadowDepth.Depth0, null }, 25 | { ShadowDepth.Depth1, (DropShadowEffect)resourceDictionary["MaterialDesignShadowDepth1"] }, 26 | { ShadowDepth.Depth2, (DropShadowEffect)resourceDictionary["MaterialDesignShadowDepth2"] }, 27 | { ShadowDepth.Depth3, (DropShadowEffect)resourceDictionary["MaterialDesignShadowDepth3"] }, 28 | { ShadowDepth.Depth4, (DropShadowEffect)resourceDictionary["MaterialDesignShadowDepth4"] }, 29 | { ShadowDepth.Depth5, (DropShadowEffect)resourceDictionary["MaterialDesignShadowDepth5"] }, 30 | }; 31 | } 32 | 33 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 34 | { 35 | if (!(value is ShadowDepth)) return null; 36 | 37 | return Clone(ShadowsDictionary[(ShadowDepth) value]); 38 | } 39 | 40 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 41 | { 42 | throw new NotImplementedException(); 43 | } 44 | 45 | private static DropShadowEffect Clone(DropShadowEffect dropShadowEffect) 46 | { 47 | if (dropShadowEffect == null) return null; 48 | return new DropShadowEffect() 49 | { 50 | BlurRadius = dropShadowEffect.BlurRadius, 51 | Color = dropShadowEffect.Color, 52 | Direction = dropShadowEffect.Direction, 53 | Opacity = dropShadowEffect.Opacity, 54 | RenderingBias = dropShadowEffect.RenderingBias, 55 | ShadowDepth = dropShadowEffect.ShadowDepth 56 | }; 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Converters/SizeToRectConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | using System.Windows.Data; 9 | 10 | namespace MaterialDesignThemes.Wpf.Converters 11 | { 12 | public class CardClipConverter : IMultiValueConverter 13 | { 14 | /// 15 | /// 1 - Content presenter render size, 16 | /// 2 - Clipping border padding (main control padding) 17 | /// 18 | /// 19 | /// 20 | /// 21 | /// 22 | /// 23 | public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) 24 | { 25 | if (values.Length != 2 || !(values[0] is Size) || !(values[1] is Thickness)) 26 | return Binding.DoNothing; 27 | 28 | var size = (Size)values[0]; 29 | var farPoint = new Point( 30 | Math.Max(0, size.Width), 31 | Math.Max(0, size.Height)); 32 | var padding = (Thickness)values[1]; 33 | farPoint.Offset(padding.Left + padding.Right, padding.Top + padding.Bottom); 34 | 35 | return new Rect( 36 | new Point(), 37 | new Point(farPoint.X, farPoint.Y)); 38 | } 39 | 40 | public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) 41 | { 42 | return null; 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Converters/SnackbarMessageTypeConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Globalization; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace MaterialDesignThemes.Wpf.Converters 10 | { 11 | public class SnackbarMessageTypeConverter : TypeConverter 12 | { 13 | public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 14 | { 15 | return sourceType == typeof(string) || base.CanConvertFrom(context, sourceType); 16 | } 17 | 18 | public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) 19 | { 20 | var s = value as string; 21 | if (s != null) 22 | { 23 | return new SnackbarMessage 24 | { 25 | Content = s 26 | }; 27 | } 28 | 29 | return base.ConvertFrom(context, culture, value); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Converters/TextFieldHintVisibilityConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows; 4 | using System.Windows.Data; 5 | 6 | namespace MaterialDesignThemes.Wpf.Converters 7 | { 8 | public class TextFieldHintVisibilityConverter : IValueConverter 9 | { 10 | public Visibility IsEmptyValue { get; set; } = Visibility.Visible; 11 | public Visibility IsNotEmptyValue { get; set; } = Visibility.Hidden; 12 | 13 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 14 | { 15 | return string.IsNullOrEmpty((value ?? "").ToString()) ? IsEmptyValue : IsNotEmptyValue; 16 | } 17 | 18 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 19 | { 20 | return Binding.DoNothing; 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Converters/TimeToVisibilityConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows; 4 | using System.Windows.Data; 5 | using System.Windows.Markup; 6 | 7 | namespace MaterialDesignThemes.Wpf.Converters 8 | { 9 | public class TimeToVisibilityConverter: MarkupExtension, IValueConverter 10 | { 11 | public override object ProvideValue(IServiceProvider serviceProvider) 12 | { 13 | return this; 14 | } 15 | 16 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 17 | { 18 | var time = (DateTime)value; 19 | 20 | var isPm = ((time.Hour >= 13) || (time.Hour == 0)); 21 | 22 | return isPm ? Visibility.Visible : Visibility.Collapsed; 23 | } 24 | 25 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 26 | { 27 | return Binding.DoNothing; 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/CustomPopupPlacementCallbackHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls.Primitives; 8 | 9 | namespace MaterialDesignThemes.Wpf 10 | { 11 | public static class CustomPopupPlacementCallbackHelper 12 | { 13 | public static readonly CustomPopupPlacementCallback LargePopupCallback; 14 | 15 | static CustomPopupPlacementCallbackHelper() 16 | { 17 | LargePopupCallback = 18 | (size, targetSize, offset) => new[] {new CustomPopupPlacement(new Point(), PopupPrimaryAxis.Horizontal)}; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/DateTimeEx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Linq; 4 | 5 | namespace MaterialDesignThemes.Wpf 6 | { 7 | internal static class DateTimeEx 8 | { 9 | internal static DateTimeFormatInfo GetDateFormat(this CultureInfo culture) 10 | { 11 | if (culture == null) throw new ArgumentNullException(nameof(culture)); 12 | 13 | if (culture.Calendar is GregorianCalendar) 14 | { 15 | return culture.DateTimeFormat; 16 | } 17 | 18 | GregorianCalendar foundCal = null; 19 | DateTimeFormatInfo dtfi = null; 20 | foreach (var cal in culture.OptionalCalendars.OfType()) 21 | { 22 | // Return the first Gregorian calendar with CalendarType == Localized 23 | // Otherwise return the first Gregorian calendar 24 | if (foundCal == null) 25 | { 26 | foundCal = cal; 27 | } 28 | 29 | if (cal.CalendarType != GregorianCalendarTypes.Localized) continue; 30 | 31 | foundCal = cal; 32 | break; 33 | } 34 | 35 | 36 | if (foundCal == null) 37 | { 38 | // if there are no GregorianCalendars in the OptionalCalendars list, use the invariant dtfi 39 | dtfi = ((CultureInfo)CultureInfo.InvariantCulture.Clone()).DateTimeFormat; 40 | dtfi.Calendar = new GregorianCalendar(); 41 | } 42 | else 43 | { 44 | dtfi = ((CultureInfo)culture.Clone()).DateTimeFormat; 45 | dtfi.Calendar = foundCal; 46 | } 47 | 48 | return dtfi; 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/DialogClosingEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows; 3 | 4 | namespace MaterialDesignThemes.Wpf 5 | { 6 | public class DialogClosingEventArgs : RoutedEventArgs 7 | { 8 | public DialogClosingEventArgs(DialogSession session, object parameter) 9 | { 10 | if (session == null) throw new ArgumentNullException(nameof(session)); 11 | Session = session; 12 | 13 | Parameter = parameter; 14 | } 15 | 16 | public DialogClosingEventArgs(DialogSession session, object parameter, RoutedEvent routedEvent) : base(routedEvent) 17 | { 18 | if (session == null) throw new ArgumentNullException(nameof(session)); 19 | Session = session; 20 | 21 | Parameter = parameter; 22 | } 23 | 24 | public DialogClosingEventArgs(DialogSession session, object parameter, RoutedEvent routedEvent, object source) : base(routedEvent, source) 25 | { 26 | if (session == null) throw new ArgumentNullException(nameof(session)); 27 | Session = session; 28 | 29 | Parameter = parameter; 30 | } 31 | 32 | /// 33 | /// Cancel the close. 34 | /// 35 | public void Cancel() 36 | { 37 | IsCancelled = true; 38 | } 39 | 40 | /// 41 | /// Indicates if the close has already been cancelled. 42 | /// 43 | public bool IsCancelled { get; private set; } 44 | 45 | /// 46 | /// Gets the paramter originally provided to / 47 | /// 48 | public object Parameter { get; } 49 | 50 | /// 51 | /// Allows interation with the current dialog session. 52 | /// 53 | public DialogSession Session { get; } 54 | 55 | /// 56 | /// Gets the which is currently displayed, so this could be a view model or a UI element. 57 | /// 58 | [Obsolete("Prefer Session.Content")] 59 | public object Content => Session.Content; 60 | } 61 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/DialogClosingEventHandler.cs: -------------------------------------------------------------------------------- 1 | namespace MaterialDesignThemes.Wpf 2 | { 3 | public delegate void DialogClosingEventHandler(object sender, DialogClosingEventArgs eventArgs); 4 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/DialogOpenedEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows; 3 | 4 | namespace MaterialDesignThemes.Wpf 5 | { 6 | public class DialogOpenedEventArgs : RoutedEventArgs 7 | { 8 | public DialogOpenedEventArgs(DialogSession session, RoutedEvent routedEvent) 9 | { 10 | if (session == null) throw new ArgumentNullException(nameof(session)); 11 | 12 | Session = session; 13 | RoutedEvent = routedEvent; 14 | } 15 | 16 | /// 17 | /// Allows interation with the current dialog session. 18 | /// 19 | public DialogSession Session { get; } 20 | } 21 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/DialogOpenedEventHandler.cs: -------------------------------------------------------------------------------- 1 | namespace MaterialDesignThemes.Wpf 2 | { 3 | public delegate void DialogOpenedEventHandler(object sender, DialogOpenedEventArgs eventArgs); 4 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/DialogSession.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Input; 3 | using System.Windows.Threading; 4 | 5 | namespace MaterialDesignThemes.Wpf 6 | { 7 | /// 8 | /// Allows an open dialog to be managed. Use is only permitted during a single display operation. 9 | /// 10 | public class DialogSession 11 | { 12 | private readonly DialogHost _owner; 13 | 14 | internal DialogSession(DialogHost owner) 15 | { 16 | if (owner == null) throw new ArgumentNullException(nameof(owner)); 17 | 18 | _owner = owner; 19 | } 20 | 21 | /// 22 | /// Indicates if the dialog session has ended. Once ended no further method calls will be permitted. 23 | /// 24 | /// 25 | /// Client code cannot set this directly, this is internally managed. To end the dicalog session use . 26 | /// 27 | public bool IsEnded { get; internal set; } 28 | 29 | /// 30 | /// Gets the which is currently displayed, so this could be a view model or a UI element. 31 | /// 32 | public object Content => _owner.DialogContent; 33 | 34 | /// 35 | /// Update the currrent content in the dialog. 36 | /// 37 | /// 38 | public void UpdateContent(object content) 39 | { 40 | if (content == null) throw new ArgumentNullException(nameof(content)); 41 | 42 | _owner.AssertTargetableContent(); 43 | _owner.DialogContent = content; 44 | _owner.Dispatcher.BeginInvoke(DispatcherPriority.Background, new Action(() => 45 | { 46 | _owner.FocusPopup(); 47 | })); 48 | } 49 | 50 | /// 51 | /// Closes the dialog. 52 | /// 53 | /// Thrown if the dialog session has ended, or a close operation is currently in progress. 54 | public void Close() 55 | { 56 | if (IsEnded) throw new InvalidOperationException("Dialog session has ended."); 57 | 58 | _owner.Close(null); 59 | } 60 | 61 | /// 62 | /// Closes the dialog. 63 | /// 64 | /// Result parameter which will be returned in or from method. 65 | /// Thrown if the dialog session has ended, or a close operation is currently in progress. 66 | public void Close(object parameter) 67 | { 68 | if (IsEnded) throw new InvalidOperationException("Dialog session has ended."); 69 | 70 | _owner.Close(parameter); 71 | } 72 | } 73 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/DpiHelper.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Windows; 3 | using System.Windows.Media; 4 | 5 | namespace MaterialDesignThemes.Wpf 6 | { 7 | internal static class DpiHelper 8 | { 9 | private static readonly int DpiX; 10 | private static readonly int DpiY; 11 | 12 | private const double StandardDpiX = 96.0; 13 | private const double StandardDpiY = 96.0; 14 | 15 | static DpiHelper() 16 | { 17 | var dpiXProperty = typeof(SystemParameters).GetProperty("DpiX", BindingFlags.NonPublic | BindingFlags.Static); 18 | var dpiYProperty = typeof(SystemParameters).GetProperty("Dpi", BindingFlags.NonPublic | BindingFlags.Static); 19 | 20 | DpiX = (int)dpiXProperty.GetValue(null, null); 21 | DpiY = (int)dpiYProperty.GetValue(null, null); 22 | } 23 | 24 | public static double TransformToDeviceY(Visual visual, double y) 25 | { 26 | var source = PresentationSource.FromVisual(visual); 27 | if (source?.CompositionTarget != null) return y * source.CompositionTarget.TransformToDevice.M22; 28 | 29 | return TransformToDeviceY(y); 30 | } 31 | 32 | public static double TransformToDeviceX(Visual visual, double x) 33 | { 34 | var source = PresentationSource.FromVisual(visual); 35 | if (source?.CompositionTarget != null) return x * source.CompositionTarget.TransformToDevice.M11; 36 | 37 | return TransformToDeviceX(x); 38 | } 39 | 40 | public static double TransformToDeviceY(double y) 41 | { 42 | return y * DpiY / StandardDpiY; 43 | } 44 | 45 | public static double TransformToDeviceX(double x) 46 | { 47 | return x * DpiX / StandardDpiX; 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Extensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Windows; 5 | using System.Windows.Media; 6 | 7 | namespace MaterialDesignThemes.Wpf 8 | { 9 | internal static class Extensions 10 | { 11 | public static IEnumerable VisualDepthFirstTraversal(this DependencyObject node) 12 | { 13 | if (node == null) throw new ArgumentNullException(nameof(node)); 14 | 15 | yield return node; 16 | 17 | for (var i = 0; i < VisualTreeHelper.GetChildrenCount(node); i++) 18 | { 19 | var child = VisualTreeHelper.GetChild(node, i); 20 | foreach (var descendant in child.VisualDepthFirstTraversal()) 21 | { 22 | yield return descendant; 23 | } 24 | } 25 | } 26 | 27 | public static IEnumerable VisualBreadthFirstTraversal(this DependencyObject node) 28 | { 29 | if (node == null) throw new ArgumentNullException(nameof(node)); 30 | 31 | for (var i = 0; i < VisualTreeHelper.GetChildrenCount(node); i++) 32 | { 33 | var child = VisualTreeHelper.GetChild(node, i); 34 | yield return child; 35 | } 36 | 37 | for (var i = 0; i < VisualTreeHelper.GetChildrenCount(node); i++) 38 | { 39 | var child = VisualTreeHelper.GetChild(node, i); 40 | 41 | foreach (var descendant in child.VisualDepthFirstTraversal()) 42 | { 43 | yield return descendant; 44 | } 45 | } 46 | } 47 | 48 | public static bool IsAncestorOf(this DependencyObject parent, DependencyObject node) 49 | { 50 | return node != null && parent.VisualDepthFirstTraversal().Contains(node); 51 | } 52 | 53 | /// 54 | /// Returns full visual ancestry, starting at the leaf. 55 | /// 56 | /// 57 | /// 58 | public static IEnumerable GetVisualAncestry(this DependencyObject leaf) 59 | { 60 | while (leaf != null) 61 | { 62 | yield return leaf; 63 | leaf = VisualTreeHelper.GetParent(leaf); 64 | } 65 | } 66 | 67 | public static IEnumerable GetLogicalAncestry(this DependencyObject leaf) 68 | { 69 | while (leaf != null) 70 | { 71 | yield return leaf; 72 | leaf = LogicalTreeHelper.GetParent(leaf); 73 | } 74 | } 75 | 76 | public static bool IsDescendantOf(this DependencyObject leaf, DependencyObject ancestor) 77 | { 78 | DependencyObject parent = null; 79 | foreach (var node in leaf.GetVisualAncestry()) 80 | { 81 | if (Equals(node, ancestor)) 82 | return true; 83 | 84 | parent = node; 85 | } 86 | 87 | return parent.GetLogicalAncestry().Contains(ancestor); 88 | } 89 | } 90 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/HintProxyFabric.PasswordBox.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Controls; 3 | 4 | namespace MaterialDesignThemes.Wpf 5 | { 6 | public static partial class HintProxyFabric 7 | { 8 | private sealed class PasswordBoxHintProxy : IHintProxy 9 | { 10 | private readonly PasswordBox _passwordBox; 11 | 12 | public bool IsEmpty() => string.IsNullOrEmpty(_passwordBox.Password); 13 | 14 | public object Content => _passwordBox.Password; 15 | 16 | public bool IsLoaded => _passwordBox.IsLoaded; 17 | 18 | public bool IsVisible => _passwordBox.IsVisible; 19 | 20 | public event EventHandler ContentChanged; 21 | public event EventHandler IsVisibleChanged; 22 | public event EventHandler Loaded; 23 | 24 | public PasswordBoxHintProxy(PasswordBox passwordBox) 25 | { 26 | if (passwordBox == null) throw new ArgumentNullException(nameof(passwordBox)); 27 | 28 | _passwordBox = passwordBox; 29 | _passwordBox.PasswordChanged += PasswordBoxPasswordChanged; 30 | _passwordBox.Loaded += PasswordBoxLoaded; 31 | _passwordBox.IsVisibleChanged += PasswordBoxIsVisibleChanged; 32 | } 33 | 34 | private void PasswordBoxIsVisibleChanged(object sender, System.Windows.DependencyPropertyChangedEventArgs e) 35 | { 36 | IsVisibleChanged?.Invoke(this, EventArgs.Empty); 37 | } 38 | 39 | private void PasswordBoxLoaded(object sender, System.Windows.RoutedEventArgs e) 40 | { 41 | Loaded?.Invoke(this, EventArgs.Empty); 42 | } 43 | 44 | private void PasswordBoxPasswordChanged(object sender, System.Windows.RoutedEventArgs e) 45 | { 46 | ContentChanged?.Invoke(this, EventArgs.Empty); 47 | } 48 | 49 | public void Dispose() 50 | { 51 | _passwordBox.PasswordChanged -= PasswordBoxPasswordChanged; 52 | _passwordBox.Loaded -= PasswordBoxLoaded; 53 | _passwordBox.IsVisibleChanged -= PasswordBoxIsVisibleChanged; 54 | } 55 | 56 | } 57 | } 58 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/HintProxyFabric.TextBox.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows; 3 | using System.Windows.Controls; 4 | 5 | namespace MaterialDesignThemes.Wpf 6 | { 7 | public static partial class HintProxyFabric 8 | { 9 | private sealed class TextBoxHintProxy : IHintProxy 10 | { 11 | private readonly TextBox _textBox; 12 | 13 | public object Content => _textBox.Text; 14 | 15 | public bool IsLoaded => _textBox.IsLoaded; 16 | 17 | public bool IsVisible => _textBox.IsVisible; 18 | 19 | public bool IsEmpty() => string.IsNullOrEmpty(_textBox.Text); 20 | 21 | public event EventHandler ContentChanged; 22 | public event EventHandler IsVisibleChanged; 23 | public event EventHandler Loaded; 24 | 25 | public TextBoxHintProxy(TextBox textBox) 26 | { 27 | if (textBox == null) throw new ArgumentNullException(nameof(textBox)); 28 | 29 | _textBox = textBox; 30 | _textBox.TextChanged += TextBoxTextChanged; 31 | _textBox.Loaded += TextBoxLoaded; 32 | _textBox.IsVisibleChanged += TextBoxIsVisibleChanged; 33 | } 34 | 35 | private void TextBoxIsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e) 36 | { 37 | IsVisibleChanged?.Invoke(sender, EventArgs.Empty); 38 | } 39 | 40 | private void TextBoxLoaded(object sender, RoutedEventArgs e) 41 | { 42 | Loaded?.Invoke(sender, EventArgs.Empty); 43 | } 44 | 45 | private void TextBoxTextChanged(object sender, TextChangedEventArgs e) 46 | { 47 | ContentChanged?.Invoke(sender, EventArgs.Empty); 48 | } 49 | 50 | public void Dispose() 51 | { 52 | _textBox.TextChanged -= TextBoxTextChanged; 53 | _textBox.Loaded -= TextBoxLoaded; 54 | _textBox.IsVisibleChanged -= TextBoxIsVisibleChanged; 55 | } 56 | } 57 | } 58 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/HintProxyFabric.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows.Controls; 7 | 8 | namespace MaterialDesignThemes.Wpf 9 | { 10 | public static partial class HintProxyFabric 11 | { 12 | private sealed class HintProxyBuilder 13 | { 14 | private readonly Func _canBuild; 15 | private readonly Func _build; 16 | 17 | public HintProxyBuilder(Func canBuild, Func build) 18 | { 19 | if (canBuild == null) throw new ArgumentNullException(nameof(canBuild)); 20 | if (build == null) throw new ArgumentNullException(nameof(build)); 21 | 22 | _canBuild = canBuild; 23 | _build = build; 24 | } 25 | 26 | public bool CanBuild(Control control) => _canBuild(control); 27 | public IHintProxy Build(Control control) => _build(control); 28 | } 29 | 30 | private static readonly List Builders = new List(); 31 | 32 | static HintProxyFabric() 33 | { 34 | Builders.Add(new HintProxyBuilder(c => c is ComboBox, c => new ComboBoxHintProxy((ComboBox) c))); 35 | Builders.Add(new HintProxyBuilder(c => c is TextBox, c => new TextBoxHintProxy((TextBox)c))); 36 | Builders.Add(new HintProxyBuilder(c => c is PasswordBox, c => new PasswordBoxHintProxy((PasswordBox)c))); 37 | } 38 | 39 | public static void RegisterBuilder(Func canBuild, Func build) 40 | { 41 | Builders.Add(new HintProxyBuilder(canBuild, build)); 42 | } 43 | 44 | public static IHintProxy Get(Control control) 45 | { 46 | var builder = Builders.FirstOrDefault(v => v.CanBuild(control)); 47 | 48 | if (builder == null) throw new NotImplementedException(); 49 | 50 | return builder.Build(control); 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/IHintProxy.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows.Controls; 7 | 8 | namespace MaterialDesignThemes.Wpf 9 | { 10 | /// 11 | /// This interface is the adapter from UiControl (like , and others) to 12 | /// 13 | /// You should implement this interface in order to use SmartHint for your own control. 14 | /// 15 | public interface IHintProxy : IDisposable 16 | { 17 | /// 18 | /// Checks to see if the targetted control can be deemed as logically 19 | /// empty, even if not null, affecting the current hint display. 20 | /// 21 | /// 22 | bool IsEmpty(); 23 | 24 | [Obsolete] 25 | object Content { get; } 26 | 27 | bool IsLoaded { get; } 28 | 29 | bool IsVisible { get; } 30 | 31 | event EventHandler ContentChanged; 32 | 33 | event EventHandler IsVisibleChanged; 34 | 35 | event EventHandler Loaded; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/ISnackbarMessageQueue.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MaterialDesignThemes.Wpf 4 | { 5 | public interface ISnackbarMessageQueue 6 | { 7 | /// 8 | /// Queues a notificaton message for display in a snackbar. 9 | /// 10 | /// Message. 11 | void Enqueue(object content); 12 | 13 | /// 14 | /// Queues a notificaton message for display in a snackbar. 15 | /// 16 | /// Message. 17 | /// Content for the action button. 18 | /// Call back to be executed if user clicks the action button. 19 | void Enqueue(object content, object actionContent, Action actionHandler); 20 | 21 | /// 22 | /// Queues a notificaton message for display in a snackbar. 23 | /// 24 | /// Message. 25 | /// Content for the action button. 26 | /// Call back to be executed if user clicks the action button. 27 | /// Argument to pass to . 28 | void Enqueue(object content, object actionContent, Action actionHandler, TArgument actionArgument); 29 | 30 | /// 31 | /// Queues a notificaton message for display in a snackbar. 32 | /// 33 | /// Message. 34 | /// Subsequent, duplicate messages queued within a short time span will 35 | /// be discarded. To override this behaviour and ensure the message always gets displayed set to true. 36 | void Enqueue(object content, bool neverConsiderToBeDuplicate); 37 | 38 | /// 39 | /// Queues a notificaton message for display in a snackbar. 40 | /// 41 | /// Message. 42 | /// Content for the action button. 43 | /// Call back to be executed if user clicks the action button. 44 | /// The message will promoted to the front ot the queue and never considered to be a duplicate. 45 | void Enqueue(object content, object actionContent, Action actionHandler, bool promote); 46 | 47 | /// 48 | /// Queues a notificaton message for display in a snackbar. 49 | /// 50 | /// Message. 51 | /// Content for the action button. 52 | /// Call back to be executed if user clicks the action button. 53 | /// Argument to pass to . 54 | /// The message will promoted to the front ot the queue and never considered to be a duplicate. 55 | void Enqueue(object content, object actionContent, Action actionHandler, TArgument actionArgument, bool promote); 56 | } 57 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Icon.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using System.Windows.Controls; 3 | 4 | namespace MaterialDesignThemes.Wpf 5 | { 6 | /// 7 | /// Displays an icon image/path, according to the specified name. 8 | /// 9 | /// 10 | /// All icons sourced from Material Design Icons Font - - in accordance of 11 | /// . 12 | /// 13 | public class Icon : Control 14 | { 15 | public static readonly DependencyProperty TypeProperty = DependencyProperty.Register( 16 | nameof(Type), typeof (IconType), typeof (Icon), new PropertyMetadata(default(IconType))); 17 | 18 | /// 19 | /// Gets or sets the name of icon being displayed. 20 | /// 21 | public IconType Type 22 | { 23 | get { return (IconType) GetValue(TypeProperty); } 24 | set { SetValue(TypeProperty, value); } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/IconType.cs: -------------------------------------------------------------------------------- 1 | namespace MaterialDesignThemes.Wpf 2 | { 3 | /// 4 | /// List of available icons for use with . 5 | /// 6 | /// 7 | /// All icons sourced from Material Design Icons Font - - in accordance of 8 | /// . 9 | /// 10 | public enum IconType 11 | { 12 | AutoGeneratedDoNotAmend 13 | } 14 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/ListBoxAssist.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Input; 9 | using System.Windows.Media; 10 | 11 | namespace MaterialDesignThemes.Wpf 12 | { 13 | public static class ListBoxAssist 14 | { 15 | static ListBoxAssist() 16 | { 17 | EventManager.RegisterClassHandler(typeof (ListBox), UIElement.PreviewMouseLeftButtonDownEvent, 18 | new MouseButtonEventHandler(ListBoxMouseButtonEvent)); 19 | } 20 | 21 | private static void ListBoxMouseButtonEvent(object sender, MouseButtonEventArgs mouseButtonEventArgs) 22 | { 23 | var senderElement = (UIElement) sender; 24 | 25 | if (!GetIsToggle(senderElement)) return; 26 | 27 | var point = mouseButtonEventArgs.GetPosition(senderElement); 28 | var result = VisualTreeHelper.HitTest(senderElement, point); 29 | 30 | ListBoxItem listBoxItem = null; 31 | Ripple ripple = null; 32 | foreach (var dependencyObject in result.VisualHit.GetVisualAncestry().TakeWhile(_ => listBoxItem == null)) 33 | { 34 | listBoxItem = dependencyObject as ListBoxItem; 35 | if (ripple == null) 36 | ripple = dependencyObject as Ripple; 37 | } 38 | 39 | if (listBoxItem == null) return; 40 | 41 | listBoxItem.SetCurrentValue(ListBoxItem.IsSelectedProperty, !listBoxItem.IsSelected); 42 | mouseButtonEventArgs.Handled = true; 43 | 44 | if (ripple != null && listBoxItem.IsSelected) 45 | { 46 | ripple.RaiseEvent(new MouseButtonEventArgs(mouseButtonEventArgs.MouseDevice, mouseButtonEventArgs.Timestamp, mouseButtonEventArgs.ChangedButton) 47 | { RoutedEvent = Control.PreviewMouseLeftButtonDownEvent, Source = ripple } 48 | ); 49 | } 50 | } 51 | 52 | public static readonly DependencyProperty IsToggleProperty = DependencyProperty.RegisterAttached( 53 | "IsToggle", typeof(bool), typeof(ListBoxAssist), new FrameworkPropertyMetadata(default(bool))); 54 | 55 | public static void SetIsToggle(DependencyObject element, bool value) 56 | { 57 | element.SetValue(IsToggleProperty, value); 58 | } 59 | 60 | public static bool GetIsToggle(DependencyObject element) 61 | { 62 | return (bool)element.GetValue(IsToggleProperty); 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/ListSortDirectionIndicator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Windows; 5 | using System.Windows.Controls; 6 | 7 | namespace MaterialDesignThemes.Wpf 8 | { 9 | [TemplateVisualState(GroupName = DirectionGroupName, Name = NoneStateName)] 10 | [TemplateVisualState(GroupName = DirectionGroupName, Name = AscendingStateName)] 11 | [TemplateVisualState(GroupName = DirectionGroupName, Name = DescendingStateName)] 12 | public class ListSortDirectionIndicator : Control 13 | { 14 | public const string DirectionGroupName = "Direction"; 15 | public const string NoneStateName = "None"; 16 | public const string AscendingStateName = "Ascending"; 17 | public const string DescendingStateName = "Descending"; 18 | 19 | static ListSortDirectionIndicator() 20 | { 21 | DefaultStyleKeyProperty.OverrideMetadata(typeof(ListSortDirectionIndicator), new FrameworkPropertyMetadata(typeof(ListSortDirectionIndicator))); 22 | } 23 | 24 | public override void OnApplyTemplate() 25 | { 26 | base.OnApplyTemplate(); 27 | 28 | GotoVisualState(true, ListSortDirection); 29 | } 30 | 31 | 32 | public static readonly DependencyProperty ListSortDirectionProperty = DependencyProperty.Register( 33 | nameof(ListSortDirection), typeof (ListSortDirection?), typeof (ListSortDirectionIndicator), new PropertyMetadata(default(ListSortDirection?), ListSortDirectionPropertyChangedCallback)); 34 | 35 | private static void ListSortDirectionPropertyChangedCallback(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs dependencyPropertyChangedEventArgs) 36 | { 37 | var indicator = (ListSortDirectionIndicator) dependencyObject; 38 | indicator.GotoVisualState(true, indicator.ListSortDirection); 39 | indicator.IsNeutral = !indicator.ListSortDirection.HasValue; 40 | } 41 | 42 | public ListSortDirection? ListSortDirection 43 | { 44 | get { return (ListSortDirection?) GetValue(ListSortDirectionProperty); } 45 | set { SetValue(ListSortDirectionProperty, value); } 46 | } 47 | 48 | private static readonly DependencyPropertyKey IsNeutralPropertyKey = 49 | DependencyProperty.RegisterReadOnly( 50 | "IsNeutral", typeof (bool), typeof (ListSortDirectionIndicator), 51 | new PropertyMetadata(true)); 52 | 53 | public static readonly DependencyProperty IsNeutralProperty = 54 | IsNeutralPropertyKey.DependencyProperty; 55 | 56 | public bool IsNeutral 57 | { 58 | get { return (bool) GetValue(IsNeutralProperty); } 59 | private set { SetValue(IsNeutralPropertyKey, value); } 60 | } 61 | 62 | private void GotoVisualState(bool useTransitions, ListSortDirection? direction) 63 | { 64 | var stateName = direction.HasValue 65 | ? (direction.Value == System.ComponentModel.ListSortDirection.Ascending 66 | ? AscendingStateName 67 | : DescendingStateName) 68 | : NoneStateName; 69 | 70 | VisualStateManager.GoToState(this, stateName, useTransitions); 71 | } 72 | } 73 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/ListViewAssist.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using System.Windows.Controls; 3 | 4 | namespace MaterialDesignThemes.Wpf 5 | { 6 | public static class ListViewAssist 7 | { 8 | public static readonly DependencyProperty ListViewItemPaddingProperty = DependencyProperty.RegisterAttached( 9 | "ListViewItemPadding", 10 | typeof(Thickness), 11 | typeof(ListViewAssist), 12 | new FrameworkPropertyMetadata(new Thickness(8, 8, 8, 8), FrameworkPropertyMetadataOptions.Inherits)); 13 | 14 | public static void SetListViewItemPadding(DependencyObject element, Thickness value) 15 | { 16 | element.SetValue(ListViewItemPaddingProperty, value); 17 | } 18 | 19 | public static Thickness GetListViewItemPadding(DependencyObject element) 20 | { 21 | return (Thickness)element.GetValue(ListViewItemPaddingProperty); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/MaterialDataGridTextColumn.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using System.Windows.Controls; 3 | using System.Windows.Threading; 4 | 5 | namespace MaterialDesignThemes.Wpf 6 | { 7 | public class MaterialDataGridTextColumn : DataGridTextColumn 8 | { 9 | protected override object PrepareCellForEdit(FrameworkElement editingElement, RoutedEventArgs editingEventArgs) 10 | { 11 | var textBox = editingElement as TextBox; 12 | if (textBox != null) 13 | { 14 | textBox.MaxLength = MaxLength; 15 | textBox.SelectionStart = textBox.Text.Length; 16 | } 17 | 18 | editingElement.Focus(); 19 | 20 | return null; 21 | } 22 | 23 | /// 24 | /// Set the maximum length for the text field. 25 | /// 26 | /// Not a dprop, as is only applied once. 27 | public int MaxLength { get; set; } 28 | } 29 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/MessageQueueExtension.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Markup; 3 | 4 | namespace MaterialDesignThemes.Wpf 5 | { 6 | /// 7 | /// Provides shorthand to initialise a new for a . 8 | /// 9 | [MarkupExtensionReturnType(typeof(SnackbarMessageQueue))] 10 | public class MessageQueueExtension : MarkupExtension 11 | { 12 | public override object ProvideValue(IServiceProvider serviceProvider) 13 | { 14 | return new SnackbarMessageQueue(); 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/PackIcon.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using ControlzEx; 9 | 10 | namespace MaterialDesignThemes.Wpf 11 | { 12 | /// 13 | /// Icon from the Material Design Icons project, . 14 | /// 15 | public class PackIcon : PackIconBase 16 | { 17 | static PackIcon() 18 | { 19 | DefaultStyleKeyProperty.OverrideMetadata(typeof(PackIcon), new FrameworkPropertyMetadata(typeof(PackIcon))); 20 | } 21 | 22 | public PackIcon() : base(PackIconDataFactory.Create) { } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/PackIconExtension.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Markup; 3 | 4 | namespace MaterialDesignThemes.Wpf 5 | { 6 | [MarkupExtensionReturnType(typeof(PackIcon))] 7 | public class PackIconExtension : MarkupExtension 8 | { 9 | public PackIconExtension() 10 | { } 11 | 12 | public PackIconExtension(PackIconKind kind) 13 | { 14 | Kind = kind; 15 | } 16 | 17 | public PackIconExtension(PackIconKind kind, double size) 18 | { 19 | Kind = kind; 20 | Size = size; 21 | } 22 | 23 | [ConstructorArgument("kind")] 24 | public PackIconKind Kind { get; set; } 25 | 26 | [ConstructorArgument("size")] 27 | public double? Size { get; set; } 28 | 29 | public override object ProvideValue(IServiceProvider serviceProvider) 30 | { 31 | var result = new PackIcon {Kind = Kind}; 32 | 33 | if (Size.HasValue) 34 | { 35 | result.Height = Size.Value; 36 | result.Width = Size.Value; 37 | } 38 | 39 | return result; 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Palette.cs: -------------------------------------------------------------------------------- 1 | using MaterialDesignColors; 2 | 3 | namespace MaterialDesignThemes.Wpf 4 | { 5 | /// 6 | /// Provides full information about a palette. 7 | /// 8 | public class Palette 9 | { 10 | public Palette(Swatch primarySwatch, Swatch accentSwatch, int primaryLightHueIndex, int primaryMidHueIndex, int primaryDarkHueIndex, int accentHueIndex) 11 | { 12 | PrimarySwatch = primarySwatch; 13 | AccentSwatch = accentSwatch; 14 | PrimaryLightHueIndex = primaryLightHueIndex; 15 | PrimaryMidHueIndex = primaryMidHueIndex; 16 | PrimaryDarkHueIndex = primaryDarkHueIndex; 17 | AccentHueIndex = accentHueIndex; 18 | } 19 | 20 | public Swatch PrimarySwatch { get; } 21 | 22 | public Swatch AccentSwatch { get; } 23 | 24 | public int PrimaryLightHueIndex { get; } 25 | 26 | public int PrimaryMidHueIndex { get; } 27 | 28 | public int PrimaryDarkHueIndex { get; } 29 | 30 | public int AccentHueIndex { get; } 31 | } 32 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Resources; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | using System.Windows; 6 | using System.Windows.Markup; 7 | 8 | // General Information about an assembly is controlled through the following 9 | // set of attributes. Change these attribute values to modify the information 10 | // associated with an assembly. 11 | [assembly: AssemblyTitle("MaterialDesignThemes.Wpf")] 12 | [assembly: AssemblyDescription("Material Design in XAML Toolkit - WPF Themes")] 13 | [assembly: AssemblyConfiguration("")] 14 | [assembly: AssemblyCompany("Mulholland Software/James Willock")] 15 | [assembly: AssemblyProduct("MaterialDesignColors.Wpf")] 16 | [assembly: AssemblyCopyright("Copyright © 2015")] 17 | [assembly: AssemblyTrademark("")] 18 | [assembly: AssemblyCulture("")] 19 | [assembly: XmlnsPrefix("http://materialdesigninxaml.net/winfx/xaml/themes", "materialDesign")] 20 | [assembly: XmlnsDefinition("http://materialdesigninxaml.net/winfx/xaml/themes", "MaterialDesignThemes.Wpf")] 21 | [assembly: XmlnsDefinition("http://materialdesigninxaml.net/winfx/xaml/themes", "MaterialDesignThemes.Wpf.Transitions")] 22 | 23 | // Setting ComVisible to false makes the types in this assembly not visible 24 | // to COM components. If you need to access a type in this assembly from 25 | // COM, set the ComVisible attribute to true on that type. 26 | [assembly: ComVisible(false)] 27 | 28 | //In order to begin building localizable applications, set 29 | //CultureYouAreCodingWith in your .csproj file 30 | //inside a . For example, if you are using US english 31 | //in your source files, set the to en-US. Then uncomment 32 | //the NeutralResourceLanguage attribute below. Update the "en-US" in 33 | //the line below to match the UICulture setting in the project file. 34 | 35 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 36 | 37 | 38 | [assembly:ThemeInfo( 39 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 40 | //(used if a resource is not found in the page, 41 | // or application resource dictionaries) 42 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 43 | //(used if a resource is not found in the page, 44 | // app, or any theme specific resource dictionaries) 45 | )] 46 | 47 | 48 | // Version information for an assembly consists of the following four values: 49 | // 50 | // Major Version 51 | // Minor Version 52 | // Build Number 53 | // Revision 54 | // 55 | // You can specify all the values or you can default the Build and Revision Numbers 56 | // by using the '*' as shown below: 57 | // [assembly: AssemblyVersion("2.3.0.823")] 58 | [assembly: AssemblyVersion("2.3.0.823")] 59 | -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.0 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 MaterialDesignThemes.Wpf.Properties { 12 | 13 | 14 | /// 15 | /// A strongly-typed resource class, for looking up localized strings, etc. 16 | /// 17 | // This class was auto-generated by the StronglyTypedResourceBuilder 18 | // class via a tool like ResGen or Visual Studio. 19 | // To add or remove a member, edit your .ResX file then rerun ResGen 20 | // with the /str option, or rebuild your VS project. 21 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 22 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 23 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 24 | internal class Resources { 25 | 26 | private static global::System.Resources.ResourceManager resourceMan; 27 | 28 | private static global::System.Globalization.CultureInfo resourceCulture; 29 | 30 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 31 | internal Resources() { 32 | } 33 | 34 | /// 35 | /// Returns the cached ResourceManager instance used by this class. 36 | /// 37 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 38 | internal static global::System.Resources.ResourceManager ResourceManager { 39 | get { 40 | if ((resourceMan == null)) { 41 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MaterialDesignThemes.Wpf.Properties.Resources", typeof(Resources).Assembly); 42 | resourceMan = temp; 43 | } 44 | return resourceMan; 45 | } 46 | } 47 | 48 | /// 49 | /// Overrides the current thread's CurrentUICulture property for all 50 | /// resource lookups using this strongly typed resource class. 51 | /// 52 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 53 | internal static global::System.Globalization.CultureInfo Culture { 54 | get { 55 | return resourceCulture; 56 | } 57 | set { 58 | resourceCulture = value; 59 | } 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.0 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 MaterialDesignThemes.Wpf.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/RatingBarButton.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using System.Windows.Controls.Primitives; 3 | 4 | namespace MaterialDesignThemes.Wpf 5 | { 6 | public class RatingBarButton : ButtonBase 7 | { 8 | static RatingBarButton() 9 | { 10 | DefaultStyleKeyProperty.OverrideMetadata(typeof(RatingBarButton), new FrameworkPropertyMetadata(typeof(RatingBarButton))); 11 | } 12 | 13 | private static readonly DependencyPropertyKey ValuePropertyKey = 14 | DependencyProperty.RegisterReadOnly( 15 | "Value", typeof (int), typeof (RatingBarButton), 16 | new PropertyMetadata(default(int))); 17 | 18 | public static readonly DependencyProperty ValueProperty = 19 | ValuePropertyKey.DependencyProperty; 20 | 21 | public int Value 22 | { 23 | get { return (int) GetValue(ValueProperty); } 24 | internal set { SetValue(ValuePropertyKey, value); } 25 | } 26 | 27 | private static readonly DependencyPropertyKey IsWithinValuePropertyKey = 28 | DependencyProperty.RegisterReadOnly( 29 | "IsWithinSelectedValue", typeof (bool), typeof (RatingBarButton), 30 | new PropertyMetadata(default(bool))); 31 | 32 | public static readonly DependencyProperty IsWithinSelectedValueProperty = 33 | IsWithinValuePropertyKey.DependencyProperty; 34 | 35 | public bool IsWithinSelectedValue 36 | { 37 | get { return (bool) GetValue(IsWithinSelectedValueProperty); } 38 | internal set { SetValue(IsWithinValuePropertyKey, value); } 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/ScaleHost.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace MaterialDesignThemes.Wpf 4 | { 5 | /// 6 | /// Internal use only. 7 | /// 8 | public class ScaleHost : FrameworkElement 9 | { 10 | public static readonly DependencyProperty ScaleProperty = DependencyProperty.Register( 11 | "Scale", typeof(double), typeof(ScaleHost), new PropertyMetadata(0.0)); 12 | 13 | public double Scale 14 | { 15 | get { return (double) GetValue(ScaleProperty); } 16 | set { SetValue(ScaleProperty, value); } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/SnackbarMessageEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace MaterialDesignThemes.Wpf 4 | { 5 | public class SnackbarMessageEventArgs : RoutedEventArgs 6 | { 7 | public SnackbarMessageEventArgs(SnackbarMessage message) 8 | { 9 | Message = message; 10 | } 11 | 12 | public SnackbarMessageEventArgs(RoutedEvent routedEvent, SnackbarMessage message) : base(routedEvent) 13 | { 14 | Message = message; 15 | } 16 | 17 | public SnackbarMessageEventArgs(RoutedEvent routedEvent, object source, SnackbarMessage message) : base(routedEvent, source) 18 | { 19 | Message = message; 20 | } 21 | 22 | public SnackbarMessage Message { get; } 23 | } 24 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/SnackbarMessageQueueItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MaterialDesignThemes.Wpf 4 | { 5 | internal class SnackbarMessageQueueItem 6 | { 7 | public SnackbarMessageQueueItem(object content, object actionContent = null, object actionHandler = null, object actionArgument = null, Type argumentType = null, bool isPromoted = false) 8 | { 9 | Content = content; 10 | ActionContent = actionContent; 11 | ActionHandler = actionHandler; 12 | ActionArgument = actionArgument; 13 | ArgumentType = argumentType; 14 | IsPromoted = isPromoted; 15 | } 16 | 17 | public object Content { get; } 18 | 19 | public object ActionContent { get; } 20 | 21 | public object ActionHandler { get; } 22 | 23 | public object ActionArgument { get; } 24 | 25 | public Type ArgumentType { get; } 26 | 27 | public bool IsPromoted { get; } 28 | } 29 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/StringExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace MaterialDesignThemes.Wpf 9 | { 10 | internal static class StringExtensions 11 | { 12 | public static string ToTitleCase(this string text, CultureInfo culture, string separator = " ") 13 | { 14 | TextInfo textInfo = culture.TextInfo; 15 | 16 | string lowerText = textInfo.ToLower(text); 17 | string[] words = lowerText.Split(new[] { separator }, StringSplitOptions.None); 18 | 19 | return String.Join(separator, words.Select(v => textInfo.ToTitleCase(v))); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/ToolTipAssist.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using System.Windows.Controls.Primitives; 3 | 4 | namespace MaterialDesignThemes.Wpf 5 | { 6 | public static class ToolTipAssist 7 | { 8 | public static CustomPopupPlacementCallback CustomPopupPlacementCallback => CustomPopupPlacementCallbackImpl; 9 | 10 | public static CustomPopupPlacement[] CustomPopupPlacementCallbackImpl(Size popupSize, Size targetSize, Point offset) 11 | { 12 | return new [] 13 | { 14 | new CustomPopupPlacement(new Point(targetSize.Width/2 - popupSize.Width/2, targetSize.Height + 14), PopupPrimaryAxis.Horizontal) 15 | }; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Transitions/CircleWipe.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows; 3 | using System.Windows.Media; 4 | using System.Windows.Media.Animation; 5 | 6 | namespace MaterialDesignThemes.Wpf.Transitions 7 | { 8 | public class CircleWipe : ITransitionWipe 9 | { 10 | public void Wipe(TransitionerSlide fromSlide, TransitionerSlide toSlide, Point origin, IZIndexController zIndexController) 11 | { 12 | if (fromSlide == null) throw new ArgumentNullException(nameof(fromSlide)); 13 | if (toSlide == null) throw new ArgumentNullException(nameof(toSlide)); 14 | if (zIndexController == null) throw new ArgumentNullException(nameof(zIndexController)); 15 | 16 | var horizontalProportion = Math.Max(1.0 - origin.X, 1.0 * origin.X); 17 | var verticalProportion = Math.Max(1.0 - origin.Y, 1.0 * origin.Y); 18 | var radius = Math.Sqrt(Math.Pow(toSlide.ActualWidth * horizontalProportion, 2) + Math.Pow(toSlide.ActualHeight * verticalProportion, 2)); 19 | 20 | var scaleTransform = new ScaleTransform(0, 0); 21 | var translateTransform = new TranslateTransform(toSlide.ActualWidth * origin.X, toSlide.ActualHeight * origin.Y); 22 | var transformGroup = new TransformGroup(); 23 | transformGroup.Children.Add(scaleTransform); 24 | transformGroup.Children.Add(translateTransform); 25 | var ellipseGeomotry = new EllipseGeometry() 26 | { 27 | RadiusX = radius, 28 | RadiusY = radius, 29 | Transform = transformGroup 30 | }; 31 | 32 | toSlide.SetCurrentValue(UIElement.ClipProperty, ellipseGeomotry); 33 | zIndexController.Stack(toSlide, fromSlide); 34 | 35 | var zeroKeyTime = KeyTime.FromTimeSpan(TimeSpan.Zero); 36 | var midKeyTime = KeyTime.FromTimeSpan(TimeSpan.FromMilliseconds(200)); 37 | var endKeyTime = KeyTime.FromTimeSpan(TimeSpan.FromMilliseconds(400)); 38 | 39 | var opacityAnimation = new DoubleAnimationUsingKeyFrames(); 40 | opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame(1, zeroKeyTime)); 41 | opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame(1, midKeyTime)); 42 | opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame(0, endKeyTime)); 43 | opacityAnimation.Completed += (sender, args) => 44 | { 45 | fromSlide.BeginAnimation(UIElement.OpacityProperty, null); 46 | fromSlide.Opacity = 0; 47 | }; 48 | fromSlide.BeginAnimation(UIElement.OpacityProperty, opacityAnimation); 49 | 50 | var scaleAnimation = new DoubleAnimationUsingKeyFrames(); 51 | scaleAnimation.Completed += (sender, args) => 52 | { 53 | toSlide.SetCurrentValue(UIElement.ClipProperty, null); 54 | fromSlide.BeginAnimation(UIElement.OpacityProperty, null); 55 | fromSlide.Opacity = 0; 56 | }; 57 | scaleAnimation.KeyFrames.Add(new EasingDoubleKeyFrame(0, zeroKeyTime)); 58 | scaleAnimation.KeyFrames.Add(new EasingDoubleKeyFrame(1, endKeyTime)); 59 | scaleTransform.BeginAnimation(ScaleTransform.ScaleXProperty, scaleAnimation); 60 | scaleTransform.BeginAnimation(ScaleTransform.ScaleYProperty, scaleAnimation); 61 | } 62 | } 63 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Transitions/ITransitionEffect.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using System.Windows.Media.Animation; 3 | 4 | namespace MaterialDesignThemes.Wpf.Transitions 5 | { 6 | public interface ITransitionEffect 7 | { 8 | Timeline Build(TSubject effectSubject) where TSubject : FrameworkElement, ITransitionEffectSubject; 9 | } 10 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Transitions/ITransitionEffectSubject.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MaterialDesignThemes.Wpf.Transitions 4 | { 5 | public interface ITransitionEffectSubject 6 | { 7 | string MatrixTransformName { get; } 8 | string RotateTransformName { get; } 9 | string ScaleTransformName { get; } 10 | string SkewTransformName { get; } 11 | string TranslateTransformName { get; } 12 | TimeSpan Offset { get; } 13 | } 14 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Transitions/ITransitionWipe.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace MaterialDesignThemes.Wpf.Transitions 4 | { 5 | public interface ITransitionWipe 6 | { 7 | void Wipe(TransitionerSlide fromSlide, TransitionerSlide toSlide, Point origin, IZIndexController zIndexController); 8 | } 9 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Transitions/IZIndexController.cs: -------------------------------------------------------------------------------- 1 | namespace MaterialDesignThemes.Wpf.Transitions 2 | { 3 | public interface IZIndexController 4 | { 5 | void Stack(params TransitionerSlide[] highestToLowest); 6 | } 7 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Transitions/SlideOutWipe.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows; 3 | using System.Windows.Media; 4 | using System.Windows.Media.Animation; 5 | 6 | namespace MaterialDesignThemes.Wpf.Transitions 7 | { 8 | public class SlideOutWipe : ITransitionWipe 9 | { 10 | private readonly SineEase _sineEase = new SineEase(); 11 | 12 | public void Wipe(TransitionerSlide fromSlide, TransitionerSlide toSlide, Point origin, IZIndexController zIndexController) 13 | { 14 | if (fromSlide == null) throw new ArgumentNullException(nameof(fromSlide)); 15 | if (toSlide == null) throw new ArgumentNullException(nameof(toSlide)); 16 | if (zIndexController == null) throw new ArgumentNullException(nameof(zIndexController)); 17 | 18 | var zeroKeyTime = KeyTime.FromTimeSpan(TimeSpan.Zero); 19 | var midishKeyTime = KeyTime.FromTimeSpan(TimeSpan.FromMilliseconds(200)); 20 | var endKeyTime = KeyTime.FromTimeSpan(TimeSpan.FromMilliseconds(400)); 21 | 22 | //back out old slide setup 23 | var scaleTransform = new ScaleTransform(1, 1); 24 | fromSlide.RenderTransform = scaleTransform; 25 | var scaleAnimation = new DoubleAnimationUsingKeyFrames(); 26 | scaleAnimation.KeyFrames.Add(new EasingDoubleKeyFrame(1, zeroKeyTime)); 27 | scaleAnimation.KeyFrames.Add(new EasingDoubleKeyFrame(.8, endKeyTime)); 28 | scaleAnimation.Completed += (sender, args) => 29 | { 30 | fromSlide.RenderTransform = null; 31 | }; 32 | var opacityAnimation = new DoubleAnimationUsingKeyFrames(); 33 | opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame(1, zeroKeyTime)); 34 | opacityAnimation.KeyFrames.Add(new EasingDoubleKeyFrame(0, endKeyTime)); 35 | opacityAnimation.Completed += (sender, args) => 36 | { 37 | fromSlide.BeginAnimation(UIElement.OpacityProperty, null); 38 | fromSlide.Opacity = 0; 39 | }; 40 | 41 | //slide in new slide setup 42 | var translateTransform = new TranslateTransform(0, toSlide.ActualHeight); 43 | toSlide.RenderTransform = translateTransform; 44 | var slideAnimation = new DoubleAnimationUsingKeyFrames(); 45 | slideAnimation.KeyFrames.Add(new LinearDoubleKeyFrame(toSlide.ActualHeight, zeroKeyTime)); 46 | slideAnimation.KeyFrames.Add(new EasingDoubleKeyFrame(toSlide.ActualHeight, midishKeyTime) { EasingFunction = _sineEase}); 47 | slideAnimation.KeyFrames.Add(new EasingDoubleKeyFrame(0, endKeyTime) { EasingFunction = _sineEase }); 48 | 49 | //kick off! 50 | translateTransform.BeginAnimation(TranslateTransform.YProperty, slideAnimation); 51 | scaleTransform.BeginAnimation(ScaleTransform.ScaleXProperty, scaleAnimation); 52 | scaleTransform.BeginAnimation(ScaleTransform.ScaleYProperty, scaleAnimation); 53 | fromSlide.BeginAnimation(UIElement.OpacityProperty, opacityAnimation); 54 | 55 | zIndexController.Stack(toSlide, fromSlide); 56 | } 57 | } 58 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Transitions/TransitionAssist.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace MaterialDesignThemes.Wpf.Transitions 4 | { 5 | /// 6 | /// Allows transitions to be disabled where supported. 7 | /// 8 | public static class TransitionAssist 9 | { 10 | /// 11 | /// Allows transitions to be disabled where supported. Note this is an inheritable property. 12 | /// 13 | public static readonly DependencyProperty DisableTransitionsProperty = DependencyProperty.RegisterAttached( 14 | "DisableTransitions", typeof (bool), typeof (TransitionAssist), new FrameworkPropertyMetadata(default(bool), FrameworkPropertyMetadataOptions.Inherits)); 15 | 16 | /// 17 | /// Allows transitions to be disabled where supported. Note this is an inheritable property. 18 | /// 19 | public static void SetDisableTransitions(DependencyObject element, bool value) 20 | { 21 | element.SetValue(DisableTransitionsProperty, value); 22 | } 23 | 24 | /// 25 | /// Allows transitions to be disabled where supported. Note this is an inheritable property. 26 | /// 27 | public static bool GetDisableTransitions(DependencyObject element) 28 | { 29 | return (bool) element.GetValue(DisableTransitionsProperty); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Transitions/TransitionEffectBase.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using System.Windows.Media.Animation; 3 | using MaterialDesignThemes.Wpf.Transitions; 4 | 5 | namespace MaterialDesignThemes.Wpf.Transitions 6 | { 7 | public abstract class TransitionEffectBase : FrameworkElement, ITransitionEffect 8 | { 9 | public abstract Timeline Build(TSubject effectSubject) where TSubject : FrameworkElement, ITransitionEffectSubject; 10 | } 11 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Transitions/TransitionEffectExtension.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Markup; 3 | 4 | namespace MaterialDesignThemes.Wpf.Transitions 5 | { 6 | [MarkupExtensionReturnType(typeof(TransitionEffectBase))] 7 | public class TransitionEffectExtension : MarkupExtension 8 | { 9 | public TransitionEffectExtension() 10 | { 11 | Kind = TransitionEffectKind.None; 12 | } 13 | 14 | public TransitionEffectExtension(TransitionEffectKind kind) 15 | { 16 | Kind = kind; 17 | } 18 | 19 | public TransitionEffectExtension(TransitionEffectKind kind, TimeSpan duration) 20 | { 21 | Kind = kind; 22 | Duration = duration; 23 | } 24 | 25 | [ConstructorArgument("kind")] 26 | public TransitionEffectKind Kind { get; set; } 27 | 28 | [ConstructorArgument("duration")] 29 | public TimeSpan? Duration { get; set; } 30 | 31 | public override object ProvideValue(IServiceProvider serviceProvider) 32 | { 33 | return Duration.HasValue ? new TransitionEffect(Kind, Duration.Value) : new TransitionEffect(Kind); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Transitions/TransitionEffectKind.cs: -------------------------------------------------------------------------------- 1 | namespace MaterialDesignThemes.Wpf.Transitions 2 | { 3 | public enum TransitionEffectKind 4 | { 5 | None, 6 | ExpandIn, 7 | FadeIn, 8 | SlideInFromLeft, 9 | SlideInFromTop, 10 | SlideInFromRight, 11 | SlideInFromBottom 12 | } 13 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Transitions/TransitionEffectTypeConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel; 3 | using System.Globalization; 4 | using System.Windows.Markup; 5 | 6 | namespace MaterialDesignThemes.Wpf.Transitions 7 | { 8 | public class TransitionEffectTypeConverter : TypeConverter 9 | { 10 | public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 11 | { 12 | return sourceType == typeof(string) || typeof(TransitionEffectKind).IsAssignableFrom(sourceType); 13 | } 14 | 15 | public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) 16 | { 17 | TransitionEffectBase transitionEffect = null; 18 | 19 | var stringValue = value as string; 20 | if (stringValue != null) 21 | { 22 | TransitionEffectKind effectKind; 23 | if (Enum.TryParse(stringValue, out effectKind)) 24 | transitionEffect = new TransitionEffect(effectKind); 25 | } 26 | else 27 | transitionEffect = value as TransitionEffectBase; 28 | 29 | if (transitionEffect == null) 30 | throw new XamlParseException($"Could not parse to type {typeof (TransitionEffectKind).FullName} or {typeof (TransitionEffectBase).FullName}."); 31 | 32 | return transitionEffect; 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Transitions/TransitionerSlideState.cs: -------------------------------------------------------------------------------- 1 | namespace MaterialDesignThemes.Wpf.Transitions 2 | { 3 | public enum TransitionerSlideState 4 | { 5 | None, 6 | Current, 7 | Previous, 8 | } 9 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Transitions/TransitioningContent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows; 3 | 4 | namespace MaterialDesignThemes.Wpf.Transitions 5 | { 6 | [Flags] 7 | public enum TransitioningContentRunHint 8 | { 9 | Loaded = 1, 10 | IsVisibleChanged = 2, 11 | All = Loaded | IsVisibleChanged 12 | } 13 | 14 | 15 | /// 16 | /// Content control to enable easier transitions. 17 | /// 18 | public class TransitioningContent : TransitioningContentBase 19 | { 20 | static TransitioningContent() 21 | { 22 | DefaultStyleKeyProperty.OverrideMetadata(typeof(TransitioningContent), new FrameworkPropertyMetadata(typeof(TransitioningContent))); 23 | } 24 | 25 | public TransitioningContent() 26 | { 27 | Loaded += (sender, args) => Run(TransitioningContentRunHint.Loaded); 28 | IsVisibleChanged += (sender, args) => Run(TransitioningContentRunHint.IsVisibleChanged); 29 | 30 | } 31 | 32 | public static readonly DependencyProperty RunHintProperty = DependencyProperty.Register( 33 | "RunHint", typeof(TransitioningContentRunHint), typeof(TransitioningContent), new PropertyMetadata(TransitioningContentRunHint.All)); 34 | 35 | public TransitioningContentRunHint RunHint 36 | { 37 | get { return (TransitioningContentRunHint)GetValue(RunHintProperty); } 38 | set { SetValue(RunHintProperty, value); } 39 | } 40 | 41 | private void Run(TransitioningContentRunHint requiredHint) 42 | { 43 | if ((RunHint & requiredHint) == requiredHint) 44 | RunOpeningEffects(); 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/Underline.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using MaterialDesignThemes.Wpf.Transitions; 10 | 11 | namespace MaterialDesignThemes.Wpf 12 | { 13 | /// 14 | /// 15 | /// 16 | [TemplateVisualState(GroupName="ActivationStates", Name = ActiveStateName)] 17 | [TemplateVisualState(GroupName = "ActivationStates", Name = InactiveStateName)] 18 | public class Underline : Control 19 | { 20 | public const string ActiveStateName = "Active"; 21 | public const string InactiveStateName = "Inactive"; 22 | 23 | static Underline() 24 | { 25 | DefaultStyleKeyProperty.OverrideMetadata(typeof(Underline), new FrameworkPropertyMetadata(typeof(Underline))); 26 | } 27 | 28 | public static readonly DependencyProperty IsActiveProperty = DependencyProperty.Register( 29 | nameof(IsActive), typeof(bool), typeof(Underline), 30 | new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender, IsActivePropertyChangedCallback)); 31 | 32 | private static void IsActivePropertyChangedCallback(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs dependencyPropertyChangedEventArgs) 33 | { 34 | ((Underline)dependencyObject).GotoVisualState(!TransitionAssist.GetDisableTransitions(dependencyObject)); 35 | } 36 | 37 | public bool IsActive 38 | { 39 | get { return (bool)GetValue(IsActiveProperty); } 40 | set { SetValue(IsActiveProperty, value); } 41 | } 42 | 43 | public override void OnApplyTemplate() 44 | { 45 | base.OnApplyTemplate(); 46 | 47 | GotoVisualState(false); 48 | } 49 | 50 | private void GotoVisualState(bool useTransitions) 51 | { 52 | VisualStateManager.GoToState(this, SelectStateName(), useTransitions); 53 | } 54 | 55 | private string SelectStateName() 56 | { 57 | return IsActive ? ActiveStateName : InactiveStateName; 58 | } 59 | } 60 | } -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/ValidationAssist.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | 8 | namespace MaterialDesignThemes.Wpf 9 | { 10 | public static class ValidationAssist 11 | { 12 | #region ShowOnFocusProperty 13 | 14 | /// 15 | /// The hint property 16 | /// 17 | public static readonly DependencyProperty OnlyShowOnFocusProperty = DependencyProperty.RegisterAttached( 18 | "OnlyShowOnFocus", 19 | typeof(bool), 20 | typeof(ValidationAssist), 21 | new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.Inherits)); 22 | 23 | public static bool GetOnlyShowOnFocus(DependencyObject element) 24 | { 25 | return (bool)element.GetValue(OnlyShowOnFocusProperty); 26 | } 27 | 28 | public static void SetOnlyShowOnFocus(DependencyObject element, bool value) 29 | { 30 | element.SetValue(OnlyShowOnFocusProperty, value); 31 | } 32 | 33 | #endregion 34 | 35 | #region UsePopupProperty 36 | 37 | /// 38 | /// The hint property 39 | /// 40 | public static readonly DependencyProperty UsePopupProperty = DependencyProperty.RegisterAttached( 41 | "UsePopup", 42 | typeof(bool), 43 | typeof(ValidationAssist), 44 | new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.Inherits)); 45 | 46 | public static bool GetUsePopup(DependencyObject element) 47 | { 48 | return (bool)element.GetValue(OnlyShowOnFocusProperty); 49 | } 50 | 51 | public static void SetUsePopup(DependencyObject element, bool value) 52 | { 53 | element.SetValue(OnlyShowOnFocusProperty, value); 54 | } 55 | 56 | #endregion 57 | 58 | /// 59 | /// Framework use only. 60 | /// 61 | public static readonly DependencyProperty SuppressProperty = DependencyProperty.RegisterAttached( 62 | "Suppress", typeof (bool), typeof (ValidationAssist), new FrameworkPropertyMetadata(default(bool), FrameworkPropertyMetadataOptions.Inherits)); 63 | 64 | /// 65 | /// Framework use only. 66 | /// 67 | /// 68 | /// 69 | public static void SetSuppress(DependencyObject element, bool value) 70 | { 71 | element.SetValue(SuppressProperty, value); 72 | } 73 | 74 | /// 75 | /// Framework use only. 76 | /// 77 | public static bool GetSuppress(DependencyObject element) 78 | { 79 | return (bool) element.GetValue(SuppressProperty); 80 | } 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /packages/MaterialDesignThemes.2.3.0.823/src/net45/obj/AppVeyor/GeneratedInternalTypeHelper.g.cs: -------------------------------------------------------------------------------- 1 |  2 | 3 | --------------------------------------------------------------------------------