public void Init(HgRepository repository) { Guard.AgainstNull(repository, "repository"); SetupSharedFolderAndInternetUI(); _model = new SyncStartModel(repository); _repository = repository; SetButtonStatesFromSettings(); // Setup Internet State Checking thread and the worker that it will run _internetStateWorker = new ConnectivityStateWorker(CheckInternetStatusAndUpdateUI); _updateInternetSituation = new Thread(_internetStateWorker.DoWork); // Setup Shared Network Folder Checking thread and its worker _networkStateWorker = new ConnectivityStateWorker(CheckNetworkStatusAndUpdateUI); _updateNetworkSituation = new Thread(_networkStateWorker.DoWork); // let the dialog display itself first, then check for connection _updateDisplayTimer.Interval = INITIALINTERVAL; // But check sooner than 2 seconds anyway! _updateDisplayTimer.Enabled = true; _settingsButton.LaunchSettingsCallback = DisplaySRSettingsDlg; if (!Properties.Settings.Default.ShowChorusHubInSendReceive) { _useLocalNetworkButton.Image = Resources.networkFolder29x32; _useLocalNetworkButton.Text = "Shared Network Folder"; } }
private void RecheckNetworkStatus() { _networkWorkerStarted = false; // Setup Shared Network Folder Checking thread and its worker _networkStateWorker = new ConnectivityStateWorker(CheckNetworkStatusAndUpdateUI); _updateNetworkSituation = new Thread(_networkStateWorker.DoWork); }
private void RecheckInternetStatus() { _internetWorkerStarted = false; // Setup Internet State Checking thread and the worker that it will run _internetStateWorker = new ConnectivityStateWorker(CheckInternetStatusAndUpdateUI); _updateInternetSituation = new Thread(_internetStateWorker.DoWork); }
public void Init(HgRepository repository) { Guard.AgainstNull(repository, "repository"); SetupSharedFolderAndInternetUI(); _model = new SyncStartModel(repository); _repository = repository; SetButtonStatesFromSettings(); // Setup Internet State Checking thread and the worker that it will run _internetStateWorker = new ConnectivityStateWorker(CheckInternetStatusAndUpdateUI); _updateInternetSituation = new Thread(_internetStateWorker.DoWork); // Setup Shared Network Folder Checking thread and its worker _networkStateWorker = new ConnectivityStateWorker(CheckNetworkStatusAndUpdateUI); _updateNetworkSituation = new Thread(_networkStateWorker.DoWork); // let the dialog display itself first, then check for connection _updateDisplayTimer.Interval = INITIALINTERVAL; // But check sooner than 2 seconds anyway! _updateDisplayTimer.Enabled = true; _settingsButton.LaunchSettingsCallback = DisplaySRSettingsDlg; if(!Properties.Settings.Default.ShowChorusHubInSendReceive) { _useLocalNetworkButton.Image = Resources.networkFolder29x32; _useLocalNetworkButton.Text = "Shared Network Folder"; } }