├── Dalamud_CN ├── logo.png ├── Resources │ └── logo.ico ├── ViewModel │ ├── MainViewModel.cs │ └── ViewModelLocator.cs ├── FodyWeavers.xml ├── MainWindow.xaml.cs ├── App.xaml.cs ├── packages.config ├── Model │ └── GameRunInDX9Exception.cs ├── Properties │ ├── Settings.settings │ ├── AssemblyInfo.cs │ ├── Settings.Designer.cs │ ├── app.manifest │ ├── Resources.Designer.cs │ └── Resources.resx ├── App.xaml ├── App.config ├── Utils.cs ├── MainWindow.xaml ├── FodyWeavers.xsd └── Dalamud_CN.csproj ├── Dalamid_CN_cli ├── App.config ├── Properties │ ├── AssemblyInfo.cs │ └── app.manifest ├── Dalamud_CN_cli.csproj └── Program.cs ├── Dalamud_CN.sln ├── .gitattributes ├── .gitignore └── LICENSE /Dalamud_CN/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FairyScript/Dalamud_CN/HEAD/Dalamud_CN/logo.png -------------------------------------------------------------------------------- /Dalamud_CN/Resources/logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FairyScript/Dalamud_CN/HEAD/Dalamud_CN/Resources/logo.ico -------------------------------------------------------------------------------- /Dalamud_CN/ViewModel/MainViewModel.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FairyScript/Dalamud_CN/HEAD/Dalamud_CN/ViewModel/MainViewModel.cs -------------------------------------------------------------------------------- /Dalamud_CN/FodyWeavers.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /Dalamid_CN_cli/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Dalamud_CN/MainWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace Dalamud_CN 4 | { 5 | /// 6 | /// MainWindow.xaml 的交互逻辑 7 | /// 8 | public partial class MainWindow : Window 9 | { 10 | 11 | public MainWindow() 12 | { 13 | InitializeComponent(); 14 | } 15 | 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Dalamud_CN/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 Dalamud_CN 10 | { 11 | /// 12 | /// App.xaml 的交互逻辑 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Dalamud_CN/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Dalamud_CN/Model/GameRunInDX9Exception.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 Dalamud_CN 8 | { 9 | class GameRunInDX9Exception : ApplicationException 10 | { 11 | public GameRunInDX9Exception(string message) : base(message) { } 12 | 13 | public override string Message 14 | { 15 | get 16 | { 17 | return base.Message; 18 | } 19 | } 20 | 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Dalamud_CN/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | True 7 | 8 | 9 | False 10 | 11 | 12 | -------------------------------------------------------------------------------- /Dalamud_CN/App.xaml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Dalamud_CN/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | True 15 | 16 | 17 | False 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Dalamid_CN_cli/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的一般信息由以下 6 | // 控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("Dalamid_CN_cli")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Dalamid_CN_cli")] 13 | [assembly: AssemblyCopyright("Copyright © 2020")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 会使此程序集中的类型 18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 19 | //请将此类型的 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("7f79524a-75b5-4dba-bf47-406b1a572f62")] 24 | 25 | // 程序集的版本信息由下列四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 生成号 30 | // 修订号 31 | // 32 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 33 | //通过使用 "*",如下所示: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.2.0.0")] 36 | [assembly: AssemblyFileVersion("1.2.0.0")] 37 | -------------------------------------------------------------------------------- /Dalamud_CN/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("Dalamud_CN")] 11 | [assembly: AssemblyDescription("")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("")] 14 | [assembly: AssemblyProduct("Dalamud_CN")] 15 | [assembly: AssemblyCopyright("Copyright © 2020")] 16 | [assembly: AssemblyTrademark("")] 17 | [assembly: AssemblyCulture("")] 18 | 19 | // 将 ComVisible 设置为 false 会使此程序集中的类型 20 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 21 | //请将此类型的 ComVisible 特性设置为 true。 22 | [assembly: ComVisible(false)] 23 | 24 | //若要开始生成可本地化的应用程序,请设置 25 | //.csproj 文件中的 CultureYouAreCodingWith 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.2.0.0")] 55 | [assembly: AssemblyFileVersion("1.2.0.0")] 56 | -------------------------------------------------------------------------------- /Dalamud_CN/ViewModel/ViewModelLocator.cs: -------------------------------------------------------------------------------- 1 | /* 2 | In App.xaml: 3 | 4 | 6 | 7 | 8 | In the View: 9 | DataContext="{Binding Source={StaticResource Locator}, Path=ViewModelName}" 10 | 11 | You can also use Blend to do all this with the tool's support. 12 | See http://www.galasoft.ch/mvvm 13 | */ 14 | 15 | using GalaSoft.MvvmLight; 16 | using GalaSoft.MvvmLight.Ioc; 17 | using CommonServiceLocator; 18 | 19 | namespace Dalamud_CN.ViewModel 20 | { 21 | /// 22 | /// This class contains static references to all the view models in the 23 | /// application and provides an entry point for the bindings. 24 | /// 25 | public class ViewModelLocator 26 | { 27 | /// 28 | /// Initializes a new instance of the ViewModelLocator class. 29 | /// 30 | public ViewModelLocator() 31 | { 32 | ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default); 33 | 34 | ////if (ViewModelBase.IsInDesignModeStatic) 35 | ////{ 36 | //// // Create design time view services and models 37 | //// SimpleIoc.Default.Register(); 38 | ////} 39 | ////else 40 | ////{ 41 | //// // Create run time view services and models 42 | //// SimpleIoc.Default.Register(); 43 | ////} 44 | 45 | SimpleIoc.Default.Register(); 46 | } 47 | 48 | public MainViewModel Main 49 | { 50 | get 51 | { 52 | return ServiceLocator.Current.GetInstance(); 53 | } 54 | } 55 | 56 | public static void Cleanup() 57 | { 58 | // TODO Clear the ViewModels 59 | } 60 | } 61 | } -------------------------------------------------------------------------------- /Dalamud_CN/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本:4.0.30319.42000 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将会丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Dalamud_CN.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.7.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | 26 | [global::System.Configuration.UserScopedSettingAttribute()] 27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 28 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 29 | public bool AutoExit { 30 | get { 31 | return ((bool)(this["AutoExit"])); 32 | } 33 | set { 34 | this["AutoExit"] = value; 35 | } 36 | } 37 | 38 | [global::System.Configuration.UserScopedSettingAttribute()] 39 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 40 | [global::System.Configuration.DefaultSettingValueAttribute("False")] 41 | public bool AutoInject { 42 | get { 43 | return ((bool)(this["AutoInject"])); 44 | } 45 | set { 46 | this["AutoInject"] = value; 47 | } 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Dalamud_CN/Utils.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.IO; 5 | using System.Linq; 6 | using System.Management; 7 | using System.Runtime.InteropServices; 8 | using System.Text; 9 | using System.Threading.Tasks; 10 | using System.Windows; 11 | 12 | namespace Dalamud_CN 13 | { 14 | internal static class Utils 15 | { 16 | public static string GetProcessPath(int processId) 17 | { 18 | string MethodResult = ""; 19 | try 20 | { 21 | string Query = "SELECT ExecutablePath FROM Win32_Process WHERE ProcessId = " + processId; 22 | 23 | using (ManagementObjectSearcher mos = new ManagementObjectSearcher(Query)) 24 | { 25 | using (ManagementObjectCollection moc = mos.Get()) 26 | { 27 | string ExecutablePath = (from mo in moc.Cast() select mo["ExecutablePath"]).First().ToString(); 28 | 29 | MethodResult = ExecutablePath; 30 | 31 | } 32 | 33 | } 34 | 35 | } 36 | catch //(Exception ex) 37 | { 38 | //ex.HandleException(); 39 | } 40 | return MethodResult; 41 | } 42 | 43 | public static List GetGameProcess() 44 | { 45 | var list = new List(); 46 | list.AddRange(Process.GetProcessesByName("ffxiv_dx11")); 47 | if(list.Count == 0) 48 | { 49 | var haveDx9 = Process.GetProcessesByName("ffxiv").Length > 0; 50 | if (haveDx9) 51 | { 52 | throw new GameRunInDX9Exception("Game run in dx9!"); 53 | } 54 | } 55 | return list; 56 | } 57 | public static string GetGameVersion(Process p) 58 | { 59 | var gameDirectory = GetProcessPath(p.Id); 60 | return File.ReadAllText(Path.Combine(Path.GetDirectoryName(gameDirectory), "ffxivgame.ver")); 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Dalamud_CN/MainWindow.xaml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |