コード例 #1
0
        private void populateConnections()
        {
            SWConnection fbfeed = new SWConnection("Facebook")
              {
            IsConnected = SWFacebookSettings.IsConnected(),
              };
              fbfeed.PropertyChanged += new PropertyChangedEventHandler(fbFeed_PropertyChanged);
              Connections.Add(fbfeed);

              SWConnection twfeed = new SWConnection("Twitter")
              {
            IsConnected = SWTwitterSettings.IsConnected(),
              };
              twfeed.PropertyChanged += new PropertyChangedEventHandler(twfeed_PropertyChanged);
              Connections.Add(twfeed);

              SWConnection lifeed = new SWConnection("LinkedIn")
              {
            IsConnected = SWLinkedInSettings.IsConnected(),
              };
              lifeed.PropertyChanged += new PropertyChangedEventHandler(lifeed_PropertyChanged);
              Connections.Add(lifeed);
        }
コード例 #2
0
 /// <summary>
 /// Authorize a connection
 /// </summary>
 private void authorizeConnection(SWConnection c)
 {
     // Authorize this connection
       authenticateLink(c.Name);
 }
コード例 #3
0
 /// <summary>
 /// Deauthorize a connection
 /// </summary>
 private void deauthorizeConnection(SWConnection c)
 {
     // Manually set isconnected to false to update UI and settings
       c.IsConnected = false;
 }