Пример #1
0
 public FormApp()
 {
     InitializeComponent();
     this.m_friends        = new ArrayList();
     this.m_fbFriendsUtils = new FacebookFriendsUtils();
     this.m_debugPath      = Directory.GetCurrentDirectory();
     this.m_path           = Path.GetFullPath(Path.Combine(this.m_debugPath, @"..\..\"));
 }
Пример #2
0
        private ArrayList getFriendsFromFile(string i_fileName)
        {
            FacebookFriendsUtils friendFromFile = null;

            if (File.Exists(i_fileName))
            {
                this.m_firstCreated = false;
                using (Stream stream = new FileStream(i_fileName, FileMode.OpenOrCreate))
                {
                    XmlSerializer deserializer = new XmlSerializer(this.GetType());
                    friendFromFile = deserializer.Deserialize(stream) as FacebookFriendsUtils;
                    friendFromFile.m_firstCreated = false;
                }
            }

            return(friendFromFile.CurrentFriends);
        }