コード例 #1
0
ファイル: AddRulesForm.cs プロジェクト: dcg90/Firewall.Widget
        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
ファイル: AddRulesForm.cs プロジェクト: dcg90/Firewall.Widget
        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();
            }
        }