コード例 #1
0
        private void CTRL_Environment_ItemSelected(object sender, RoutedEventArgs e)
        {
            UC_Environment_Item selectedEnvironment = sender as UC_Environment_Item;

            EnvironmentT = selectedEnvironment.EnvironmentT;

            switch (EnvironmentT)
            {
            case EnvironmentHandler.Type.DEV:
                CTRL_Environment_TST.Clean();
                CTRL_Environment_PRD.Clean();
                break;

            case EnvironmentHandler.Type.TST:
                CTRL_Environment_DEV.Clean();
                CTRL_Environment_PRD.Clean();
                break;

            default:
                CTRL_Environment_DEV.Clean();
                CTRL_Environment_TST.Clean();
                break;
            }

            if (ItemSelected != null)
            {
                Tenants = selectedEnvironment.Tenants;

                ItemSelected?.Invoke(sender, null);
            }
        }
コード例 #2
0
        public UC_Environments()
        {
            InitializeComponent();

            CTRL_Environment_DEV.ItemSelected += CTRL_Environment_ItemSelected;
            CTRL_Environment_TST.ItemSelected += CTRL_Environment_ItemSelected;
            CTRL_Environment_PRD.ItemSelected += CTRL_Environment_ItemSelected;

            Tenants = new TenantIList();
        }
コード例 #3
0
        public UC_Environment_Item()
        {
            InitializeComponent();

            BorderCornerRadius    = 150;
            DefaultScoreBoxWidth  = 15;
            DefaultScoreBoxHeight = 9;
            NTenants        = 0;
            NDevices        = 0;
            NGroupedTenants = 30;
            NGroupedDevices = 2000;
            Available       = false;
            IsSelected      = false;
            LoadedProjects  = false;
            EnvironmentT    = EnvironmentHandler.Type.DEV;
            Tenants         = new TenantIList();
        }
コード例 #4
0
        public void BindData(TenantIList tenantsObj)
        {
            if (tenantsObj == null)
            {
                return;
            }

            Projects = tenantsObj.Tenants;

            if (Projects == null || Projects.Count < 1)
            {
                return;
            }

            TB_NDevices_Total.Text = Projects.Count.ToString(CultureInfo.InvariantCulture);

            BindProjects(Projects);
        }