示例#1
0
        public override string ToString()
        {
            string ret = "[\n";

            for (int i = 0; i < count; i++)
            {
                if (filenames.ContainsKey(i))
                {
                    string       filename = filenames[i];
                    RegisterInfo info     = infos[filename];
                    ret += "  <" + i + ": (" + filename + ";" + info.fileMetadata + ";" + info.fileData + ")> \n";
                }
            }
            return(ret + "]");
        }
示例#2
0
        public void AddOrUpdate(string filename, FileMetadata fileMetadata)
        {
            if (!this.Contains(filename))
            {
                filenames[index] = filename;

                infos[filename]              = new RegisterInfo();
                infos[filename].index        = index;
                infos[filename].fileData     = new FileData();
                infos[filename].fileMetadata = fileMetadata;

                Interlocked.Increment(ref index);
                Interlocked.Increment(ref count);
            }
            else
            {
                infos[filename].fileMetadata = fileMetadata;
            }
        }
示例#3
0
文件: Login.cs 项目: Alvinidea/Socket
        private void registerId_Click(object sender, EventArgs e)
        {
            RegisterInfo rinfo = new RegisterInfo();

            rinfo.Show(this);
        }