Exemple #1
0
        public FileConfig Load()
        {
            config = new FileConfig(filename);

            try
            {
                friendgroups = config.ini.m_Sections;
            }
            catch
            {
               ;
            }

            return config;
        }
        private void FriendsConsole_Load(object sender, EventArgs e)
        {
            InitializeFriendsList();

            //lbGroups.Items.Add("All");
            //lbGroups.SelectedIndex = 0;
            cbofgroups.Items.Add("...All friends");
            cbofgroups.SelectedIndex = 0;

            string fconffile = METAbolt.DataFolder.GetDataFolder() + "\\" + client.Self.AgentID.ToString() + "_fr_groups.ini";
            // maybe use "Path.Combine(METAbolt.DataFolder.GetDataFolder(),client.Self.AgentID.ToString() + "_fr_groups.ini");" ?

            if (!System.IO.File.Exists(fconffile))
            {
                System.IO.StreamWriter SW;

                SW = System.IO.File.CreateText(fconffile);
                SW.Dispose();
            }

            //lbxFriends.PreSelect  += new EventHandler(lbxFriends_PreSelect);

            fconfig = new FileConfig(fconffile);
            fconfig.Load();

            LoadFriendGroups();
        }
        private void FriendsConsole_Load(object sender, EventArgs e)
        {
            InitializeFriendsList();

            //lbGroups.Items.Add("All");
            //lbGroups.SelectedIndex = 0;
            cbofgroups.Items.Add("...All friends");
            cbofgroups.SelectedIndex = 0;

            string fconffile = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\METAbolt\\" + client.Self.AgentID.ToString() + "_fr_groups.ini";

            if (!System.IO.File.Exists(fconffile))
            {
                System.IO.StreamWriter SW;

                SW = System.IO.File.CreateText(fconffile);
                SW.Dispose();
            }

            //lbxFriends.PreSelect  += new EventHandler(lbxFriends_PreSelect);

            fconfig = new FileConfig(fconffile);
            fconfig.Load();

            LoadFriendGroups();
        }