示例#1
0
文件: Storage.cs 项目: pkelm1/Choreo
        static void LoadCue(Cue cue, RegistryKey cueRoot)
        {
            Read(cueRoot, cue);
            var rowsRoot = cueRoot.OpenSubKey("Rows");

            cue.Rows.Clear();
            if (rowsRoot == null)
            {
                return;
            }
            foreach (var rowId in rowsRoot.GetSubKeyNames())
            {
                var rowRoot = rowsRoot.OpenSubKey(rowId);
                if (rowRoot == null)
                {
                    break;
                }
                var row = new CueRow(cue, rowId);
                Read(rowRoot, row);
                cue.Rows.Add(row);
            }
        }
示例#2
0
        public static void Delete(Cue cue, CueRow row)
        {
            var elementKey = $@"Cues\{cue.Id}\Rows\{row.Id}";

            root.DeleteSubKeyTree(elementKey);
        }
示例#3
0
        public static void Delete(Cue cue)
        {
            var elementKey = $@"Cues\{cue.Id}";

            try { root.DeleteSubKeyTree(elementKey); } catch { }
        }
示例#4
0
 public CueRow(Cue cue, string id)
 {
     this.cue = cue;
     Id       = new Guid(id);
 }
示例#5
0
 public CueRow(Cue cue)
 {
     this.cue = cue;
     Id       = Guid.NewGuid();
 }