コード例 #1
0
        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);
            }
        }
コード例 #2
0
 private void ApplyChangesToStandingNetworks()
 {
     lock (ApplyChangesLocker)
     {
         CtlInputDataPresenter.RearrangeWithNewPointsCount();
         NetworksManager.RefreshNetworksDataModels();
         CtlNetworkPresenter.RenderStanding(NetworksManager.SelectedNetworkModel);
         ToggleApplyChanges(Const.Toggle.Off);
         CtlMenuStart.Enabled = true;
     }
 }
コード例 #3
0
        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);
                    }
                });
            }
        }
コード例 #4
0
        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);
                }
            }
        }
コード例 #5
0
        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);
                }
            }
        }
コード例 #6
0
 public void TaskParameterChanged()
 {
     NetworksManager.RebuildNetworksForTask(CtlInputDataPresenter.Task);
     NetworksManager.ResetLayersTabsNames();
     CtlNetworkPresenter.RenderStanding(NetworksManager.SelectedNetworkModel);
 }