예제 #1
0
        static IControl CreateContent(BehaviorSubject <bool> showWindow, BuildArgs buildArgs)
        {
            var editString = Property.Create("");
            var editArgs   = editString.Convert(BuildArgs.GetArgumentList, BuildArgs.GetArgumentString);

            Action save = async() => buildArgs.All.OnNext(await editArgs.FirstAsync());

            buildArgs.All.ConnectWhile(showWindow).Subscribe(args => editArgs.Write(args));

            return(Layout.Dock()
                   .Bottom(CreateButtons(showWindow, save: save))
                   .Bottom(Separator.Medium)
                   .Fill(
                       Layout.StackFromTop(
                           Spacer.Medium,
                           Label.Create(
                               text: "Separate flags with a space. Flags apply to all targets.",
                               color: Theme.DefaultText)
                           .CenterHorizontally(),
                           Spacer.Medim,
                           ThemedTextBox.Create(editString, doWrap: true),
                           Spacer.Medium,
                           Label.Create(
                               text: "Presets",
                               color: Theme.DefaultText),
                           Spacer.Smaller,
                           CreateFlagCheckBox(showWindow, editArgs, "-DCOCOAPODS", "Enable CocoaPods builds on iOS (-DCOCOAPODS)"),
                           Spacer.Smaller,
                           CreateFlagCheckBox(showWindow, editArgs, "-DDEBUG_V8", "Enable the V8 debugger (-DDEBUG_V8)"),
                           Spacer.Smaller,
                           CreateFlagCheckBox(showWindow, editArgs, "-v", "Enable verbose builds (-v)"))
                       .WithMacWindowStyleCompensation()
                       .WithPadding(new Thickness <Points>(45, 0, 45, 15)))
                   .WithBackground(Theme.PanelBackground));
        }
예제 #2
0
 public static Window Create(BehaviorSubject <bool> showWindow, BuildArgs args)
 {
     return(new Window
     {
         Title = Observable.Return("Add build flags"),
         Size = Optional.Some(Property.Constant(Optional.Some(new Size <Points>(600, 280)))),
         Content = Control.Lazy(() => CreateContent(showWindow, args)),
         Background = Theme.PanelBackground,
         Foreground = Theme.DefaultText,
         Border = Separator.MediumStroke,
         Style = WindowStyle.Fat,
     });
 }