//Starts Async Thread public void OnValueChanged <T>(GameObject g, T PreviousData, T NewData, object variableObject) where T : struct { Threads++; removeLostActions = true; if (intialData == null) { intialData = PreviousData; } ValueChanged <T> deleg = new ValueChanged <T>(AddValueChangeAction <T>); deleg.BeginInvoke(g, PreviousData, NewData, variableObject, Threads, new AsyncCallback(onResponse <T>), null); }
void OnValuesChanged() { if (!Initialized) { return; } Param.Source = textBoxSource.Text; Param.Destination = textBoxDestination.Text; textBoxDestination.Enabled = true; buttonSelectDestination.Enabled = true; if (radioButtonCopy.Checked) { Param.SyncType = c_SyncProcess.e_SyncType.CopyOnly; } else if (radioButtonSync.Checked) { Param.SyncType = c_SyncProcess.e_SyncType.SyncSourceToDest; } else if (radioButtonJoin.Checked) { Param.SyncType = c_SyncProcess.e_SyncType.SyncJoinSourceAndDest; } else if (radioButtonDeleteFileDuplicates.Checked) { Param.SyncType = c_SyncProcess.e_SyncType.DeleteFileDuplicatesInSource; textBoxDestination.Enabled = false; buttonSelectDestination.Enabled = false; } else if (radioButtonDeleteDublicatesFromSourceToDestination.Checked) { Param.SyncType = c_SyncProcess.e_SyncType.DeleteDublicatesFromSourceInDestination; } Param.IgnoredFolders = new string[listBoxIgnoredFolders.Items.Count]; for (int i = 0; i < listBoxIgnoredFolders.Items.Count; i++) { Param.IgnoredFolders[i] = listBoxIgnoredFolders.Items[i].ToString(); } Param.DeleteIgnoredFolders = checkBoxDeleteIgnore.Checked; Param.SourceArchive = (cc_AppConf.e_Archive_Type)comboBoxSourceArchiv.SelectedIndex; Param.DestinationArchive = (cc_AppConf.e_Archive_Type)comboBoxDestinationArchiv.SelectedIndex; if (ValueChanged == null) { return; } ValueChanged.BeginInvoke(this, EventArgs.Empty, null, null); }