Changeset 8671


Ignore:
Timestamp:
Feb 22, 2020, 11:56:36 PM (2 years ago)
Author:
Sven Rech
Message:

Primes tutorial: "Numberline" page: Hidden info group boxes were not properly filled with data when they were not opened before selecting a number from number line. This is fixed now.

Location:
trunk/CrypPlugins/Primes/Primes/WpfControls/PrimesDistribution/Numberline
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/Primes/Primes/WpfControls/PrimesDistribution/Numberline/NumberlineControl.xaml

    r8666 r8671  
    517517                                        <TextBlock Name="lblCalcEulerPhiInfo" Margin="0,0,0,0" Visibility="Hidden" TextWrapping="Wrap" MouseLeftButtonDown="lblCalcInfo_MouseLeftButtonDown" Cursor="Hand" Foreground="Blue"></TextBlock>
    518518                                    </DockPanel>
    519                                     <GroupBox Header="{x:Static lang:Distribution.numberline_progress}" Visibility="Collapsed" Name="gbEulerPhi">
     519                                    <GroupBox Header="{x:Static lang:Distribution.numberline_progress}" Visibility="Visible" Name="gbEulerPhi">
    520520                                        <Grid>
    521521                                            <Grid.RowDefinitions>
     
    533533                                        <TextBlock Name="lblCalcTauInfo" Margin="0,0,0,0" TextWrapping="Wrap" MouseLeftButtonDown="lblCalcInfo_MouseLeftButtonDown" Cursor="Hand" Foreground="Blue"></TextBlock>
    534534                                    </DockPanel>
    535                                     <GroupBox Header="{x:Static lang:Distribution.numberline_progress}" Visibility="Collapsed" Name="gbTau">
     535                                    <GroupBox Header="{x:Static lang:Distribution.numberline_progress}" Visibility="Visible" Name="gbTau">
    536536                                        <Grid>
    537537                                            <Grid.RowDefinitions>
     
    549549                                        <TextBlock Name="lblCalcRhoInfo" Margin="0,0,0,0" TextWrapping="Wrap" MouseLeftButtonDown="lblCalcInfo_MouseLeftButtonDown" Cursor="Hand" Foreground="Blue"></TextBlock>
    550550                                    </DockPanel>
    551                                     <GroupBox Header="{x:Static lang:Distribution.numberline_progress}" Visibility="Collapsed" Name="gbRho">
     551                                    <GroupBox Header="{x:Static lang:Distribution.numberline_progress}" Visibility="Visible" Name="gbRho">
    552552                                        <Grid>
    553553                                            <Grid.RowDefinitions>
     
    565565                                        <TextBlock Name="lblCalcDividerSum" Margin="0,0,0,0" TextWrapping="Wrap" MouseLeftButtonDown="lblCalcInfo_MouseLeftButtonDown" Cursor="Hand" Foreground="Blue"></TextBlock>
    566566                                    </DockPanel>
    567                                     <GroupBox Header="{x:Static lang:Distribution.numberline_progress}" Visibility="Collapsed" Name="gbDivSum">
     567                                    <GroupBox Header="{x:Static lang:Distribution.numberline_progress}" Visibility="Visible" Name="gbDivSum">
    568568                                        <Grid>
    569569                                            <Grid.RowDefinitions>
  • trunk/CrypPlugins/Primes/Primes/WpfControls/PrimesDistribution/Numberline/NumberlineControl.xaml.cs

    r8660 r8671  
    6767        private bool m_Initialized;
    6868        private bool goldbachIsOpen = true;
     69        private bool infoGroupBoxInitialized = false;
    6970
    7071        public NumberlineControl()
     
    459460            m_ActualNumber = value;
    460461            HideInfoPanels();
     462            if (!infoGroupBoxInitialized)
     463            {
     464                HideInfoGroupBoxes();
     465                infoGroupBoxInitialized = true;
     466            }
    461467            SetPointerActualNumber(value);
    462468            SetInfoActualNumber(value);
     
    10401046        #endregion
    10411047
     1048        private void HideInfoGroupBoxes()
     1049        {
     1050            gbEulerPhi.Visibility = Visibility.Collapsed;
     1051            gbTau.Visibility = Visibility.Collapsed;
     1052            gbRho.Visibility = Visibility.Collapsed;
     1053            gbDivSum.Visibility = Visibility.Collapsed;
     1054            gbGoldbach.Visibility = Visibility.Collapsed;
     1055        }
     1056
    10421057        private void lblCalcInfo_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
    10431058        {
Note: See TracChangeset for help on using the changeset viewer.