Ejemplo n.º 1
0
 public void OnData(object obj, GraphEventArgs graphEvent = null)
 {
     switch (graphEvent.Type) {
         case GraphEventArgs.Types.UserInfoLoaded:
             onLoadUserInfo(graphEvent.JData);
             break;
         case GraphEventArgs.Types.FriendsLoaded:
             onLoadFriends();
             break;
         case GraphEventArgs.Types.AreGraphLoaded:
             onGetFriends(false);
             break;
         case GraphEventArgs.Types.MutualGraphLoaded:
             onGetFriends();
             break;
         case GraphEventArgs.Types.GraphGenerated:
             onGenerateGraph(graphEvent);
             break;
     }
 }
Ejemplo n.º 2
0
 public void OnData(object obj, GraphEventArgs graphEvent)
 {
     switch (graphEvent.Type) {
         case GraphEventArgs.Types.UserInfoLoaded:
             userName = graphEvent.JData.Dictionary["name"].String;
             onLoadUserInfo(graphEvent.JData.Dictionary["uid"].String);
             break;
         case GraphEventArgs.Types.FriendsListLoaded:
             onLoadFriendsList(graphEvent.Count);
             break;
         case GraphEventArgs.Types.FriendsLoaded:
             onLoadFriends();
             break;
         case GraphEventArgs.Types.AreGraphLoaded:
         case GraphEventArgs.Types.MutualGraphLoaded:
             onGetFriends();
             break;
         case GraphEventArgs.Types.GraphGenerated:
             onGenerateGraph(graphEvent);
             break;
     }
 }
Ejemplo n.º 3
0
 private void onGenerateGraph(GraphEventArgs graphEvent)
 {
     analyzer.SetGraph(graphEvent.Vertices, graphEvent.Edges, graphEvent.DialogAttributes, graphEvent.GraphAttributes);
     analyzer.MakeTestXml();
     Enabled = true;
 }
Ejemplo n.º 4
0
 private void onGenerateGraph(GraphEventArgs graphEvent)
 {
     analyzer.SetGraph(graphEvent.Vertices, graphEvent.Edges, graphEvent.DialogAttributes, graphEvent.GraphAttributes);
     Enabled = true;
     showProgress("Generating graph document...");
 }
Ejemplo n.º 5
0
 internal void ResumeFriendsList()
 {
     var evnt = new GraphEventArgs(GraphEventArgs.Types.FriendsListLoaded, FriendsCount);
     DispatchEvent(evnt);
 }
Ejemplo n.º 6
0
 internal void AddMeIfNeeded()
 {
     graphStorage.AddIncludeMeEdgesIfNeeded();
     var evnt = new GraphEventArgs(graphStorage.Vertices, graphStorage.Edges, attributeStorage.OkDialogAttributes, attributeStorage.GraphAttributes);
     DispatchEvent(evnt);
 }
Ejemplo n.º 7
0
 internal void SendEgo(JSONObject ego)
 {
     GraphEventArgs evnt = new GraphEventArgs(GraphEventArgs.Types.UserInfoLoaded, ego);
     DispatchEvent(evnt);
 }
Ejemplo n.º 8
0
 protected virtual void DispatchEvent(GraphEventArgs e)
 {
     var handler = OnData;
     if (handler != null)
         handler(this, e);
 }
Ejemplo n.º 9
0
        internal void ResumeGetGraph(bool isMutual = true)
        {
            GraphEventArgs evnt;
            if (isMutual)
                evnt = new GraphEventArgs(GraphEventArgs.Types.MutualGraphLoaded);
            else
                evnt = new GraphEventArgs(GraphEventArgs.Types.AreGraphLoaded);

            DispatchEvent(evnt);
        }