![]() |
VOOZH | about |
dotnet add package PowLINQPad --version 0.0.16
NuGet\Install-Package PowLINQPad -Version 0.0.16
<PackageReference Include="PowLINQPad" Version="0.0.16" />
<PackageVersion Include="PowLINQPad" Version="0.0.16" />Directory.Packages.props
<PackageReference Include="PowLINQPad" />Project file
paket add PowLINQPad --version 0.0.16
#r "nuget: PowLINQPad, 0.0.16"
#:package PowLINQPad@0.0.16
#addin nuget:?package=PowLINQPad&version=0.0.16Install as a Cake Addin
#tool nuget:?package=PowLINQPad&version=0.0.16Install as a Cake Tool
Write this in your LINQPad query to init the library
// optional aliases
global using Obs = System.Reactive.Linq.Observable;
global using IDisp = System.IDisposable;
using static PowLINQPad.Flex_.Structs.Dims;
public static Disp D => RxUI.D;
void OnStart() => RxUI.Start();
void Main() =>
Flex.Vert(Dim.Fill, Dim.Fill,
Flex.Horz(Dim.Fill, Dim.Auto,
new Span("Header Start"),
new Span("Header End")
),
Flex.Horz(Dim.Fill, Dim.Fill,
Flex.Scroll(Dim.Fill, Dim.Fill,
Enumerable.Range(0, 30).SelectToArray(e => new Span($"Left Item: {e}"))
),
Flex.Scroll(Dim.Fill, Dim.Fill,
Enumerable.Range(0, 60).SelectToArray(e => new Span($"Right Item: {e}"))
)
),
Flex.Horz(Dim.Fill, Dim.Auto,
new Span("Footer")
)
)
.Build(true)
.Dump();
public static Disp D => RxUI.D;
void OnStart() => RxUI.Start();
record Person(
string Name,
string Address
)
{
public static readonly Person Empty = new(string.Empty, string.Empty);
}
class Sets : ISettings
{
// properties need to have a getter and a setter
public int Version { get; set; } = string.Empty;
// properties can be records
public Person Person { get; set; } = Person.Empty;
};
void Main()
{
// load
var sets = Settings.Load<Sets>();
// get a reactive variable representing a field
var varAddress = settings.Get(e => e.Person.Address);
// read the value
var addressValue = varAddress.V;
// write the value. this will automatically save the new value to disk
// with a debounce period
varAddress.V = "new address";
}
using static LINQPadUILib.RxControls.Utils.CtrlBlocks;
enum Status
{
First,
Second,
Third
}
record Filt(
int? Id,
BoolOpt BoolOpt,
TxtSearch Text,
RngInt RngInt,
RngTime RngTime,
Status[] Enums
)
{
public static readonly Filt Empty = new(
null,
BoolOpt.None,
TxtSearch.Empty,
RngInt.Empty,
RngTime.Empty,
Array.Empty<Status>()
);
}
class Sets : ISettings
{
public Filt F { get; set; } = Filt.Empty;
}
void Main()
{
var sets = Settings.Load<Sets>();
var rxId = sets.Get(e => e.F.Id).D(D);
var rxBoolOpt = sets.Get(e => e.F.BoolOpt).D(D);
var rxText = sets.Get(e => e.F.Text).D(D);
var rxRngInt = sets.Get(e => e.F.RngInt).D(D);
var rxRngTime = sets.Get(e => e.F.RngTime).D(D);
var rxEnums = sets.Get(e => e.F.Enums).D(D);
CtrlOpt o(int? keyWidth, int? valWidth, string title) => new(title, keyWidth, valWidth);
var uiId = Ctrls.MkInt (rxId, o(null, null, "Id" )).D(D);
var uiBoolOpt = Ctrls.MkBoolOpt (rxBoolOpt, o(null, null, "BoolOpt" )).D(D);
var uiText = Ctrls.MkText (rxText, o(null, null, "Text" ), true).D(D);
var uiRngInt = Ctrls.MkRngInt (rxRngInt, o(null, null, "RngInt" ), new RngIntBounds(25, 50)).D(D);
var uiRngTime = Ctrls.MkRngTime (rxRngTime, o(null, null, "RngTime" ), RngTime.SampleTimes, 20).D(D);
var uiEnums = Ctrls.MkEnumMultiple (rxEnums, o(null, null, "Enums" )).D(D);
vert(
horz(
vert(
uiId,
uiBoolOpt
),
uiText,
uiRngInt
),
horz(
uiRngTime,
uiEnums
)
).Dump();
Util.VerticalRun(
rxId .Select(e => $"Id: {e}" ).ToSpan(D),
rxBoolOpt .Select(e => $"BoolOpt: {e}").ToSpan(D),
rxText .Select(e => $"Text: [{e.Fmt()}]").ToSpan(D),
rxRngInt .Select(e => $"RngInt: {e}" ).ToSpan(D),
rxRngTime .Select(e => $"RngTime: {e}").ToSpan(D),
rxEnums .Select(e => $"Enums: {e}" ).ToSpan(D)
).Dump("Vars");
}
static class FmtExt
{
public static string Fmt(this TxtSearch e)
{
var sb = new StringBuilder();
sb.Append($"useRegex:{e.UseRegex}");
sb.Append($" text:'{e.Text}'");
sb.Append(" parts:");
if (e.Parts == null)
sb.Append("_");
else
sb.Append($"({e.Parts.JoinText(",")})");
sb.Append(" regex:");
if (e.Regex == null)
sb.Append("_");
else
sb.Append("yes");
sb.Append($" isError:{e.IsError}");
return sb.ToString();
}
}
public static Disp D => RxUI.D;
void OnStart()
{
RxUI.Start();
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net7.0 net7.0 is compatible. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.0.16 | 340 | 9/15/2023 |
| 0.0.15 | 284 | 8/23/2023 |
| 0.0.14 | 257 | 8/22/2023 |
| 0.0.13 | 269 | 8/22/2023 |
| 0.0.12 | 240 | 8/22/2023 |
| 0.0.11 | 260 | 8/22/2023 |
| 0.0.10 | 277 | 8/20/2023 |
| 0.0.9 | 270 | 8/19/2023 |
| 0.0.8 | 264 | 8/19/2023 |
| 0.0.7 | 277 | 8/19/2023 |
| 0.0.6 | 264 | 8/19/2023 |
| 0.0.5 | 299 | 8/19/2023 |
| 0.0.4 | 261 | 8/18/2023 |
| 0.0.3 | 267 | 8/18/2023 |
| 0.0.2 | 248 | 8/18/2023 |
| 0.0.1 | 272 | 8/17/2023 |