예제 #1
0
        private void FillCombos()
        {
            cboxProfiles.Items.AddRange(PROFILES);
            currentProfile = PROFILES[2];

            cboxDirections.Items.AddRange(DIRECTIONS);
            currentDirection = DIRECTIONS[1];

            cboxProfiles.SelectedItem   = currentProfile;
            cboxDirections.SelectedItem = currentDirection;
        }
예제 #2
0
        private void Cbox_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cboxProfiles.SelectedItem is ProfileItem profile &&
                cboxDirections.SelectedItem is DirectionItem direction &&
                (currentProfile != profile ||
                 currentDirection != direction))
            {
                currentProfile   = profile;
                currentDirection = direction;

                LoadRules();
            }
        }