Пример #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
        private void registerId_Click(object sender, EventArgs e)
        {
            RegisterInfo rinfo = new RegisterInfo();

            rinfo.Show(this);
        }