Пример #1
0
    // 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."
    }
Пример #2
0
 public override void Release()
 {
     _resources.forEach(Resource.close);
     _resources.Clear();
     if (_valuesContainer != null)
     {
         _valuesContainer.close();
         _valuesContainer = null;
     }
 }
Пример #3
0
    // 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();
    }
Пример #4
0
        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));
        }
Пример #5
0
 // Overloaded constructor that accepts a container of values
 public ChildForm2(ValuesContainer values)
 {
     _value3 = values.Value3;
 }
Пример #6
0
 void Awake()
 {
     if (_instance == null) _instance = this;
     else if (_instance != this) { DestroyImmediate(this); return; }
     DontDestroyOnLoad(gameObject);
 }
Пример #7
0
 public Handler(AppContainer appContainer, ValuesContainer valuesContainer)
 {
     _appContainer    = appContainer;
     _valuesContainer = valuesContainer;
 }