Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wiki page #141

Open
PCAssistSoftware opened this issue Jan 16, 2022 · 18 comments
Open

Wiki page #141

PCAssistSoftware opened this issue Jan 16, 2022 · 18 comments
Assignees

Comments

@PCAssistSoftware
Copy link
Owner

As we have so many new areas to document (thanks to the great work by @RFBomb) I propose that I start creating several Wiki pages, this will allow the documentation to be more detailed with samples for usage in both C# and VB and in my opinion will be better than overloading the readme.md with information.

We can use this issue to discuss the pages I add so everyone involved can have some input on the content, and suggest any changes / improvements etc.

I will start work on this in the next few days.

@RFBomb
Copy link
Contributor

RFBomb commented Jan 16, 2022

Heres my thoughts on structure:

  • ROboCommand should have its own page, along with all the options objects having their own pages.
  • IRoboCommand should be on its own page.
  • RoboQueue should have its own page.
  • IProgressEstimator should have its own page, ProgressEstimator and RoboQueueProgressEstimator can be on the same page as IPRogressEstimator I think.
  • IStatistic should have its own page, and Statistic should be below it.

Basically, Interface on top of page, then the primary objects that implement it below it.
Other Interfaces, such as IResults can be standalone, since its implemented by multiple objects.

@RFBomb
Copy link
Contributor

RFBomb commented Jan 16, 2022

I can write up some of the interfaces descriptions in the coming weeks while I'm on the clock at work if you link me to where to edit them

@PCAssistSoftware
Copy link
Owner Author

I have started to add some blank pages based on your structure idea, never done GitHub Wiki before so just playing around with how to best do it.

I can write up some of the interfaces descriptions in the coming weeks while I'm on the clock at work if you link me to where to edit them

Think you will need @tjscience to give you permissions or you can type them up and email them to me and I will put them on for you?

@RFBomb
Copy link
Contributor

RFBomb commented Jan 16, 2022 via email

@PCAssistSoftware
Copy link
Owner Author

PCAssistSoftware commented Jan 16, 2022

I believe I can submit a PR against it, But if not I’ll post here

Okay cool, didn't realize you could do PR for Wiki - that's handy

Any other pages you want adding just let me know name and hierarchy

@RFBomb
Copy link
Contributor

RFBomb commented Jan 19, 2022

I've created
https://github.com/tjscience/RoboSharp/wiki/IStatistic
and updated the side bar organization, and filled out the links to all the pages.

You can use the IStatistic page for reference on proposed structure and how to do some formatting

@PCAssistSoftware
Copy link
Owner Author

Excellent, looking good - thanks for that, handy to have a page to see best way to do formatting

@RFBomb
Copy link
Contributor

RFBomb commented Jan 19, 2022

Alright, all the Interfaces have been finished on the wiki, except IROboCommand since thats ones large.
The rest of the objects can come later.
I submitted a PR to link to the wiki so the next nuget release has easily accessible ways for consumers to access it.
I think I got the important ones all linked up.

@PCAssistSoftware
Copy link
Owner Author

Excellent work :)

I was planning to do a section with some code examples, such as those currently in Readme.md and some more - and will do them in both C# and VB - just useful bits for newbies coming to this project, for anything more complex they can read your full documentation and dissect the sample app to learn.

@RFBomb
Copy link
Contributor

RFBomb commented Jan 19, 2022

Yea thats all fine. I just wanted to give a base structure for the pages to look like and get the links all set up.
If you could author the rest of the pages (its basically just copy pasting the stuff over from the code itself and doing the formatting), thatd be great.

@PCAssistSoftware
Copy link
Owner Author

Will see what I can do - am away for a few days now with work so may not be until I get back and caught up

@RFBomb
Copy link
Contributor

RFBomb commented Jan 19, 2022

No worries, like I said, I just wanted to get the basic setup complete

@PCAssistSoftware PCAssistSoftware unpinned this issue Feb 5, 2022
@mdbarton-las
Copy link

I know this thread is a couple years old but looking furiously for some sample code to wire up the progress estimator with robosharp and finding nothing.

@PCAssistSoftware
Copy link
Owner Author

I know this thread is a couple years old but looking furiously for some sample code to wire up the progress estimator with robosharp and finding nothing.

The included BackupApp would be a good start, and also the information and code snippets in the Wiki

@RFBomb
Copy link
Contributor

RFBomb commented Nov 15, 2024

I can add tothe wiki, what specifically are you trying to do with it? ( Progress bar for overall ? Progress bar for single file ? etc, or just hook up in general ? )

@RFBomb
Copy link
Contributor

RFBomb commented Nov 15, 2024

https://github.com/tjscience/RoboSharp/blob/dev/RoboSharp.BackupApp/ViewModels/CommandProgressViewModel.cs


cmd.OnProgressEstimatorCreated += OnProgressEstimatorCreated;

/// <summary> Bind the ProgressEstimator to the text controls on the PROGRESS tab </summary>
        private void OnProgressEstimatorCreated(object sender, EventArgObjects.ProgressEstimatorCreatedEventArgs e) => BindToProgressEstimator(e.ResultsEstimate);

        private void BindToProgressEstimator(IProgressEstimator e)
        {
            ProgressEstimatorBytes = "Bytes";
            ProgressEstimatorDirs = "Directories";
            ProgressEstimatorFiles = "Files";
            e.ValuesUpdated += IProgressEstimatorValuesUpdated;
        }

        private void IProgressEstimatorValuesUpdated(IProgressEstimator sender, EventArgObjects.IProgressEstimatorUpdateEventArgs e)
        {
            ProgressEstimatorBytes = e.BytesStatistic.ToString(true, true, "\n", true);
            ProgressEstimatorDirs = e.DirectoriesStatistic.ToString(true, true, "\n", true);
            ProgressEstimatorFiles = e.FilesStatistic.ToString(true, true, "\n", true);
        }

Basically:

  • Hook up to the progress estimator created event
  • In the event reaction you subscribe to the estimator itself

@mdbarton-las
Copy link

It is awesome y'all reply so quickly. We're moving large directories of files (10GB+, often > 100GB) and just need a basic progress bar to show things are still moving. Adding in filename being processed would also be great.

Ok, just saw that code - I should be able to work that out, thanks!

@RFBomb
Copy link
Contributor

RFBomb commented Nov 15, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants