Ejemplo n.º 1
0
 protected void ShowConnectToNetworkDialog(Dictionary <string, string> AddNetworkStartupParamsDict)
 {
     // Do not show the dialog unless a serviceUrl has been provided!
     if (AddNetworkStartupParamsDict != null && AddNetworkStartupParamsDict.ContainsKey("serviceUrl"))
     {
         // Use the retrieved startup parameters to generate a "Connect to Network" popup window.
         NetworkConnectForm f = new NetworkConnectForm(AddNetworkStartupParamsDict);
         f.NetworkSettingChanged += ConfigurationChanged_EventHandler;
         f.ShowDialog();
     }
 }
Ejemplo n.º 2
0
 private void btnUpdate_Click(object sender, EventArgs e)
 {
     try
     {
         if (null != dgvNetworkList.SelectedRows && dgvNetworkList.SelectedRows.Count > 0)
         {
             NetWorkSetting ns = dgvNetworkList.SelectedRows[0].DataBoundItem as NetWorkSetting;
             Dictionary <string, string> dict = new Dictionary <string, string>();
             dict.Add("serviceUrl", ns.HubWebServiceUrl);
             dict.Add("networkName", ns.NetworkName);
             dict.Add("username", ns.Username);
             NetworkConnectForm f = new NetworkConnectForm(dict);
             f.NetworkSettingChanged += NetworkSettingChanged_EventHandler;
             f.ShowDialog();
         }
     }
     catch (Exception ex)
     {
         log.Error(ex);
     }
 }