Changeset 2736


Ignore:
Timestamp:
Feb 18, 2011, 8:32:14 PM (11 years ago)
Author:
sauer
Message:

AutoUpdate: CrypUpdater progress bar is indeterminate now

Location:
trunk/CrypUpdater
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypUpdater/App.xaml.cs

    r2735 r2736  
    232232                using (ZipFile zip = ZipFile.Read(ZipFilePath))
    233233                {
    234 
    235                     int count = zip.Entries.Count;
    236                     int i = 0;
    237                     int progress = 0;
    238 
    239234                    m.Show();
    240235
     
    242237                    {
    243238                        e.Extract(CryptoolFolderPath, ExtractExistingFileAction.OverwriteSilently);
    244                         i++;
    245                         progress = i * 100 / count;
    246                         m.UpdateProgress(progress);
    247239                    }
    248 
    249240                }
    250241
  • trunk/CrypUpdater/MainWindow.xaml

    r2055 r2736  
    66        <StackPanel Name="stackPanel1" Height="75" VerticalAlignment="Top">
    77            <TextBlock Height="16" Name="textBlock1" Text="Updating, CrypTool 2.0 will restart soon..." Width="384" Margin="8" />
    8             <ProgressBar Height="27" Name="progressBar1" Width="386" HorizontalContentAlignment="Center" Margin="8" />
     8            <ProgressBar Height="27" Name="progressBar1" Width="386" HorizontalContentAlignment="Center" Margin="8" IsIndeterminate="True" />
    99        </StackPanel>
    1010    </Grid>
  • trunk/CrypUpdater/MainWindow.xaml.cs

    r2204 r2736  
    2828        }
    2929
    30         internal void UpdateProgress(double progress)
    31         {
    32             Dispatcher.Invoke(DispatcherPriority.Normal, (SendOrPostCallback)delegate
    33             {
    34                 progressBar1.Value = progress;
    35             }, progress);
    36         }
    37 
    3830        private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
    3931        {
Note: See TracChangeset for help on using the changeset viewer.