Example #1
0
        private void bindData()
        {
            var firewallRule = FirewallConnection.Get_FirewallRuleByName(ruleName);

            editRuleNameEditText.Text            = firewallRule.FriendlyName;
            editRuleSourceMacEditText.Text       = (firewallRule.Src_mac != null) ? string.Join(", ", firewallRule.Src_mac) : string.Empty;
            editRuleSourceIpEditText.Text        = (firewallRule.Src_ip != null) ? string.Join(", ", firewallRule.Src_ip) : string.Empty;
            editRuleSourcePortEditText.Text      = (firewallRule.Src_port != null) ? string.Join(", ", firewallRule.Src_port) : string.Empty;
            editRuleDestinationIpEditText.Text   = (firewallRule.Dest_ip != null) ? string.Join(", ", firewallRule.Dest_ip) : string.Empty;
            editRuleDestinationPortEditText.Text = (firewallRule.Dest_port != null) ? string.Join(", ", firewallRule.Dest_port) : string.Empty;

            editRuleEnabledCheckBox.Checked = firewallRule.Enabled.Contains('1');
        }
Example #2
0
        private void bindData()
        {
            var firewallRule = FirewallConnection.Get_FirewallRuleByName(ruleName);

            showRuleNameTextView.Text            = firewallRule.FriendlyName;
            showRuleSourceMacTextView.Text       = (firewallRule.Src_mac != null) ? string.Join(", ", firewallRule.Src_mac) : string.Empty;
            showRuleSourceIpTextView.Text        = (firewallRule.Src_ip != null) ? string.Join(", ", firewallRule.Src_ip) : string.Empty;
            showRuleSourcePortTextView.Text      = (firewallRule.Src_port != null) ? string.Join(", ", firewallRule.Src_port) : string.Empty;
            showRuleDestinationIpTextView.Text   = (firewallRule.Dest_ip != null) ? string.Join(", ", firewallRule.Dest_ip) : string.Empty;
            showRuleDestinationPortTextView.Text = (firewallRule.Dest_port != null) ? string.Join(", ", firewallRule.Dest_port) : string.Empty;

            showRuleEnabledTextView.Text = firewallRule.Enabled.Contains('1') ? "true" : "false";
        }