void NavigationLog_NavigationLogChanged(object sender, NavigationLogEventArgs args) { // This event is BeginInvoked to decouple the ExplorerBrowser UI from this UI BeginInvoke(new MethodInvoker(delegate() { // calculate button states if (args.CanNavigateBackwardChanged) { this.backButton.Enabled = explorerBrowser.NavigationLog.CanNavigateBackward; } if (args.CanNavigateForwardChanged) { this.forwardButton.Enabled = explorerBrowser.NavigationLog.CanNavigateForward; } // update history combo box if (args.LocationsChanged) { this.navigationHistoryCombo.Items.Clear(); foreach (ShellObject shobj in this.explorerBrowser.NavigationLog.Locations) { this.navigationHistoryCombo.Items.Add(shobj.Name); } } if (this.explorerBrowser.NavigationLog.CurrentLocationIndex == -1) { this.navigationHistoryCombo.Text = ""; } else { this.navigationHistoryCombo.SelectedIndex = this.explorerBrowser.NavigationLog.CurrentLocationIndex; } })); }
//public event EventHandler MouseDoubleClick; // Invoke the Changed event; called whenever list changes: protected virtual void OnClick(NavigationLogEventArgs e) { if (Click != null) { Click(this, e); } }
/// <summary> /// Synchronize NavigationLog collection to dependency collection /// </summary> /// <param name="sender"></param> /// <param name="args"></param> void NavigationLogChanged(object sender, NavigationLogEventArgs args) { navigationLog.Clear( ); foreach (ShellObject obj in ExplorerBrowserControl.NavigationLog.Locations) { navigationLog.Add(obj); } }
void NavigationLog_NavigationLogChanged(object sender, NavigationLogEventArgs args) { //This event is BeginInvoked to decouple the ExplorerBrowser UI from this UI BeginInvoke(new MethodInvoker(delegate() { // calculate button states if (args.CanNavigateBackwardChanged) { tsbBack.Enabled = explorerBrowser.NavigationLog.CanNavigateBackward; } if (args.CanNavigateForwardChanged) { tsbForward.Enabled = explorerBrowser.NavigationLog.CanNavigateForward; } })); }
public void NavigationLog_NavigationLogChanged(object sender, NavigationLogEventArgs args) { BeginInvoke(new MethodInvoker(delegate() { if (args.CanNavigateBackwardChanged) { this.btn_back.Enabled = explorerBrowser.NavigationLog.CanNavigateBackward; } if (args.CanNavigateForwardChanged) { this.btn_forward.Enabled = explorerBrowser.NavigationLog.CanNavigateForward; } if (args.LocationsChanged) { foreach (ShellObject shobj in this.explorerBrowser.NavigationLog.Locations) { if (shobj.ParsingName.Contains(@"\")) { txt_location.Text = shobj.ParsingName; } else { txt_location.Text = shobj.Name; } } } if (this.explorerBrowser.NavigationLog.CurrentLocationIndex == -1) { txt_location.Text = ""; } else { if (explorerBrowser.NavigationLog.CurrentLocation.ParsingName.Contains(@"\")) { txt_location.Text = explorerBrowser.NavigationLog.CurrentLocation.ParsingName; } else { txt_location.Text = explorerBrowser.NavigationLog.CurrentLocation.Name; } } })); }
void NavigationLog_NavigationLogChanged(object sender, NavigationLogEventArgs args) { // calculate button states if (args.CanNavigateBackwardChanged) { this.explorerNavigationButtons1.HasLeftHistroy = this.explorerBrowser.NavigationLog.CanNavigateBackward; } if (args.CanNavigateForwardChanged) { this.explorerNavigationButtons1.HasRightHistroy = this.explorerBrowser.NavigationLog.CanNavigateForward; } // This event is BeginInvoked to decouple the explorerBrowser UI from this UI this.BeginInvoke(new MethodInvoker(delegate() { // update history combo box if (args.LocationsChanged) { this.contextMenu.Items.Clear(); foreach (ShellObject shobj in this.explorerBrowser.NavigationLog.Locations) { logInfo("Navigation: " + shobj.Name); this.contextMenu.Items.Add(shobj.Name); } } for (int i = 0; i < this.contextMenu.Items.Count; i++) { this.contextMenu.Items[i].Image = null; } if (this.explorerBrowser.NavigationLog.CurrentLocationIndex != -1) { this.contextMenu.Items[this.explorerBrowser.NavigationLog.CurrentLocationIndex].Image = Resources._checked; } })); }
protected virtual void OnClick(NavigationLogEventArgs e) => Click?.Invoke(this, e);
/// <summary> /// Synchronize NavigationLog collection to dependency collection /// </summary> /// <param name="sender"></param> /// <param name="args"></param> void NavigationLogChanged(object sender, NavigationLogEventArgs args) { navigationLog.Clear(); foreach (ShellObject obj in ExplorerBrowserControl.NavigationLog.Locations) { navigationLog.Add(obj); } }
//public event EventHandler MouseDoubleClick; // Invoke the Changed event; called whenever list changes: protected virtual void OnClick(NavigationLogEventArgs e) { if (Click != null) Click(this, e); }
void gli_Click(object sender, NavigationLogEventArgs e) { tcMain.ReOpenTab(e.NavigationLog); btnUndoClose.IsEnabled = tcMain.ReopenableTabs.Any(); }
protected virtual void OnClick(NavigationLogEventArgs e) => Click?.Invoke(this, e);