private void FormMain_Load(object sender, EventArgs e) { this.notifyIcon1.Icon = this.Icon; wcfhost = new WcfHost(); messages = new ConcurrentQueue <string>(); this.FormClosing += FormMain_FormClosing; }
private void btnWcfConfig_Click(object sender, EventArgs e) { var config = new FormWcfConfig(); config.propertyGrid.SelectedObject = wcfhost.Copy(); if (config.ShowDialog() == DialogResult.OK) { wcfhost = config.propertyGrid.SelectedObject as WcfHost; } }