public ProjectEnvironmentContext(ref NDKEnvironment ndk, ref SDKEnvironment sdk, ref JDKEnvironment jdk, ref PythonEnvironment py)
 {
     NdkEnv      = ndk;
     SdkEnv      = sdk;
     JdkEnv      = jdk;
     PythonEnv   = py;
 }
Пример #2
0
 private void PythonDirectoryButton_Click(object sender, EventArgs e)
 {
     if (NUtilityGlobalContext.IsValidPythonDirectory(PythonDirectoryTextBox.Text)) // MainWindow.IsValidPythonDirectory(PythonDirectoryTextBox.Text)
     {
         PythonEnvironment thz = new PythonEnvironment(PythonDirectoryTextBox.Text);
         NUtilityGlobalContext.AddPythonEnvironment(thz);
         Instance.SelectedPythonEnvironment = thz;
         MessageBox.Show("Python directory sucessfully added!");
     }
     else
     {
         DialogResult dialogResult = MessageBox.Show("The path\n" + PythonDirectoryTextBox.Text + "\nDoes not seem to be a valid Python Directory. Are you sure you want to change the environment?", "Warning", MessageBoxButtons.YesNo);
         if (dialogResult == DialogResult.Yes)
         {
             PythonEnvironment thz = new PythonEnvironment(PythonDirectoryTextBox.Text);
             NUtilityGlobalContext.AddPythonEnvironment(thz);
             Instance.SelectedPythonEnvironment = thz;
         }
     }
 }
Пример #3
0
 public static void AddPythonEnvironment(PythonEnvironment rootDirectory)
 {
     if (PythonEnvironments.Contains(rootDirectory))
     {
         return;
     }
     PythonEnvironments.Add(rootDirectory);
 }