コード例 #1
0
        public void CreateDefaultProfile()
        {
            MCProfile importProfile = new MCProfile(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\.minecraft", "default");
            string defaultInstall = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\.minecraft";

            if (Directory.Exists(defaultInstall))
            {
                MessageBox.Show("Importing your existing Minecraft install to the Jetset Minecraft Manager folder. Enter a name for this profile at the prompt.");
                Window newProfileWindow = new NewProfileWindow("Name Profile", "Profile name:", "Import", "Default", importProfile);
                newProfileWindow.ShowDialog();

            }
            else
            {
                MessageBox.Show("No existing Minecraft install found! Go to http:\\www.minecraft.net and buy and/or install Minecraft!", "Why did you even download this app?");
                Environment.Exit(0);
            }
        }
 public NewProfileWindowViewModel(Window window, string _action, MCProfile selectedProfile)
 {
     _window = window;
     Action = _action;
     Profile = selectedProfile;
 }
コード例 #3
0
 public void GetProfiles()
 {
     Profiles = FileMan.GetProfiles(App.CurrentDirectory + "\\profiles");
     SelectedProfile = Profiles[0];
 }
コード例 #4
0
 public static void ListProfiles(MCProfile[] profiles)
 {
     for (int i = 0; i < profiles.Length; i++)
         SysConsole.WriteLine(i + ". " + profiles[i].Name);
 }