package _VisualDVM.Passes.All;
import Common.Visual.Windows.Dialog.PercentsForm;
import _VisualDVM.Global;
public class UpdateBugReportProgress extends UpdateBugReportField {
    @Override
    public String getIconPath() {
        return "/icons/Progress.png";
    }
    @Override
    public String getButtonText() {
        return "";
    }
    @Override
    protected boolean canStart(Object... args) throws Exception {
        if (!Global.componentsServer.db.bugReports.getUI().CheckCurrent(Log))
            return false;
        PercentsForm f = new PercentsForm();
        if (f.ShowDialog("Завершённость работы над ошибкой",
                Global.componentsServer.db.bugReports.getUI().getCurrent().percentage))
            return super.canStart("percentage", f.Result);
        return false;
    }
    @Override
    protected boolean canUpdate() {
        return target.canAppend(Global.mainModule.getAccount(), Log);
    }
}
