refactor network setting dialog