コード例 #1
0
        /// <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);
            }
        }
コード例 #2
0
 private void OnDone(ITrim item)
 {
     if (item != null)
     {
         Result = item;
         Close();
     }
 }
コード例 #3
0
            // コンストラクタ
            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);
                }
            }
コード例 #4
0
 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();
 }
コード例 #5
0
        /// <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);
            }
        }
コード例 #6
0
 public ITrim Register(ITrim trim, long id = 0)
 {
     return(Register(id, trim.Name, trim.Prologue, trim.Epilogue, trim.RefPath));
 }
コード例 #7
0
 public static String TRIM(ITrim trim)
 {
     throw new NotSupportedException();
 }