Ejemplo n.º 1
0
        private void SyncToRightOverride()
        {
            SyncActions syncActions = new SyncActions(LeftFiles, RightFiles);

            syncActions.SyncToRightOverride();
            EventLogViewModel.AddNewRegistry("Synchronization completed",
                                             DateTime.Now, this.GetType().Name, "HIGH");
            RefreshDataGrid();
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Registers an action to be performed the next time a syncpoint is incremented.
 /// This will also ensure a host sync object is created, and <see cref="SyncNumber"/> is incremented.
 /// </summary>
 /// <param name="action">The action to be performed on sync object creation</param>
 /// <param name="syncpointOnly">True if the sync action should only run when syncpoints are incremented</param>
 public void RegisterSyncAction(Action action, bool syncpointOnly = false)
 {
     if (syncpointOnly)
     {
         SyncpointActions.Add(action);
     }
     else
     {
         SyncActions.Add(action);
     }
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Creates a host sync object if there are any pending sync actions. The actions will then be called.
        /// If no actions are present, a host sync object is not created.
        /// </summary>
        public void CreateHostSyncIfNeeded()
        {
            if (SyncActions.Count > 0)
            {
                Renderer.CreateSync(SyncNumber);

                SyncNumber++;

                foreach (Action action in SyncActions)
                {
                    action();
                }

                SyncActions.Clear();
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Creates a host sync object if there are any pending sync actions. The actions will then be called.
        /// If no actions are present, a host sync object is not created.
        /// </summary>
        /// <param name="syncpoint">True if host sync is being created by a syncpoint</param>
        public void CreateHostSyncIfNeeded(bool syncpoint)
        {
            if (SyncActions.Count > 0 || (syncpoint && SyncpointActions.Count > 0))
            {
                Renderer.CreateSync(SyncNumber);

                SyncNumber++;

                foreach (Action action in SyncActions)
                {
                    action();
                }

                foreach (Action action in SyncpointActions)
                {
                    action();
                }

                SyncActions.Clear();
                SyncpointActions.Clear();
            }
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Registers an action to be performed the next time a syncpoint is incremented.
 /// This will also ensure a host sync object is created, and <see cref="SyncNumber"/> is incremented.
 /// </summary>
 /// <param name="action">The action to be performed on sync object creation</param>
 public void RegisterSyncAction(Action action)
 {
     SyncActions.Add(action);
 }
Ejemplo n.º 6
0
 public UserData(SyncActions dataFrom, string data)
 {
     DataFrom = dataFrom;
     Data     = data;
 }
Ejemplo n.º 7
0
 public UserData(SyncActions dataFrom, string data)
 {
     DataFrom = dataFrom;
     Data = data;
 }