void ShowServerFlyout(object sender, RoutedEventArgs e)
 {
     if (Servers.Count <= 1 && !SalesforceApplication.ServerConfiguration.AllowNewConnections)
     {
         addAccount_Click(sender, e);
     }
     else
     {
         ServerFlyout.Placement = FlyoutPlacementMode.Bottom;
         ServerFlyout.ShowAt(applicationTitle);
     }
 }
        private void addCustomHostBtn_Click(object sender, RoutedEventArgs e)
        {
            string        hname    = hostName.Text;
            string        haddress = hostAddress.Text;
            ServerSetting server   = new ServerSetting()
            {
                ServerHost = haddress,
                ServerName = hname
            };

            SalesforceApplication.ServerConfiguration.AddServer(server);

            ServerFlyout.ShowAt(applicationTitle);
        }
 private void cancelCustomHostBtn_Click(object sender, RoutedEventArgs e)
 {
     ServerFlyout.ShowAt(applicationTitle);
 }
 void AddServerFlyout_Closed(object sender, object e)
 {
     ServerFlyout.ShowAt(applicationTitle);
     AddServerFlyoutShowing = false;
 }