private float[] GetRadii(RoundCorners roundCorners, float radius) { var corners = new float[8]; if (roundCorners.HasFlag(RoundCorners.TopLeft)) { corners[0] = radius; corners[1] = radius; } if (roundCorners.HasFlag(RoundCorners.TopRight)) { corners[2] = radius; corners[3] = radius; } if (roundCorners.HasFlag(RoundCorners.BottomRight)) { corners[4] = radius; corners[5] = radius; } if (roundCorners.HasFlag(RoundCorners.BottomLeft)) { corners[6] = radius; corners[7] = radius; } return(corners); }
RoundCorners ComposeRoundCorners(RoundCorners a, RoundCorners b) { if (a is null) { return(b); } else if (b is null) { return(a); } if (!b.Radius.IsAnimated) { if (b.Radius.InitialValue >= 0) { // If b has a non-0 value, it wins. return(b); } else { // b is always 0. A wins. return(a); } } Translation.Issues.MultipleAnimatedRoundCornersIsNotSupported(); return(b); }
YamlObject FromRoundCorners(RoundCorners content, YamlMap superclassContent) { var result = superclassContent; result.Add(nameof(content.Radius), FromAnimatable(content.Radius)); return(result); }
private void Load() { IRoundCorners roundCorners = new RoundCorners(); IApplicationStyle style = new ApplicationStyle(roundCorners, true, true); style.Run(); IScriptPaths scriptPaths = new ScriptPaths(); IExecutePowerShellScript executePowerShellScript = new ExecutePowerShellScript(); ITaskBarIconConfiguration taskBarIconConfiguration = new TaskBarIconConfiguration(this, PowerShellRunnerTaskBarIcon, executePowerShellScript, scriptPaths); taskBarIconConfiguration.StartMinimized(); taskBarIconConfiguration.Run(); //MessageBox.Show(stringBuilder.ToString()); }
public static void SetRoundCorners(BindableObject bindable, RoundCorners roundCorners) { bindable.SetValue(RoundCornersProperty, roundCorners); }