Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // If you double click, it will select the sounds
- private void Form3UpgradesGunSounds_MouseDoubleClick(object sender, MouseEventArgs e)
- {
- if (e.X > 36 && e.X < 336 && e.Y > 35 && e.Y < 93) // FireTankCannon100
- {
- _tankCannon100 = true;
- }
- else if (e.X > 336 && e.X < 670 && e.Y > 35 && e.Y < 93) // FireTankCannon120
- {
- _tankCannon120 = true;
- }
- this.Close();
- }
- public bool GetTankCannon100()
- {
- return _tankCannon100;
- }
- public bool GetTankCannon120()
- {
- return _tankCannon120;
- }
- public void MoleShooter_MouseClick(object sender, MouseEventArgs e)
- {
- // ...
- Form3UpgradesGunSounds fr3UpgradesSounds = new Form3UpgradesGunSounds();
- bool _f1tankCannon100 = fr3UpgradesSounds.GetTankCannon100();
- bool _f1tankCannon120 = fr3UpgradesSounds.GetTankCannon120();
- if (_f1tankCannon100 == false)
- {
- F1TankCannon100();
- }
- else if (_f1tankCannon120 == true)
- {
- F1TankCannon120();
- }
- // ...
- }
- public void F1TankCannon100() { /*. Do something .*/ }
- public void F1TankCannon120() { /*. Do something .*/ }
- public partial class Form2: Form
- {
- public static bool BolleanProperty { get; set; }
- // ...
- }
- public partial class Form2 : Form
- {
- public static bool BolleanProperty { get; set; }
- static Form2()
- {
- BolleanProperty = true;
- }
- public Form2()
- {
- InitializeComponent();
- }
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- label1.Text = Form2.BolleanProperty.ToString();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement