private void btnKnowledgeBoard_Click(object sender, RoutedEventArgs e) { if (profiles.Count > 0) { string actvalue = cboProfile.SelectedValue.ToString(); if (profiles.ContainsKey(actvalue)) { KnowledgeBoard.ShowKnowledgeBoard(profiles[actvalue].ixConf); } } }
public static void ShowKnowledgeBoard(KonfigurationIx ixConf) { try { IXConnFactory connFact = new IXConnFactory(ixConf.ixUrl, "Show KnowledgeBoard", "1.0"); IXConnection ixConn = connFact.Create(ixConf.user, ixConf.pwd, null, null); string ticket = ixConn.LoginResult.clientInfo.ticket; string ixUrl = ixConn.EndpointUrl; string appUrl = ixUrl.Replace("ix-", "wf-"); appUrl = appUrl.Replace("/ix", "/apps/app"); appUrl = appUrl + "/"; Dictionary <string, string> dicApp = KnowledgeBoard.GetKnowledgeBoard(ixConn); appUrl = appUrl + dicApp["configApp"]; appUrl = appUrl + "/?lang=de"; appUrl = appUrl + "&ciId=" + dicApp["configApp"]; appUrl = appUrl + "&ticket=" + ticket; appUrl = appUrl + "&timezone=Europe%2FBerlin"; Http.OpenUrl(appUrl); } catch (byps.BException e) { if (e.Source != null) { MessageBox.Show("Falsche Verbindungsdaten zu ELO \n" + e.Message, "ELO Connection", MessageBoxButton.OK, MessageBoxImage.Asterisk); Debug.WriteLine("byps.BException message: {0}", e.Message); } } catch (System.Net.WebException e) { if (e.Source != null) { MessageBox.Show("Indexserver-Verbindung ungültig \n User: "******"\n IxUrl: " + ixConf.ixUrl, "ELO Connection", MessageBoxButton.OK, MessageBoxImage.Asterisk); Debug.WriteLine("System.Net.WebException message: {0}", e.Message); } } }