public string FormatTaskbarToolTip(string s, ActionTabState statusModel) { var baseText = s + " v" + Consts.ProductVersion; return(statusModel == null ? baseText : baseText + "\n" + (statusModel.ChildAction.Details ?? statusModel.Text)); }
static TaskbarItemProgressState ToProgressState(ActionTabState b) { if (b == null) { return(TaskbarItemProgressState.None); } switch (b.Type) { case ActionType.Fail: return(TaskbarItemProgressState.Error); default: return(b.Progress == null ? TaskbarItemProgressState.Indeterminate : TaskbarItemProgressState.Normal); } }
private ActionTabStateUpdate GetActionStateUpdate(ActionTabState sm) => new ActionTabStateUpdate { Progress = sm.Progress, ChildAction = sm.ChildAction };
private Task SetState(ActionTabState x) => Entrypoint.Api.SetState(x.Type == ActionType.Start ? BusyState.On : BusyState.Off, x.ChildAction.Details ?? x.Text, x.Progress);
public string FormatTaskbarToolTip(string s, ActionTabState statusModel) { var baseText = s + " v" + Consts.ProductVersion; return statusModel == null ? baseText : baseText + "\n" + (statusModel.ChildAction.Details ?? statusModel.Text); }