Exemple #1
0
        //-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
        private void UpdateViewValues()
        {
            if (DataManager.selectedCity != null)
            {
                CityButton.SetTitle(DataManager.selectedCity.name, UIControlState.Normal);
            }
            if (DataManager.selectedDivision != null)
            {
                DivisionButton.SetTitle(DataManager.selectedDivision.name, UIControlState.Normal);
            }
            if (DataManager.selectedMachineType != null)
            {
                TypeButton.SetTitle(DataManager.selectedMachineType.name, UIControlState.Normal);
                TypeImageButton.SetBackgroundImage(UIImage.FromFile(DataManager.selectedMachineType.iconName), UIControlState.Normal);
            }
            if (DataManager.selectedMachineState != null)
            {
                StateButton.SetTitle(DataManager.selectedMachineState.name, UIControlState.Normal);
                StateImageButton.SetBackgroundImage(UIImage.FromFile(DataManager.selectedMachineState.iconName), UIControlState.Normal);
            }
            if (DataManager.selectedMachineServiceState != null)
            {
                ServiceStateButton.SetTitle(DataManager.selectedMachineServiceState.name, UIControlState.Normal);
                ServiceStateImageButton.SetBackgroundImage(UIImage.FromFile(DataManager.selectedMachineServiceState.iconName), UIControlState.Normal);
            }

            OnlyMyButton.SetState(DataManager.onlyMyMachines, false);
        }
Exemple #2
0
        void ReleaseDesignerOutlets()
        {
            if (CityButton != null)
            {
                CityButton.Dispose();
                CityButton = null;
            }

            if (DivisionButton != null)
            {
                DivisionButton.Dispose();
                DivisionButton = null;
            }

            if (OnlyMyButton != null)
            {
                OnlyMyButton.Dispose();
                OnlyMyButton = null;
            }

            if (ServiceStateButton != null)
            {
                ServiceStateButton.Dispose();
                ServiceStateButton = null;
            }

            if (ServiceStateImageButton != null)
            {
                ServiceStateImageButton.Dispose();
                ServiceStateImageButton = null;
            }

            if (StateButton != null)
            {
                StateButton.Dispose();
                StateButton = null;
            }

            if (StateImageButton != null)
            {
                StateImageButton.Dispose();
                StateImageButton = null;
            }

            if (TypeButton != null)
            {
                TypeButton.Dispose();
                TypeButton = null;
            }

            if (TypeImageButton != null)
            {
                TypeImageButton.Dispose();
                TypeImageButton = null;
            }

            if (UserButton != null)
            {
                UserButton.Dispose();
                UserButton = null;
            }
        }