// Overloaded constructor that accepts a container of values public ChildForm1(ValuesContainer values, MainForm mainForm) { _mainForm = mainForm; _value1 = values.Value1; _value2 = values.Value2; //Set a main form value _mainForm.Value = "This value was changed by ChildForm1." }
public override void Release() { _resources.forEach(Resource.close); _resources.Clear(); if (_valuesContainer != null) { _valuesContainer.close(); _valuesContainer = null; } }
// Simulated - Event method called when button is clicked for child form 2 public void CallChildForm2() { ValuesContainer values = new ValuesContainer(); // Set the value from the main form values.Value3 = true; // Call the child form while passing in the container of values that we just populated. ChildForm2 childForm = new ChildForm2(values); childForm2.Show(); }
public override MutableLongObjectMap <Value> NewValuesMap() { if (_valuesContainer == null) { _valuesContainer = new AppendOnlyValuesContainer(_allocator); } //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final LinearProbeLongLongHashMap refs = new LinearProbeLongLongHashMap(allocator); LinearProbeLongLongHashMap refs = new LinearProbeLongLongHashMap(_allocator); _resources.Add(refs); return(new ValuesMap(refs, _valuesContainer)); }
// Overloaded constructor that accepts a container of values public ChildForm2(ValuesContainer values) { _value3 = values.Value3; }
void Awake() { if (_instance == null) _instance = this; else if (_instance != this) { DestroyImmediate(this); return; } DontDestroyOnLoad(gameObject); }
public Handler(AppContainer appContainer, ValuesContainer valuesContainer) { _appContainer = appContainer; _valuesContainer = valuesContainer; }