Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Roland v.’t Kruys
|
Apr 15, 2014 - 10:37 AM
|
Hi,
Can you help me out with the following? I want to use the ProgressBar with the .step and .performstep() properties. But your progressbar component doesn’t have these. How can I enable or modify the progressbar to make it work, with the source code below?
Private Sub CopyWithProgress(ByVal ParamArray filenames As String()) ’ Display the ProgressBar control. pBar1.Visible = True ’ Set Minimum to 1 to represent the first file being copied. pBar1.Minimum = 1 ’ Set Maximum to the total number of files to copy. pBar1.Maximum = filenames.Length ’ Set the initial value of the ProgressBar. pBar1.Value = 1 ’ Set the Step property to a value of 1 to represent each file being copied. pBar1.Step = 1
’ Loop through all files to copy. Dim x As Integer for x = 1 To filenames.Length - 1 ’ Copy the file and increment the ProgressBar if successful. If CopyFile(filenames(x - 1)) = True Then ’ Perform the increment on the ProgressBar. pBar1.PerformStep() End If Next x End Sub
With kind regards, Roland
|
|
Roland v.’t Kruys
|
Sep 8, 2015 - 7:09 AM
|
Hi,
I know it has been a while, but I was .... no, hoping if you have the update ready for the: Elegant Ribbon (.NET)? I will assume to will be the 4.4 version.
With kind regards, Roland
|
|
Roland v.’t Kruys
|
May 11, 2017 - 2:40 AM
|
ok, long absence :) due to moving to another country and employer. And now I am starting to develop again and I thought about you guys.
What is the latest on version 4.4 and the ProgressBar issue?
|
|
Roland v.’t Kruys
|
Jun 19, 2015 - 4:14 AM
|
Gentlemen, It has been a long time. And I am very curious on how you are doing with the new update? I am still dealing with that issue regarding the ProgressBar. With kind regards, Roland
|
|
Roland v.’t Kruys
|
Apr 8, 2015 - 3:26 AM
|
Hi, Any news on the update? With kind regards, Roland
|
|
Art Wilkes
|
Feb 6, 2015 - 9:42 AM
|
Hi We are scheduling an update for the Elegant line in Late February or Early March. Your Progress bar update should be in the new update.. Sales at Prof-UIS
|
|
Roland v.’t Kruys
|
Feb 6, 2015 - 4:53 AM
|
Gentlemen, It has been a while and I was wondering when the update becomes available? Any news? With kind regards, Roland
|
|
Roland v.’t Kruys
|
Jul 15, 2014 - 4:53 AM
|
Hi,
Can you please provide me with any feedback or progression on the ProgressBar component?
With kind regards, Roland
|
|
Art Wilkes
|
May 28, 2014 - 8:57 AM
|
We are reviewing you request. I’m sure we will put it in the next release. We are still analyzing the products to see what we need to do. Thanks Prof-UIS Support Team
|
|
Art Wilkes
|
May 9, 2014 - 10:25 AM
|
Please tell him to use pBar1.Value++ to increment current value or pBar1.Value=x to move progress bar position to x (x must be between minim and maxim of progress) instead of pBar.SetBar(x)
|
|
Roland v.’t Kruys
|
May 28, 2014 - 3:51 AM
|
Hi,
Any progress on the matter?
PS: I have purchased the product.
With kind regards, Roland
|
|
Art Wilkes
|
May 9, 2014 - 10:22 AM
|
Please tell him to use pBar1.Value++ to increment current value or pBar1.Value=x to move progress bar position to x (x must be between minim and maxim of progress) instead of pBar.SetBar(x).
|
|
Roland v.’t Kruys
|
May 10, 2014 - 5:27 AM
|
Hi,
Your suggested approach did not solve the issue. Maybe you like to reproduce the issue yourself? Know this, I am extremely satisfied with your product. But I like to see this feature being active in my next version. The old version has a working ProgressBar and Label.
Find below the source code used in the application having the Elegant Ribbon product installed.
Components used: - Button "btnUnpack" > on Ribbon (For starting the unpack process) - Button "btnOpenFILE" > on form (For browsing for the zipped file) - RadioButton "rbPrepFILE" - TextBox "tbST" (For having the serial number) - TextBox "tbFILE" (For displaying the complete path and filename) - Background Worker "bwFILE" - OpenFileDialog "ofdLogFile" - StatusBar (within here using: Label "tsslInfo" & ProgressBar "pbFILE")
I am using Ionic.Zip for unpacking the files. Now bear in mind, the initial unpacking with the Background Worker in my MDI application is working fine. Faster than I ever hoped, compared to my previous SDI application. The only issue is, displaying the current progress using the Label "tsslInfo" & ProgressBar "pbFILE": both components are not showing anything. The pbFILE.Step and pbFILE.PerformStep() is working for the original Microsoft ProgressBar component.
*******************************************
Private Sub btnOpenFILE_Click(sender As Object, e As EventArgs) Handles btnOpenFILE.Click Select Case True Case rbPrepFILE.Checked ofdLogFile.Filter = "FILE files (*.zip)|*.zip" Case rbPrepTTY.Checked ofdLogFile.Filter = "TTY files (*.log)|*.log|TTY files (*.txt)|*.txt" Case rbPrepRAID.Checked ofdLogFile.Filter = "Controller_x (*.log)|*.log|Controller_x (*.txt)|*.txt|TTY files (*.log)|*.log" End Select
ofdLogFile.Title = "Please select a FILE or TTY Log..." ofdLogFile.FileName = ""
If frmOptions.tbFILELocation.TextLength > 0 Then ofdLogFile.InitialDirectory = frmOptions.tbFILELocation.Text Else ofdLogFile.InitialDirectory = "C:\" End If
ofdLogFile.ShowDialog() ApplicationCommands.cmdUnpack.Enabled = True
Select Case True Case ApplicationCommands.cmdPrepare.Enabled ApplicationCommands.cmdPrepare.Enabled = False Case ApplicationCommands.cmdReview.Enabled ApplicationCommands.cmdReview.Enabled = False End Select End Sub Private Sub btnUnpack_Executed(ByVal sender As Object, ByVal e As CommandExecutedEventArgs) Select Case True Case rbPrepFILE.Checked Dim destFolder As String = "C:\DIRECTORY\Logs\" frmMain.tsslPhoneRegion.Text = ""
If tbST.Text = "" Then frmMain.tsslInfo.Text = "Please enter the Serial Number..." Else If tbFILE.Text.Length > 0 Then ApplicationCommands.cmdUnpack.Enabled = True frmMain.pbFILE.Visible = True frmMain.tsslInfo.Text = "Unpacking FILE.ZIP..." Me.bwFILE.RunWorkerAsync() Else ApplicationCommands.cmdUnpack.Enabled = False frmMain.tsslInfo.Text = "FILE.ZIP missing..." End If End If Case rbPrepTTY.Checked ’ this needs to be checked, something is not right here... possibly wrong place Dim TTY As String TTY = ofdLogFile.FileName
frmMain.tsslPhoneRegion.Text = ""
If tbST.Text = "" Then frmMain.tsslInfo.Text = "Please enter the Serial Number..." Else My.Computer.FileSystem.CopyFile(TTY, "C:\DIRECTORY\Logs\" & tbST.Text & "\raid.log", FileIO.UIOption.OnlyErrorDialogs, FileIO.UICancelOption.DoNothing) End If
fileReader = My.Computer.FileSystem.ReadAllText("C:\DIRECTORY\Logs\" & tbST.Text & "\raid.log") End Select
’Entry = Date.Now & " | " & username & " | " & tbST.Text & " | FILE unpacked..." & linea1 ’Caselog_Entry() End Sub
Private Sub bwFILE_DoWork(sender As Object, e As DoWorkEventArgs) Handles bwFILE.DoWork Select Case True Case rbPrepFILE.Checked Dim extractPath As String = "C:\DIRECTORY\" & tbST.Text Dim zipPath As String = tbFILE.Text
Using zip As New ZipFile(zipPath) frmMain.pbFILE.Minimum = 1 frmMain.pbFILE.Maximum = zip.Entries.Count frmMain.pbFILE.Value = 1 >> frmMain.pbFILE.Step = 1 << this is not applicable in the Elegant ProgressBar component
Dim x As ZipEntry
For Each x In zip If (x.UsesEncryption) Then x.Password = "P@ssw0rd" x.Extract(extractPath, ExtractExistingFileAction.OverwriteSilently) Else x.Extract(extractPath, ExtractExistingFileAction.OverwriteSilently) End If >> frmMain.pbFILE.PerformStep() << this is not applicable in the Elegant ProgressBar component
’ {0} = pbFILE.Value ’ {1} = pbFILE.Maximum ’ {2} = (CDbl(pbFILE.Value) / (0.01 * pbFILE.Maximum)) ’ {3} = zipPath ’ {4} = extractPath
If tbFILE.TextLength > 40 Then >> frmMain.tsslInfo.Text = String.Format("Copying FILE.ZIP to {4} - {2:N0}% complete", frmMain.pbFILE.Value, frmMain.pbFILE.Maximum, (CDbl(frmMain.pbFILE.Value) / (0.01 * frmMain.pbFILE.Maximum)), zipPath, extractPath) << Does not show any information Else >> frmMain.tsslInfo.Text = String.Format("Copying {1} items from {3} to {4} - {2:N0}% complete", frmMain.pbFILE.Value, frmMain.pbFILE.Maximum, (CDbl(frmMain.pbFILE.Value) / (0.01 * frmMain.pbFILE.Maximum)), zipPath, extractPath) << Does not show any information End If Next End Using
Entry = Date.Now & " | " & username & " | " & tbST.Text & " | FILE.ZIP unpacked" & linea1 ’Caselog_Entry()
If My.Computer.FileSystem.FileExists(extractPath & ".zip") Then My.Computer.FileSystem.DeleteFile(extractPath & ".zip") My.Computer.FileSystem.CopyFile(zipPath, extractPath & ".zip") Else My.Computer.FileSystem.CopyFile(zipPath, extractPath & ".zip") End If
Entry = Date.Now & " | " & username & " | " & tbST.Text & " | FILE.ZIP copied to " & tbST.Text & ".ZIP" & linea1 ’Caselog_Entry() End Select End Sub
Private Sub bwFILE_ProgressChanged(sender As Object, e As ProgressChangedEventArgs) Handles bwFILE.ProgressChanged frmMain.pbFILE.Value = e.ProgressPercentage End Sub
Private Sub bwFILE_RunWorkerCompleted(sender As Object, e As RunWorkerCompletedEventArgs) Handles bwFILE.RunWorkerCompleted frmMain.tsslInfo.Text = "FILE Report unpacked..."
If My.Computer.FileSystem.FileExists("C:\DIRECTORY\" & tbST.Text & "\report.hta") Then LinkLabel2.Visible = True LinkLabel2.Text = "FILE Report" LinkLabel5.Visible = True LinkLabel5.Text = "DCV - FILE Upload" Else LinkLabel2.Visible = False End If
ApplicationCommands.cmdPrepare.Enabled = True TTY_FileCheck() End Sub
With kind regards, Roland
|
|
Roland v.’t Kruys
|
Apr 16, 2014 - 10:46 AM
|
Thank you for the fast response. But the SetBar(x) is not existing within ELegant Ribbon. At least I can’t find it. But ok, here is the thing.
Scenario: MDI Parent - 2x MDI Childs (for now) Within the MDI Child, a process will be executed for unpacking .zip files. A ProgressBar and Label component on the MDI Parent will be used to update the user with the current process.
MDI Parent - frmMain: one button (located in Ribbon Bar) for starting the process, Label (tsslInfo) and ProgressBar (pbFILE) located in the StatusBar MDI Child - frmLog: source code (as shown below), TextBox component, Button component (for browsing to the file), OpenFileDialog component and BackGroundWorker component
Dim extractPath As String = "C:\REPOSITORY\FILE\" & tbST.Text Dim zipPath As String = tbFILE.Text
Using zip As New ZipFile(zipPath) frmMain.pbFILE.Minimum = 1 frmMain.pbFILE.Maximum = zip.Entries.Count frmMain.pbFILE.Value = 1 ’frmMain.pbFILE.Step = 1 >> research on this to activate it again
Dim x As ZipEntry
For Each x In zip If (x.UsesEncryption) Then x.Password = "secret" x.Extract(extractPath, ExtractExistingFileAction.OverwriteSilently) Else x.Extract(extractPath, ExtractExistingFileAction.OverwriteSilently) End If ’frmMain.pbFILE.PerformStep() >> research on this to activate it again
’ {0} = frmMain.pbFILE.Value ’ {1} = frmMain.pbFILE.Maximum ’ {2} = (CDbl(frmMain.pbFILE.Value) / (0.01 * frmMain.pbFILE.Maximum)) ’ {3} = zipPath ’ {4} = extractPath
If tbFILE.Text.Length > 40 Then frmMain.tsslInfo.Text = String.Format("Copying FILE.ZIP to {4} - {2:N0}% complete", frmMain.pbFILE.Value, frmMain.pbFILE.Maximum, (CDbl(frmMain.pbFILE.Value) / (0.01 * frmMain.pbFILE.Maximum)), zipPath, extractPath) Else frmMain.tsslInfo.Text = String.Format("Copying {1} items from {3} to {4} - {2:N0}% complete", frmMain.pbFILE.Value, frmMain.pbFILE.Maximum, (CDbl(frmMain.pbFILE.Value) / (0.01 * frmMain.pbFILE.Maximum)), zipPath, extractPath) End If Next End Using I am sorry, if I was not clear in what I try to do or achieve. But the process worked for me in my old project.
|
|
Art Wilkes
|
Apr 16, 2014 - 9:35 AM
|
What we would suggest is to change the code to perform your own step function something like: pBar.SetBar(x); I’m not sure what the Setbar function is in the code you are using.
|
|
Roland v.’t Kruys
|
Dec 10, 2018 - 12:20 PM
|
Hi,
Ok, the issue (or puzzle, if you may call it) is still remaining. The goal is, I think, simple: how to display the unpacked files with the progress bar, using Ionic.Zip?
With kind regards, Roland
|
|
Roland v.’t Kruys
|
May 9, 2014 - 5:52 AM
|
Hi,
After reproducing the issue, I am not able to have the progressbar working. the "pBar.SetBar(x)" options is not in use in my application, nor did it work for me. The event is not known.
Please advise.
With kind regards, Roland
PS: I am still waiting for your response, which I have send by email.
|
|