/// <summary> /// Process the trim equipment /// </summary> /// <param name="result">The trim list result</param> /// <param name="dataReader">The datareader</param> private void ProcessTrimEquipment(TrimList result, SqlDataReader dataReader) { ITrim currentTrim = null; while (dataReader.Read()) { string thisTrimName = DataUtil.GetString(dataReader, "TrimName", String.Empty).Trim(); if (currentTrim == null || currentTrim.Name != thisTrimName) { int trimIndex = result.IndexOf(thisTrimName); if (trimIndex >= 0) { currentTrim = result[trimIndex]; if (currentTrim.Equipment == null) { currentTrim.Equipment = new EquipmentList(); } } else { continue; } } EquipmentItem ei = new EquipmentItem(); ei.Name = DataUtil.GetString(dataReader, "Generic").Replace("`", "'"); ei.OnAll = DataUtil.GetBoolean(dataReader, "OnAllDers"); currentTrim.Equipment.Add(ei); } }
private void OnDone(ITrim item) { if (item != null) { Result = item; Close(); } }
// コンストラクタ public TrimViewModel(ITrim trim, string videoPath, IWfSourceList sourceList, WfTrimmingPlayer owner) { mOwner = new WeakReference <WfTrimmingPlayer>(owner); InitializeProperties(); VideoPath = videoPath; SourceList = sourceList; if (null != trim) { OriginalTrim = trim; SetTrimSettingsWith(trim); } }
void SetTrimSettingsWith(ITrim trim) { if (!IsValidTrim(trim)) { if (IsValidTrim(OriginalTrim)) { SetTrimSettingsWith(OriginalTrim); } else { TrimmingName.Value = ""; Prologue.Value = 0; PrologueEnabled.Value = false; Epilogue.Value = 0; EpilogueEnabled.Value = false; } } else { TrimmingName.Value = trim.Name; if (trim.Prologue > 0) { Prologue.Value = trim.Prologue; PrologueEnabled.Value = true; } else { Prologue.Value = 0; PrologueEnabled.Value = false; } if (trim.Epilogue > 0) { Epilogue.Value = trim.Epilogue; EpilogueEnabled.Value = true; } else { Epilogue.Value = 0; EpilogueEnabled.Value = false; } } UpdateButtonStatus(); }
/// <summary> /// Process the trims /// </summary> /// <param name="result">The trim result</param> /// <param name="dataReader">The datareader</param> private void ProcessTrims(TrimList result, SqlDataReader dataReader) { ITrim currentTrim = null; while (dataReader.Read()) { string trimName = DataUtil.GetString(dataReader, "TrimName", String.Empty).Trim(); string basedOnTrimName = DataUtil.GetString(dataReader, "BasedOnTrimName", null); currentTrim = new Trim(); currentTrim.Name = trimName; if (basedOnTrimName != null && basedOnTrimName != trimName) { currentTrim.BasedOn = basedOnTrimName.Trim(); } result.Add(currentTrim); } }
public ITrim Register(ITrim trim, long id = 0) { return(Register(id, trim.Name, trim.Prologue, trim.Epilogue, trim.RefPath)); }
public static String TRIM(ITrim trim) { throw new NotSupportedException(); }