/// <summary> /// This method will be called when HomePage is loaded /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Page_Loaded(object sender, RoutedEventArgs e) { //Create blank opacity mask blankOpacityMask = new LinearGradientBrush(); blankOpacityMask.GradientStops.Add(new GradientStop(Colors.Transparent, 0)); blankOpacityMask.GradientStops.Add(new GradientStop(Colors.Transparent, 1)); ImageTeam14Over.OpacityMask = blankOpacityMask; //Create SyncEngine object synchronizer = new SyncEngine(); // Initialize folder path array originalFolderPaths = new string[10]; for (int i = 0; i < 10; i++) { originalFolderPaths[i] = ""; } //trackBack = new TrackBackEngine(); // Create event handlers for backgroundWorkerForSync synchronizer.backgroundWorkerForSync.RunWorkerCompleted += new RunWorkerCompletedEventHandler(backgroundWorkerForSync_RunWorkerCompleted); synchronizer.backgroundWorkerForSync.ProgressChanged += new ProgressChangedEventHandler(backgroundWorkerForSync_ProgressChanged); synchronizer.backgroundWorkerForPreSync.RunWorkerCompleted += new RunWorkerCompletedEventHandler(backgroundWorkerForPreSync_RunWorkerCompleted); //Load the previous folder paths from settings.xml LoadFolderPaths(); //Add event handler to check when main window is moved, move helper window too mainWindow.LocationChanged += new EventHandler(mainWindow_LocationChanged); }
/// <summary> /// This method will be called when HomePage is loaded /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Page_Loaded(object sender, RoutedEventArgs e) { //Create blank opacity mask blankOpacityMask = new LinearGradientBrush(); blankOpacityMask.GradientStops.Add(new GradientStop(Colors.Transparent, 0)); blankOpacityMask.GradientStops.Add(new GradientStop(Colors.Transparent, 1)); ImageTeam14Over.OpacityMask = blankOpacityMask; //Create SyncEngine object synchronizer = new SyncEngine(); trackback = new TrackBackEngine(); // Initialize folder path array originalFolderPaths = new string[10]; for (int i = 0; i < 10; i++) { originalFolderPaths[i] = ""; } // Create respective event handlers synchronizer.backgroundWorkerForSync.RunWorkerCompleted += new RunWorkerCompletedEventHandler(backgroundWorkerForSync_RunWorkerCompleted); synchronizer.backgroundWorkerForSync.ProgressChanged += new ProgressChangedEventHandler(backgroundWorkerForSync_ProgressChanged); synchronizer.backgroundWorkerForPreSync.RunWorkerCompleted += new RunWorkerCompletedEventHandler(backgroundWorkerForPreSync_RunWorkerCompleted); trackback.backgroundWorkerForTrackBackBackup.RunWorkerCompleted += new RunWorkerCompletedEventHandler(backgroundWorkerForTrackBackBackup_RunWorkerCompleted); //Load the previous folder paths from settings.xml LoadFolderPaths(); //Add event handler to check when main window is moved, move helper window too mainWindow.LocationChanged += new EventHandler(mainWindow_LocationChanged); debugLogger.LogMessage(actualLeftPath, actualRightPath, "HomePage.Page_Loaded()", "Homepage loaded in"); }