private void NetworkPresenter_SizeChanged(object sender, EventArgs e) { CtlNetworkPresenter.Height = Math.Max(CtlNetworkPresenter.Height, 400); if (NetworksManager != null) { var ticks = DateTime.UtcNow.Ticks; CtlNetworkPresenter.ResizeTicks = ticks; CtlNetworkPresenter.Dispatch(() => { if (CtlNetworkPresenter.ResizeTicks != ticks) { return; } if (IsRunning) { CtlNetworkPresenter.RenderRunning(NetworksManager.SelectedNetworkModel, CtlOnlyWeights.IsOn, CtlOnlyChangedWeights.IsOn, CtlHighlightChangedWeights.IsOn); } else { CtlNetworkPresenter.RenderStanding(NetworksManager.SelectedNetworkModel); } }, DispatcherPriority.Background); } }
private void ApplyChangesToStandingNetworks() { lock (ApplyChangesLocker) { CtlInputDataPresenter.RearrangeWithNewPointsCount(); NetworksManager.RefreshNetworksDataModels(); CtlNetworkPresenter.RenderStanding(NetworksManager.SelectedNetworkModel); ToggleApplyChanges(Const.Toggle.Off); CtlMenuStart.Enabled = true; } }
private void NetworkPresenter_SizeChanged(object sender, EventArgs e) { CtlNetworkPresenter.Height = Math.Max(CtlNetworkPresenter.Height, 400); if (NetworksManager != null) { CtlNetworkPresenter.Dispatch(() => { if (IsRunning) { CtlNetworkPresenter.RenderRunning(NetworksManager.SelectedNetworkModel); } else { CtlNetworkPresenter.RenderStanding(NetworksManager.SelectedNetworkModel); } }); } }
private void CtlTabs_SelectedIndexChanged(object sender, EventArgs e) { // newly selected network must not affect NetworksManager until it saved if (NetworksManager != null) { if (IsRunning) { lock (ApplyChangesLocker) { CtlInputDataPresenter.SetInputDataAndDraw(NetworksManager.Models.First()); CtlNetworkPresenter.RenderRunning(NetworksManager.SelectedNetworkModel); CtlPlotPresenter.Draw(NetworksManager.Models, NetworksManager.SelectedNetworkModel); CtlStatisticsPresenter.Draw(null); } } else { CtlNetworkPresenter.RenderStanding(NetworksManager.SelectedNetworkModel); } } }
private void CtlTabs_SelectionChanged(object sender, SelectionChangedEventArgs e) { // newly selected network must not affect NetworksManager until it saved if (NetworksManager != null) { if (IsRunning) { lock (ApplyChangesLocker) { CtlInputDataPresenter.SetInputDataAndDraw(NetworksManager.Models[0]); CtlNetworkPresenter.RenderRunning(NetworksManager.SelectedNetworkModel, CtlOnlyWeights.IsOn, CtlOnlyChangedWeights.IsOn, CtlHighlightChangedWeights.IsOn); CtlPlotPresenter.Draw(NetworksManager.Models, NetworksManager.SelectedNetworkModel); CtlStatisticsPresenter.Draw(NetworksManager.SelectedNetworkModel.LastStatistics); } } else { CtlNetworkPresenter.RenderStanding(NetworksManager.SelectedNetworkModel); } } }
public void TaskParameterChanged() { NetworksManager.RebuildNetworksForTask(CtlInputDataPresenter.Task); NetworksManager.ResetLayersTabsNames(); CtlNetworkPresenter.RenderStanding(NetworksManager.SelectedNetworkModel); }