Пример #1
0
        public void CreateProject()
        {
            //Create a new project;
            if(String.IsNullOrEmpty(this._MinecraftForgeVer) || String.IsNullOrEmpty(this._MinecraftVersion) || String.IsNullOrEmpty(this._ProjectName))
            {
                var taskDialog = new TaskDialog();
                taskDialog.Caption = "入力エラー";
                taskDialog.InstructionText = "値が入力されていません。";
                taskDialog.Text = "値が十分ではありません。\nすべての値を入力する必要があります。";
                taskDialog.Icon = TaskDialogStandardIcon.Error;
                taskDialog.StandardButtons = TaskDialogStandardButtons.Ok;
                taskDialog.Opened += (sender, e) =>
                {
                    var dialog = (TaskDialog)sender;
                    dialog.Icon = dialog.Icon;
                };
                taskDialog.Show();
                return;
            }
            Project project = new Project
            {
                Mod = new List<Mod>(),
                Name = this.ProjectName,
                MCVersion = this.MinecraftVersion,
                ForgeVersion = this.MinecraftForgeVer,
                MCPVersion = Minecraft.MCPVersions[this.MinecraftVersion]
            };

            Setup setup = new Setup(project);
            //setup.SetProgressWindow(this.View);
            if(this.MinecraftVersion.Contains("Gradle"))
            {
                setup.SetupForgeGradle();
            }
            else
            {
                setup.SetupForge();
            }
        }
Пример #2
0
 public Recompile(Project project)
 {
     this.project = project;
     this.viewModel = null;
 }
Пример #3
0
 public Setup(Project project)
 {
     this.project = project;
     this.viewModel = null;
     this.downloads = new List<string>();
 }