private void MainWindow_Load(object sender, EventArgs e) { Instance = this; // Setting static instance this.Menu = MainMenu; BinariesList.DisplayMember = "Name"; // Displays FileInfo.Name as the text as opposed to just FileInfo.ToString() NUtilityGlobalContext.InitializeNUtility(); // ReadSettingsXML(); HandleCommandLineArgs(); // Making debug binary comboboxes disabled at startup... Makes sense since we haven't loaded a project yet // ---- // Since binaryLocationChooserComboBox is enabled, these can be enabled without a project present. // These all will become enabled iff SDK/NDK are selected w/o a project loaded!! FunctionList.SelectedIndex = 0; // Just do this so it won't be blank ever BinariesList.Enabled = false; ArchBinaryList.Enabled = false; FunctionList.Enabled = false; for (int i = 0; i < ProjectTabControl.TabPages.Count; i++) { try { TabPage page = ProjectTabControl.TabPages[i]; page.Name = page.Tag.ToString(); } catch (Exception ex) { } } AndroidStudioModuleComboBox.DropDownStyle = ComboBoxStyle.DropDownList; // This property makes values in combobox readonly BinariesList.DropDownStyle = ComboBoxStyle.DropDownList; // This property makes values in combobox readonly FunctionList.DropDownStyle = ComboBoxStyle.DropDownList; // This property makes values in combobox readonly ArchBinaryList.DropDownStyle = ComboBoxStyle.DropDownList; // This property makes values in combobox readonly ContinueButton.Enabled = false; RefreshButton.Enabled = false; ProjectPropertiesCheckBox.Enabled = false; this.MaximizeBox = false; // Doesn't allow user to maximize window this.StartPosition = FormStartPosition.CenterScreen; // Starts app in center of screen if (OSUtils.IsAdministrator()) { this.Text += " (Administrator)"; } if (!HasInitialRootDirectory) { SetAllBuildButtons(false); } // ---- // Main MenuItems DebugModeMenuItem.Checked = NUtilityGlobalContext.DebugMode; SuppressDialogsMenuItem.Checked = NUtilityGlobalContext.SuppressDialogMode; // ---- // etc if (NUtilityGlobalContext.IsMono) { PrintMessageInMessageBox("a non CLR runtime was detected. nUtility is not yet supported on third party runtimes such as Mono", severity: (int)TextSeverity.WARNING); } }
public EnvironmentDialog(MainWindow instance) { Instance = instance; InitializeComponent(); }
// ---- Constructors public JavaClassSignatureGeneratorForm(string directory, MainWindow inst) : this() { this.RootDirectory = directory; PopulateTreeView(); this.Instance = inst; }