//------------------------------------------------- public void setOpt(aerenderOpt op) { _opt.Copy(op); dispOpt(); editFlag = false; chkEnabled(); }
//------------------------------------------------------- private void AddAepFile(string path) { if (File.Exists(path) == false) { return; } aerenderOpt o = new aerenderOpt(path); _list.Add(o); this.Items.Add(o.ProjectInfo); }
//------------------------------------------------------- public void saveList(string path) { string ret = ""; aerenderOpt ao = new aerenderOpt(""); ret += ao.header + "\r\n"; if (_list.Count > 0) { for (int i = 0; i < _list.Count; i++) { ret += _list[i].toLine() + "\r\n"; } } File.WriteAllText(path, ret, Encoding.GetEncoding("utf-8")); }
//------------------------------------------------------- private void dup(int idx) { if ((idx < 0) || (idx >= _list.Count)) { return; } aerenderOpt o = new aerenderOpt(""); o.Copy(_list[idx]); _list.Insert(idx, o); object ob = this.Items[idx]; this.Items.Insert(idx, ob); }
//------------------------------------------------------- public void loadList(string path) { if (File.Exists(path) == false) { return; } string[] lines = File.ReadAllLines(path, Encoding.GetEncoding("utf-8")); if (lines.Length < 2) { return; } aerenderOpt ao = new aerenderOpt(""); string head = ao.header; if (lines[0] != head) { return; } this.SuspendLayout(); Clear(); for (int i = 1; i < lines.Length; i++) { string line = lines[i].Trim(); if (line == string.Empty) { continue; } if (line[0] == '#') { continue; } aerenderOpt o = new aerenderOpt(""); if (o.fromLine(line) == true) { _list.Add(o); this.Items.Add(o.ProjectInfo); } } this.ResumeLayout(); OnItemChanged(new EventArgs()); }
//------------------------------------------------------- private void swapList(int s, int d) { int ss = s; int dd = d; if ((ss == dd) || (ss < 0) || (ss >= _list.Count) || (dd < 0) || (dd >= _list.Count)) { return; } aerenderOpt o = new aerenderOpt(""); o.Copy(_list[s]); _list[s].Copy(_list[d]); _list[d].Copy(o); object ob = this.Items[s]; this.Items[s] = this.Items[d]; this.Items[d] = ob; }
//------------------------------------------------------- private void listDown() { selectionArea sel = getSelection(); int sLength = sel.length; if ((sel.start < 0) || (sLength <= 0) || (sel.end >= _list.Count - 1)) { return; } if (sLength == 1) { swapList(sel.start, sel.start + 1); sel.shift(1); this.SuspendLayout(); this.ClearSelected(); this.SetSelected(sel.start, true); this.ResumeLayout(); } else { aerenderOpt ao = new aerenderOpt(""); ao.Copy(_list[sel.end + 1]); object ob = this.Items[sel.end + 1]; this.SuspendLayout(); this.ClearSelected(); for (int i = sel.end; i >= sel.start; i--) { _list[i + 1].Copy(_list[i]); this.Items[i + 1] = this.Items[i]; } _list[sel.start].Copy(ao); this.Items[sel.start] = ob; sel.shift(1); for (int i = sel.start; i <= sel.end; i++) { this.SetSelected(i, true); } this.ResumeLayout(); } }
//---------------------------------------------------------------- public void Copy(aerenderOpt op, bool filenameNotCopy) { if (filenameNotCopy == false) { _filename = op._filename; } renderTarget = op.renderTarget; comp = op.comp; rqindex = op.rqindex; outputON = op.outputON; output = op.output; OMtemplateON = op.OMtemplateON; OMtemplateName = op.OMtemplateName; RStemplateON = op.RStemplateON; RStemplateName = op.RStemplateName; reuse = op.reuse; mem_usageON = op.mem_usageON; image_cache_percent = op.image_cache_percent; max_mem_percent = op.max_mem_percent; start_frameON = op.start_frameON; start_frame = op.start_frame; end_frameON = op.end_frameON; end_frame = op.end_frame; incrementON = op.incrementON; increment = op.increment; logON = op.logON; log = op.log; sound_flag = op.sound_flag; verboseOn = op.verboseOn; verbose_flag = op.verbose_flag; closeOn = op.closeOn; close = op.close; mpOn = op.mpOn; mp_enable_flag = op.mp_enable_flag; continueOnMissingFootage = op.continueOnMissingFootage; }
//---------------------------------------------------------------- public void Copy(aerenderOpt op) { Copy(op, false); }