Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions WindowsFormsApplication1/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 15 additions & 13 deletions WindowsFormsApplication1/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,37 +15,39 @@ namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
private const string M_HostName = "localhost";
private string hosturl = "http://localhost:15672";
private string hosturl;
private string username;
private string password;
private readonly string exchangesApi;
private readonly string queuesApi;
private readonly string bingdingsApi;
private string exchangesApi;
private string queuesApi;
private string bingdingsApi;
private List<ExchangeEntity> userExchanges;
private List<QueueEntity> queues;
private List<BindingEntity> bindings;
private readonly ConnectionFactory factory;
private ConnectionFactory factory;
private ExchangeEntity exchange;
private QueueEntity queue;
private BindingEntity binding;

public Form1()
{
InitializeComponent();
exchangesApi = hosturl + "/api/exchanges";
queuesApi = hosturl + "/api/queues";
bingdingsApi = hosturl + "/api/bindings";
factory = new ConnectionFactory { HostName = M_HostName };
InitializeComponent();
InitRabbit();
}

private void InitRabbit()
{
username = txtUsername.Text.Trim();
password = txtPwd.Text.Trim();
hosturl = txtHostUrl.Text.Trim();

var host = txtHostUrl.Text.Trim();
hosturl = $"http://{host}:15672";

exchangesApi = hosturl + "/api/exchanges";
queuesApi = hosturl + "/api/queues";
bingdingsApi = hosturl + "/api/bindings";

factory = new ConnectionFactory { HostName = host };

cbExchangeType.SelectedIndex = 0;
cbDurable.SelectedIndex = 0;
Expand Down