ProcessBox API | WPF | C# | Saatody | Amit Padhiyar
ProcessBox Class API
Small widget which show current process with responsive UI.
Constructure
This is one and default constructor.
Syntax
public ProcessBox()
Properties
Syntax
public ProcessBoxTypes Type
public string Description
public ProcessBoxOptions Option
Methods
Syntax
public void SetCurrentProcess(string Status)
public void SetCurrentProcess(string Status, int Percentage)
public static void Show(ProcessBox ProcessBox)
public static void Close(ProcessBox ProcessBox)
PredictableProcessUI Class API
Constructure
This is one and default constructor.
Syntax
public PredictableProcessUI()
Properties
Syntax
public int Process
Methods
Syntax
public async Task LoadUI()
public async Task UnloadUI()
UnpredictableProcessUI Class API
Constructure
This is one and default constructor.
Syntax
public UnpredictableProcessUI()
Methods
Syntax
public async Task LoadUI()
public async Task UnloadUI()
ProcessBoxTypes Enum API
ProcessBoxOptions Enum API
Example
GUI.ProcessBox ProcessBox = new GUI.ProcessBox();
ProcessBox.Owner = AnotherWindow;
ProcessBox.Title = "Exploring";
ProcessBox.Type = GUI.ProcessBoxTypes.Unpredictable;
ProcessBox.Description = "This process description.";
ProcessBox.Option = GUI.ProcessBoxOptions.None;
Task.Run(() =>
{
WPF1.Dispatcher.Invoke(() =>
{
ProcessBox.SetCurrentProcess("Page is opening...");
WPF1.Open();
});
WPF2.Dispatcher.Invoke(() =>
{
ProcessBox.SetCurrentProcess("Updating UI...");
WPF2.UpdateAllGUI();
// Closing ProcessBox
GUI.ProcessBox.Close(ProcessBox);
});
});
// Showing ProcessBox
GUI.ProcessBox.Show(ProcessBox);
Note: If ProcessBox type is unpredictable then use...
public void SetCurrentProcess(string Status)
But, If ProcessBox type is predictable then use...
public void SetCurrentProcess(string Status, int Percentage)
Comments
Post a Comment