private void Method_SelectedIndexChanged(object sender, EventArgs e) { if (this.Method.SelectedIndex == 1) { AddressLabel.Text = R._("書き込む"); AddressLabel.Show(); Address.Show(); HookRegisterLabel.Hide(); HookRegister.Hide(); FREEAREALabel.Hide(); FREEAREA.Hide(); PatchMakerButton.Show(); DebugSymbol.Show(); DebugSymbolComboBox.Show(); ELFLabel.Hide(); ELFComboBox.Hide(); Address.Value = FREEAREA.Value; } else if (this.Method.SelectedIndex == 2) { AddressLabel.Text = R._("フックするアドレス"); AddressLabel.Show(); Address.Show(); HookRegisterLabel.Show(); HookRegister.Show(); FREEAREALabel.Show(); FREEAREA.Show(); PatchMakerButton.Show(); DebugSymbol.Show(); DebugSymbolComboBox.Show(); ELFLabel.Hide(); ELFComboBox.Hide(); Address.Value = 0; } else { AddressLabel.Hide(); Address.Hide(); HookRegisterLabel.Hide(); HookRegister.Hide(); FREEAREALabel.Hide(); FREEAREA.Hide(); PatchMakerButton.Hide(); DebugSymbol.Hide(); DebugSymbolComboBox.Hide(); ELFLabel.Show(); ELFComboBox.Show(); } }
private void PublishForm_Load(object sender, EventArgs e) { if (_tableName == "Arcticles") { LinkAddress.Hide(); AddressLabel.Hide(); StartPage.Hide(); EndPage.Hide(); } if (_tableName == "Books") { Dictionary <int, string> dict = _productService.GetAuthorsForPublishment(); AuthorsCombo.DataSource = new BindingSource(dict, null); AuthorsCombo.DisplayMember = "Value"; AuthorsCombo.ValueMember = "Key"; LinkAddress.Hide(); AddressLabel.Hide(); } else { StartPage.Hide(); EndPage.Hide(); } }