Пример #1
0
        /// <summary>
        /// Добавя нова цел за синхронизиране
        /// </summary>
        /// <param name="source"></param>
        /// <param name="destination"></param>
        /// <returns></returns>
        public ConfigTarget AddTarget(string source, string destination)
        {
            ConfigTarget ct = new ConfigTarget();
            ct.Source = source;
            ct.Destination = destination;

            this.Targets.Add(ct);
            return ct;
        }
Пример #2
0
        /// <summary>
        /// Добавя нова цел за синхронизиране
        /// </summary>
        /// <param name="source"></param>
        /// <param name="destination"></param>
        /// <returns></returns>
        public ConfigTarget AddTarget(string source, string destination)
        {
            ConfigTarget ct = new ConfigTarget();

            ct.Source      = source;
            ct.Destination = destination;

            this.Targets.Add(ct);
            return(ct);
        }
Пример #3
0
        /// <summary>
        /// Създава списък за синхронизиране
        /// </summary>
        /// <param name="target"></param>
        /// <returns></returns>
        public FSynchList GetSynchList(ConfigTarget target)
        {
            if (target.Source.Equals(""))
            { throw new Exception("Въведи директория източник!"); }
            if (!Directory.Exists(target.Source))
            { throw new Exception("Не съществува директорията на източника!"); }
            if (target.Destination.Equals(""))
            { throw new Exception("Въведи директория цел!"); }

            FSynchList synchList = new FSynchList(target.Source, target.Destination);
            GetSynchList(synchList, target.Source, target.Destination, target.IgnoreList);
            return synchList;
        }
Пример #4
0
        /// <summary>
        /// Създава списък за синхронизиране
        /// </summary>
        /// <param name="target"></param>
        /// <returns></returns>
        public FSynchList GetSynchList(ConfigTarget target)
        {
            if (target.Source.Equals(""))
            {
                throw new Exception("Въведи директория източник!");
            }
            if (!Directory.Exists(target.Source))
            {
                throw new Exception("Не съществува директорията на източника!");
            }
            if (target.Destination.Equals(""))
            {
                throw new Exception("Въведи директория цел!");
            }

            FSynchList synchList = new FSynchList(target.Source, target.Destination);

            GetSynchList(synchList, target.Source, target.Destination, target.IgnoreList);
            return(synchList);
        }
Пример #5
0
 /// <summary>
 /// Добавя нова цел за синхронизиране
 /// </summary>
 /// <param name="configTarget"></param>
 public void AddTarget(ConfigTarget configTarget)
 {
     this.Targets.Add(configTarget);
 }
Пример #6
0
 /// <summary>
 /// Добавя нова цел за синхронизиране
 /// </summary>
 /// <param name="configTarget"></param>
 public void AddTarget(ConfigTarget configTarget)
 {
     this.Targets.Add(configTarget);
 }
Пример #7
0
 private void EditTarget(ConfigTarget aTarget)
 {
     using (FTarget_NewEdit fTrgt = new FTarget_NewEdit())
     {
         fTrgt.CTarget = aTarget;
         if (fTrgt.ShowForm())
         {
             SaveConfig();
             LoadTableTargets();
         }
     }
 }