Inheritance: Xwt.Widget
示例#1
0
        public MyTestWidget()
        {
            PackStart(new TextEntry() { PlaceholderText = "Placeholder Test" });
            PackStart(new Label("Scrollable Test:"));

            VBox ContentData = new VBox()
            {
                ExpandHorizontal = true,
                ExpandVertical = true
            };

            ScrollView ContentScroll = new ScrollView()
            {
                Content = ContentData,
                ExpandHorizontal = true,
                ExpandVertical = true
            };
            PackStart(ContentScroll, true, true);

            ContentData.PackStart(new TextEntry() { PlaceholderText = "Placeholder Test" }, true, true);
            ContentData.PackStart(new TextEntry(), true, true);
            ContentData.PackStart(new TextEntry() { PlaceholderText = "Placeholder Test" }, true, true);
            ContentData.PackStart(new TextEntry(), true, true);
            ContentData.PackStart(new TextEntry() { PlaceholderText = "Placeholder Test" }, true, true);
            ContentData.PackStart(new MyWidget(), true, true);
            ContentData.PackStart(new TextEntry() { PlaceholderText = "Placeholder Test" }, true, true);
            ContentData.PackStart(new TextEntry(), true, true);
            ContentData.PackStart(new TextEntry() { PlaceholderText = "Placeholder Test" }, true, true);
            ContentData.PackStart(new TextEntry(), true, true);
            ContentData.PackStart(new TextEntry() { PlaceholderText = "Placeholder Test" }, true, true);
            ContentData.PackStart(new TextEntry(), true, true);
        }
示例#2
0
        private void InitializeComponent()
        {
            Width = 550;
            Height = 600;
            //Location = WindowLocation.CenterScreen;

            vbox2 = new VBox();
            vbox2.Visible = true;
            vbox2.Spacing = 3;

            notebook1 = new Notebook();
            notebook1.Visible = true;
            notebook1.CanGetFocus = true;

            image1 = new ImageView();
            string file = FileHelper.FindSupportFile("bygfoot_splash.png", false);
            image1.Image = Image.FromFile(file);

            treeview_splash_contributors = new TreeView();

            scrolledwindow2 = new ScrollView();
            scrolledwindow2.Content = treeview_splash_contributors;

            notebook1.Add(image1, "");
            notebook1.Add(scrolledwindow2, "");
            vbox2.PackStart(notebook1);

            Content = vbox2;
        }
示例#3
0
        public ReportViewer()
        {
            // Setup layout boxes
            vboxContents = new Xwt.VBox();
            vboxToolMenu = new Xwt.HBox();

            // Setup tool button menu
            Xwt.Button buttonExport = new Xwt.Button("Export");
            buttonExport.Clicked += delegate(object sender, EventArgs e) {
                SaveAs();
            };
            vboxToolMenu.PackStart(buttonExport);

            Xwt.Button buttonPrint = new Xwt.Button("Print");
            vboxToolMenu.PackStart(buttonPrint);

            // Add vboxContent widgets
            vboxPages = new Xwt.VBox();
            vboxContents.PackStart(vboxToolMenu);
            vboxContents.PackStart(vboxPages);

            // Setup Controls Contents
            scrollView = new Xwt.ScrollView();
            scrollView.Content = vboxContents;
            scrollView.VerticalScrollPolicy = ScrollPolicy.Automatic;
            scrollView.BorderVisible = true;
            this.PackStart(scrollView, BoxMode.FillAndExpand);

            Parameters = new ListDictionary();

            ShowErrors = false;
        }
示例#4
0
        public ReportViewer()
        {
            // Setup layout boxes
            vboxContents = new Xwt.VBox();
            vboxToolMenu = new Xwt.HBox();

            // Setup tool button menu
            Xwt.Button buttonExport = new Xwt.Button("Export");
            buttonExport.Clicked += delegate(object sender, EventArgs e)
            {
                SaveAs();
            };
            vboxToolMenu.PackStart(buttonExport);

            Xwt.Button buttonPrint = new Xwt.Button("Print");
            vboxToolMenu.PackStart(buttonPrint);

            // Add vboxContent widgets
            vboxPages = new Xwt.VBox();
            vboxContents.PackStart(vboxToolMenu);
            vboxContents.PackStart(vboxPages);


            // Setup Controls Contents
            scrollView         = new Xwt.ScrollView();
            scrollView.Content = vboxContents;
            scrollView.VerticalScrollPolicy = ScrollPolicy.Automatic;
            scrollView.BorderVisible        = true;
            this.PackStart(scrollView, true, true);

            Parameters = new ListDictionary();

            ShowErrors = false;
        }
示例#5
0
        public LauncherWindow()
        {
            this.Title = "TrueCraft Launcher";
            this.Width = 1200;
            this.Height = 576;
            this.User = new TrueCraftUser();

            MainContainer = new HBox();
            WebScrollView = new ScrollView();
            WebView = new WebView("http://truecraft.io/updates");
            LoginView = new LoginView(this);
            OptionView = new OptionView(this);
            MultiplayerView = new MultiplayerView(this);
            SingleplayerView = new SingleplayerView(this);
            InteractionBox = new VBox();

            using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("TrueCraft.Launcher.Content.truecraft_logo.svg"))
                TrueCraftLogoImage = new ImageView(Image.FromStream(stream));

            WebScrollView.Content = WebView;
            MainContainer.PackStart(WebScrollView, true);
            InteractionBox.PackStart(TrueCraftLogoImage);
            InteractionBox.PackEnd(LoginView);
            MainContainer.PackEnd(InteractionBox);

            this.Content = MainContainer;
        }
示例#6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Baimp.PipelineController"/> class.
        /// </summary>
        /// <param name="project">Project.</param>
        /// <param name="pipelineShelf">Frame where the pipeline should be.</param>
        public PipelineController(Project project, VBox pipelineShelf)
        {
            this.pipelineShelf = pipelineShelf;

            pipelineScroller = new ScrollView();
            pipelineScroller.Content = currentPipeline;

            this.project = project;
            OnProjectDataChangged(new ProjectChangedEventArgs(null) { refresh = true });

            InitializeControllerbar();
            splitControllTab_pipelineScroller.PackEnd(pipelineScroller, true, true);

            algorithm = new AlgorithmTreeView(project.scanCollection);
            algorithm.MinWidth = 200; // TODO, save size as user property

            HPaned splitPipeline_Algorithm = new HPaned();
            splitPipeline_Algorithm.Panel1.Content = algorithm;
            splitPipeline_Algorithm.Panel1.Resize = false;
            splitPipeline_Algorithm.Panel1.Shrink = false;
            splitPipeline_Algorithm.Panel2.Content = splitControllTab_pipelineScroller;
            splitPipeline_Algorithm.Panel2.Resize = true;
            splitPipeline_Algorithm.Panel2.Shrink = false;

            pipelineShelf.PackStart(splitPipeline_Algorithm, true, true);

            InitializeEvents();
        }
示例#7
0
 public ScrollWindowSample()
 {
     ScrollView v4 = new ScrollView ();
     PackStart (v4, fill:true, expand:true);
     var sb = new ScrollableCanvas ();
     var te = new TextEntries ();
     v4.Content = te;
     v4.VerticalScrollPolicy = ScrollPolicy.Always;
 }
		public HexEditorView ()
		{
			hexEditor.HexEditorStyle = new MonoDevelopHexEditorStyle (hexEditor);
			SetOptions ();
			DefaultSourceEditorOptions.Instance.Changed += Instance_Changed;
			hexEditor.HexEditorData.Replaced += delegate {
				this.IsDirty = true;
			};
			window = new ScrollView (hexEditor);
		}
示例#9
0
        public MainWindow()
        {
            var w = System.Diagnostics.Stopwatch.StartNew();
            Title = "4Plug v2 beta";

            Width = 870;
            Height = 550;

            Padding = new WidgetSpacing();

            //Menu
            //Menu mainMenu = new Menu();
            //var m = new MenuItem("Close");
            //Menu subMenu = new Menu();
            //subMenu.Items.Add(new MenuItem("HAH"));
            //m.SubMenu = subMenu;
            //mainMenu.Items.Add(m);
            //this.MainMenu = mainMenu;

            //Flow Control
            flowControl = new PluginWidgetLayout();
            flowControl.Padding = new WidgetSpacing(16, 0, 8, 16);

            flowControl.AddChild(new PluginTitleWidget(PluginType.Hud));
            flowControl.AddChild(new PluginTitleWidget(PluginType.Unknown));
            flowControl.AddChild(new PluginTitleWidget(PluginType.Vpk));
            flowControl.AddChild(new PluginTitleWidget(PluginType.Hitsound));
            flowControl.AddChild(new PluginTitleWidget(PluginType.Addon));

            //flowControl.AddChild(new AddPluginWidget(PluginType.Hud));
            ////flowControl.AddChild(new AddPluginWidget(PluginType.Unknown));
            //flowControl.AddChild(new AddPluginWidget(PluginType.Vpk));
            //flowControl.AddChild(new AddPluginWidget(PluginType.Hitsound));
            //flowControl.AddChild(new AddPluginWidget(PluginType.Addon));

            scrollView = new ScrollView();
            scrollView.Content = flowControl;
            flowControl.BackgroundColor = Color.FromBytes(240, 240, 240);
            Content = scrollView;

            flowControl.layout = false;
            LoadPlugins();
            flowControl.layout = true;
            flowControl.Layout();

            //new Popover() { Content = new Label("eyyy leute") }.Show(Popover.Position.Top, scrollView);

            //Finish
            CloseRequested += HandleCloseRequested;
            w.Stop();
            Console.WriteLine("MainWindow..ctor(): " + w.ElapsedMilliseconds + "ms");
        }
示例#10
0
        public ReportViewer()
        {
            vboxPages          = new Xwt.VBox();
            scrollView         = new Xwt.ScrollView();
            scrollView.Content = vboxPages;
            scrollView.VerticalScrollPolicy = ScrollPolicy.Always;
            scrollView.BorderVisible        = true;
            this.PackStart(scrollView, BoxMode.FillAndExpand);

            Parameters = new ListDictionary();

            ShowErrors = false;
        }
示例#11
0
        public ReportViewer()
        {
            vboxPages = new Xwt.VBox();
            scrollView = new Xwt.ScrollView();
            scrollView.Content = vboxPages;
            scrollView.VerticalScrollPolicy = ScrollPolicy.Automatic;
            scrollView.BorderVisible = true;
            this.PackStart(scrollView, BoxMode.FillAndExpand);

            Parameters = new ListDictionary();

            ShowErrors = false;
        }
示例#12
0
        public HudsTFDisplay()
        {
            Icon = App.Icon;

            Layout.ItemWidth = HudsTFWidget.ImageSize.Width;

            Content = new ScrollView(Layout);
            new Task(() => Load()).Start();

            Title = "Huds.TF";
            Width = 900;
            Height = 600;
        }
示例#13
0
        /// <summary>
        /// Create components
        /// </summary>
        public override void _initializeComponents()
        {
            var markdown = new MarkdownView()
            {
                Markdown = MarkDownText
            };
            markdown.Margin = 10;

            var scrolled = new ScrollView(markdown)
            {
                MinHeight = 400
            };
            PackStart(scrolled, true);
        }
示例#14
0
        public override Xwt.Widget Makeup(IXwtWrapper Parent)
        {
            Xwt.ScrollView Target = new Xwt.ScrollView()
            {
                HorizontalScrollPolicy = this.HScrollPolicy,
                VerticalScrollPolicy = this.VScrollPolicy,
                BorderVisible = this.BorderVisible
            };

            if (Items != null && Items.Count() > 0)
                Target.Content = Items[0].Makeup(Parent);

            WindowController.TryAttachEvent(Target, "VisibleRectChanged", Parent, VisibleRectChanged);

            InitWidget(Target, Parent);
            return Target;
        }
		public LicenseAcceptanceDialog (LicenseAcceptanceViewModel viewModel)
		{
			Height = 350;
			Resizable = false;
			Padding = 0;
			Title = GettextCatalog.GetString ("License Acceptance");
			this.viewModel = viewModel;
			this.imageLoader = new ImageLoader ();
			this.imageLoader.Loaded += HandleImageLoaded;

			var titleLabel = new Label ();
			titleLabel.Text = GettextCatalog.GetPluralString (
				"The following package requires that you accept its license terms before installing:",
				"The following packages require that you accept their license terms before installing:",
				viewModel.HasMultiplePackages ? 2 : 1);
			var descriptionLabel = new Label ();
			descriptionLabel.Wrap = WrapMode.Word;
			descriptionLabel.Markup = GettextCatalog.GetString ("By clicking <b>Accept</b> you agree to the license terms for the packages listed above.\n" +
																	"If you do not agree to the license terms click <b>Decline</b>.");

			packagesList = new VBox ();
			packagesList.Spacing = 0;

			scroll = new ScrollView (packagesList);
			scroll.HorizontalScrollPolicy = ScrollPolicy.Never;
			scroll.VerticalScrollPolicy = ScrollPolicy.Automatic;
			scroll.BorderVisible = false;
			scroll.BackgroundColor = Ide.Gui.Styles.BackgroundColor;

			var container = new VBox ();
			container.MarginTop = container.MarginLeft = container.MarginRight = 15;
			container.PackStart (titleLabel);
			container.PackStart (scroll, true, true);
			container.PackEnd (descriptionLabel);

			Content = container;

			var declineButton = new DialogButton (GettextCatalog.GetString ("Decline"), Command.Cancel);
			var acceptButton = new DialogButton (GettextCatalog.GetString ("Accept"), Command.Ok);

			Buttons.Add (declineButton);
			Buttons.Add (acceptButton);

			AddPackages ();
		}
示例#16
0
        public ScrollWindowSample()
        {
            ScrollView v1 = new ScrollView ();
            VBox b1 = new VBox ();
            for (int n=0; n<30; n++)
                b1.PackStart (new Label ("Line " + n), BoxMode.None);
            Button u = new Button ("Click to remove");
            u.Clicked += delegate {
                b1.Remove (u);
            };
            b1.PackStart (u);

            v1.Content = b1;
            v1.VerticalScrollPolicy = ScrollPolicy.Always;
            v1.BorderVisible = false;
            PackStart (v1, BoxMode.FillAndExpand);

            ScrollView v2 = new ScrollView ();
            VBox b2 = new VBox ();
            for (int n=0; n<10; n++)
                b2.PackStart (new Label ("Line " + n), BoxMode.None);
            v2.Content = b2;
            v2.VerticalScrollPolicy = ScrollPolicy.Never;
            PackStart (v2, BoxMode.FillAndExpand);

            ScrollView v3 = new ScrollView ();
            VBox b3 = new VBox ();
            Button b = new Button ("Click to add items");
            b.Clicked += delegate {
                for (int n=0; n<10; n++)
                    b3.PackStart (new Label ("Line " + n), BoxMode.None);
            };
            b3.PackStart (b);
            v3.Content = b3;
            v3.VerticalScrollPolicy = ScrollPolicy.Automatic;
            PackStart (v3, BoxMode.FillAndExpand);

            ScrollView v4 = new ScrollView ();
            PackStart (v4, BoxMode.FillAndExpand);
            var sb = new ScrollableCanvas ();
            v4.Content = sb;
            v4.VerticalScrollPolicy = ScrollPolicy.Always;
        }
示例#17
0
        public MarkDownSample()
        {
            var openFileDialog = new OpenFileDialog ("Select File");
            var markdown = new MarkdownView() {
                Markdown = MarkDownText
            };
            var scrolled = new ScrollView (markdown) {
                MinHeight = 400
            };

            var button = new Button ("Open File");
            button.Clicked += delegate {
                if (openFileDialog.Run (ParentWindow)) {
                    markdown.Markdown = File.ReadAllText (openFileDialog.FileName);
                }
            };

            PackStart (button, BoxMode.FillAndExpand);
            PackStart (scrolled, BoxMode.FillAndExpand);
        }
示例#18
0
        public LauncherWindow()
        {
            this.Title = "TrueCraft Launcher";
            this.Width = 1200;
            this.Height = 576;
            this.User = new TrueCraftUser();

            MainContainer = new HBox();
            WebScrollView = new ScrollView();
            WebView = new WebView("http://truecraft.io/updates");
            LoginView = new LoginView(this);
            OptionView = new OptionView(this);
            MultiplayerView = new MultiplayerView(this);
            SingleplayerView = new SingleplayerView(this);

            WebScrollView.Content = WebView;
            MainContainer.PackStart(WebScrollView, true);
            MainContainer.PackEnd(LoginView);

            this.Content = MainContainer;
        }
示例#19
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Director.Forms.Inputs.OverviewWidget"/> class.
        /// </summary>
        /// <param name="request">Request.</param>
        public OverviewWidget(Request request)
        {
            // Set active request
            ActiveRequest = request;

            // Set margin
            Margin = 10;
            ExpandHorizontal = true;
            ExpandVertical = true;

            // Create markdown
            Overview = new VBox();
            ScrollOverview = new ScrollView()
            {
                Content = Overview,
                MarginTop = 5
            };
            PackStart(ScrollOverview, expand: true, fill: true);

            // Refresh
            RefreshOverview();
        }
示例#20
0
        public TextViewerWindow(string path)
        {
            Icon = App.Icon;

            Title = path + " (ESC to close)";

            bool isMd = path.ToUpper().EndsWith(".MD");

            var rtv = new RichTextView();
            var scroll = new ScrollView(rtv);
            Content = scroll;

            try
            {
                rtv.LoadFile(path, isMd ? TextFormat.Markdown : ProperPlainTextFormat.Proper);
            }
            catch { }

            rtv.KeyPressed += (s, e) => { if (e.Key == Key.Escape) Close(); };

            Width = 800;
            Height = 550;
        }
示例#21
0
 public HelpWindow()
 {
     VBox mainContent = new VBox ();
     _messageDisplay = new RichTextView {
         WidthRequest = 500
     };
     ScrollView scroller = new ScrollView (_messageDisplay) {
         VerticalScrollPolicy = ScrollPolicy.Automatic,
                      HorizontalScrollPolicy = ScrollPolicy.Never,
                      HeightRequest = 500
     };
     mainContent.PackStart (scroller);
     HBox buttonRow = new HBox ();
     Button ok = new Button {
         Label = I18N._ ("Close"),
               Image = Icons.Ok
     };
     ok.Clicked += (sender, args) => Close ();
     buttonRow.PackEnd (ok);
     mainContent.PackEnd (buttonRow);
     Content = mainContent;
     Width = 400;
 }
            void BuildContent(string license)
            {
                double textWidth = 480;
                double textHeight = 480;
                VBox mainContent = new VBox ();

                RichTextView textView = new RichTextView ();
                textView.LoadText (license, TextFormat.Markdown);
                textView.MinWidth = textWidth;
                ScrollView scroller = new ScrollView (textView);
                scroller.HorizontalScrollPolicy = ScrollPolicy.Never;
                scroller.VerticalScrollPolicy = ScrollPolicy.Automatic;
                scroller.MinHeight = textHeight;
                scroller.MinWidth = textWidth + textView.MarginLeft + textView.MarginRight + 20;
                mainContent.PackStart (scroller);

                HBox buttonRow = new HBox ();
                Button ok = new Button { Label = I18N._ ("Close"), Image = Icons.Ok };
                ok.Clicked += (sender, args) => Close ();
                buttonRow.PackEnd (ok);
                mainContent.PackEnd (buttonRow);

                Content = mainContent;
            }
示例#23
0
        public ScrollWindowSample()
        {
            ScrollView v1 = new ScrollView ();
            VBox b1 = new VBox ();
            for (int n=0; n<30; n++)
                b1.PackStart (new Label ("Line " + n), BoxMode.None);
            v1.Child = b1;
            v1.VerticalScrollPolicy = ScrollPolicy.Always;
            PackStart (v1, BoxMode.FillAndExpand);

            ScrollView v2 = new ScrollView ();
            VBox b2 = new VBox ();
            for (int n=0; n<10; n++)
                b2.PackStart (new Label ("Line " + n), BoxMode.None);
            v2.Child = b2;
            v2.VerticalScrollPolicy = ScrollPolicy.Never;
            PackStart (v2, BoxMode.FillAndExpand);

            ScrollView v3 = new ScrollView ();
            VBox b3 = new VBox ();
            Button b = new Button ("Click to add items");
            b.Clicked += delegate {
                for (int n=0; n<10; n++)
                    b3.PackStart (new Label ("Line " + n), BoxMode.None);
            };
            b3.PackStart (b);
            v3.Child = b3;
            v3.VerticalScrollPolicy = ScrollPolicy.Automatic;
            PackStart (v3, BoxMode.FillAndExpand);

            ScrollView v4 = new ScrollView ();
            PackStart (v4, BoxMode.FillAndExpand);
            SimpleBox sb = new SimpleBox (1000);
            v4.Child = sb;
            v4.VerticalScrollPolicy = ScrollPolicy.Always;
        }
示例#24
0
        private Widget CreateDescriptionView()
        {
            var virtualBox = new VBox();

            lblDescription = new MarkdownView {
                Markdown = Card.Description ?? "",
                Font = Font.WithSize(14),
                Visible = false
            };
            virtualBox.PackStart(lblDescription, true);

            txtDescription = new TextArea {
                Text = Card.Description ?? "",
                Font = Font.WithSize(14),
                Visible = false
            };
            virtualBox.PackStart(txtDescription, true);

            var scrollView = new ScrollView(virtualBox);
            scrollView.WidthRequest = 600;
            return scrollView;
        }
示例#25
0
        private void Build()
        {
            if(Toolkit.CurrentEngine.Type == ToolkitType.Wpf)
                this.BackgroundColor = (new Button()).BackgroundColor;

            vbox1 = new VBox();

            label1 = new Label("Select Font:");
            label1.MarginTop = 4;
            label1.MarginRight = 4;
            label1.MarginLeft = 4;
            vbox1.PackStart(label1);

            table1 = new Table();
            table1.MarginRight = 4;
            table1.MarginLeft = 4;

            radioButton1 = new RadioButton("From System: ");
            table1.Add(radioButton1, 0, 0);

            combo_font = new ComboBox();

            List<string> fonts = new List<string>();
            foreach (System.Drawing.FontFamily font in System.Drawing.FontFamily.Families)
                fonts.Add(font.Name);
            fonts.Sort();
            foreach (string font in fonts)
                combo_font.Items.Add(font);

            if(combo_font.Items.Contains("Arial"))
                combo_font.SelectedText = "Arial";
            else if(combo_font.Items.Count > 0)
                combo_font.SelectedIndex = 0;
            combo_font.Font = Xwt.Drawing.Font.FromName(combo_font.SelectedText).WithSize(combo_font.Font.Size);

            table1.Add(combo_font, 1, 0, 1, 1, true);

            radioButton2 = new RadioButton();
            radioButton2.Label = "From File: ";
            radioButton2.Sensitive = true;
            radioButton2.Group = radioButton1.Group;
            table1.Add(radioButton2, 0, 1);

            hbox1 = new HBox();

            entry_font = new TextEntry();
            entry_font.Sensitive = false;
            hbox1.PackStart(entry_font, true);

            button_font = new Button("Browse");
            button_font.Sensitive = false;
            hbox1.PackStart(button_font);

            table1.Add(hbox1, 1, 1);

            vbox1.PackStart(table1);

            notebook1 = new Notebook();
            notebook1.ExpandHorizontal = true;
            notebook1.ExpandVertical = true;

            table2 = new Table();
            table2.Margin = 4;

            label4 = new Label("Style:");
            table2.Add(label4, 0, 0);

            hbox2 = new HBox();

            check_bold = new CheckBox("Bold ");
            check_bold.BackgroundColor = Color.FromBytes(0, 0, 0, 0);
            hbox2.PackStart(check_bold);

            check_italic = new CheckBox("Italic ");
            check_italic.BackgroundColor = Color.FromBytes(0, 0, 0, 0);
            hbox2.PackStart(check_italic);

            check_kerning = new CheckBox("Kerning ");
            check_kerning.BackgroundColor = Color.FromBytes(0, 0, 0, 0);
            hbox2.PackStart(check_kerning);

            table2.Add(hbox2, 0, 1, 1, 1);

            label2 = new Label("Size:");
            table2.Add(label2, 0, 2);

            entry_size = new NumericEntry("0", "WARNING: Size needs to be a number");
            table2.Add(entry_size, 0, 3, 1, 1, true);

            label3 = new Label("Spacing:");
            table2.Add(label3, 0, 4);

            entry_spacing = new NumericEntry("0", "WARNING: Spacing needs to be a number");
            table2.Add(entry_spacing, 0, 5, 1, 1, true);

            check_defchar = new CheckBox("Default Character:");
            check_defchar.BackgroundColor = Color.FromBytes(0, 0, 0, 0);
            table2.Add(check_defchar, 0, 6);

            entry_defchar = new TextEntry();
            entry_defchar.Sensitive = false;
            entry_defchar.TextAlignment = Alignment.Center;
            table2.Add(entry_defchar, 0, 7, 1, 1, true);

            notebook1.Add(table2, "Global");

            hbox3 = new HBox();

            listView1 = new ListView();
            hbox3.PackStart(listView1, true);

            vbox2 = new VBox();
            vbox2.MarginRight = 5;
            vbox2.MarginTop = 5;

            label8 = new Label(" Main:");
            vbox2.PackStart(label8);

            button_plus = new Button("Add");
            vbox2.PackStart(button_plus);

            button_minus = new Button("Remove");
            button_minus.Sensitive = false;
            vbox2.PackStart(button_minus);

            button_edit = new Button("Edit");
            button_edit.Sensitive = false;
            vbox2.PackStart(button_edit);

            vbox2.PackStart(new HSeparator());

            label9 = new Label(" Move:");
            vbox2.PackStart(label9);

            button_up  = new Button("Up");
            button_up.Sensitive = false;
            vbox2.PackStart(button_up);

            button_down  = new Button("Down");
            button_down.Sensitive = false;
            vbox2.PackStart(button_down);

            hbox3.PackStart(vbox2);

            notebook1.Add(hbox3, "Characters");

            var pa = new VBox();

            textEditor1 = new TextEditor();
            textEditor1.Document.MimeType = "application/xml";

            pa.PackStart(textEditor1, true);
            notebook1.Add(pa, "Xml");

            vbox3 = new VBox();

            hbox4 = new HBox();
            hbox4.Margin = 5;

            label5 = new Label("Font Color: ");
            hbox4.PackStart(label5);

            color_font = new ColorPicker();
            color_font.Color = Color.FromBytes(0, 0, 0);
            color_font.SupportsAlpha = false;
            hbox4.PackStart(color_font);

            label6 = new Label("Background Color: ");
            hbox4.PackStart(label6);

            color_back = new ColorPicker();
            color_back.Color = Color.FromBytes(224, 224, 209);
            color_back.SupportsAlpha = false;
            hbox4.PackStart(color_back);

            vbox3.PackStart(hbox4);

            hbox5 = new HBox();
            hbox5.MarginLeft = 5;
            hbox5.MarginRight = 5;

            label7 = new Label("Text: ");
            hbox5.PackStart(label7);

            entry_text = new TextEntry();
            entry_text.Text = "The quick brown fox jumps over the lazy dog";
            hbox5.PackStart(entry_text, true);

            button_preview = new Button("Preview");
            hbox5.PackStart(button_preview);

            vbox3.PackStart(hbox5);

            web1 = new WebView();

            scrollView2 = new ScrollView();
            scrollView2.HorizontalScrollPolicy = ScrollPolicy.Automatic;
            scrollView2.VerticalScrollPolicy = ScrollPolicy.Automatic;

            if (Toolkit.CurrentEngine.Type != ToolkitType.Gtk)
                scrollView2.Content = web1;

            vbox3.PackStart(scrollView2, true);

            notebook1.Add(vbox3, "Preview");

            vbox1.PackStart(notebook1, true);

            this.Content = vbox1;
        }
示例#26
0
        public LicensesWindow()
        {
            Icon = App.Icon;

            var vbox = new VBox();
            var scroll = new ScrollView(vbox);
            Content = scroll;

            Width = 600;
            Height = 500;

            Title = "Licenses";

            Font labelFont;
            RichTextView rtv;

            // XWT FRAMEWORK
            var lbl = new LinkLabel() { Text = "Xwt Framework", Uri = new Uri("https://github.com/mono/xwt/") };
            labelFont = lbl.Font = lbl.Font.WithScaledSize(2);
            vbox.PackStart(lbl);
            vbox.PackStart(rtv = new RichTextView() { MarginLeft = 8 });
            rtv.LoadText(@"The MIT License (MIT)

            Copyright (c) 2014 Xamarin, Inc

            Permission is hereby granted, free of charge, to any person obtaining a copy
            of this software and associated documentation files (the ""Software""), to deal
            in the Software without restriction, including without limitation the rights
            to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
            copies of the Software, and to permit persons to whom the Software is
            furnished to do so, subject to the following conditions:

            The above copyright notice and this permission notice shall be included in all
            copies or substantial portions of the Software.

            THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
            IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
            FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
            AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
            LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
            OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
            SOFTWARE.", ProperPlainTextFormat.Proper);

            //vbox.PackStart(new LinkLabel() { Font = labelFont, Text = "Splashy Icons", Uri = new Uri("http://splashyfish.com/icons/") });
            //vbox.PackStart(rtv = new RichTextView() { MarginLeft = 8 });
            //rtv.LoadText(@"It's free as in free.", ProperPlainTextFormat.Proper);

            //            vbox.PackStart(new LinkLabel() { Font = labelFont, Text = "DefaultIcon", Uri = new Uri("http://www.defaulticon.com/") });
            //            vbox.PackStart(rtv = new RichTextView() { MarginLeft = 8 });
            //            rtv.LoadText(@"Released under ""Creative Commons Attribution-No Derivative Works 3.0.""
            //No changes where made to the images.", ProperPlainTextFormat.Proper);
            //
            //            vbox.PackStart(new LinkLabel(){ MarginLeft = 14, Text="http://creativecommons.org/licenses/by-nd/3.0/", Uri = new Uri("http://creativecommons.org/licenses/by-nd/3.0/")});
            //            vbox.PackStart(new LinkLabel() { MarginLeft = 14, Text = "http://creativecommons.org/licenses/by-nd/3.0/legalcode", Uri = new Uri("http://creativecommons.org/licenses/by-nd/3.0/legalcode") });

            vbox.PackStart(new LinkLabel() { Font = labelFont, Text = "ZipStorer", Uri = new Uri("http://zipstorer.codeplex.com/") });
            vbox.PackStart(rtv = new RichTextView() { MarginLeft = 8 });
            rtv.LoadText(@"The code/library supplied is totally free for either personal or commercial use, with no warranties.
            Please use the ""Powered by ZipStorer"" logo (below) wherever is possible, pointing to this site.", ProperPlainTextFormat.Proper);
            ImageView imgView;
            vbox.PackStart(imgView = new ImageView(Resources.GetImage("zipstorer.png")));
        }
示例#27
0
        /// <summary>
        /// Initialize components.
        /// </summary>
        public override void _initializeComponents()
        {
            Frame f = new Frame()
            {
                Label = Director.Properties.Resources.ScenarioLabel,
                Padding = 10
            };
            VBox ScenarioSettings = new VBox();

            // Create scenario name
            ScenarioName = new TextEntry();
            ScenarioName.Changed += ScenarioName_Changed;
            ScenarioSettings.PackStart(new Label(Director.Properties.Resources.ScenarioName));
            ScenarioSettings.PackStart(ScenarioName);
            ScenarioSettings.PackStart(InvalidScenarioName);
            f.Content = ScenarioSettings;
            PackStart(f);

            Frame h = new Frame()
            {
                Label = Director.Properties.Resources.RunningOptionsLabel,
                Padding = 10
            };
            VBox RunningOptionsSettings = new VBox();

            // Select scenario run
            PeriodicityRunning = new RadioButton(Director.Properties.Resources.FrequencyLabel);
            TimeDelayRunning = new RadioButton(Director.Properties.Resources.TimeDelayLabel);
            PeriodicityRunning.Group = TimeDelayRunning.Group;
            RunningOptionsSettings.PackStart(PeriodicityRunning);
            RunningOptionsSettings.PackStart(TimeDelayRunning);
            PeriodicityRunning.Group.ActiveRadioButtonChanged += ChangeFrequencyOption;

            // Frequency settings
            RunningOptionsSettings.PackStart(new Label()
            {
                Text = Director.Properties.Resources.RunningPeriodicity
            });
            FrequencyRunning = new ComboBox();
            FrequencyHelper.FillComboBox(FrequencyRunning);
            RunningOptionsSettings.PackStart(FrequencyRunning);
            FrequencyRunning.SelectedIndex = 0;
            FrequencyRunning.SelectionChanged += FrequencyRunning_SelectionChanged;

            // Time delay settings
            RunningOptionsSettings.PackStart(new Label()
            {
                Text = Director.Properties.Resources.TimeDelayInSeconds
            });
            TimeDelay = new TextEntry()
            {
                Text = "0"
            };
            TimeDelay.Changed += delegate
            {
                try
                {
                    ActiveScenario.TimeAfterPrevious = int.Parse(TimeDelay.Text);

                    InvalidTimeDelay.Visible = false;
                }
                catch
                {
                    InvalidTimeDelay.Visible = true;
                }
            };
            RunningOptionsSettings.PackStart(TimeDelay);
            RunningOptionsSettings.PackStart(InvalidTimeDelay);

            // Add to form
            h.Content = RunningOptionsSettings;
            PackStart(h);

            // Scenario information
            ScenarioInformation = new VBox();
            ScrollView ScenarioInformationScrollView = new ScrollView()
            {
                VerticalScrollPolicy = ScrollPolicy.Automatic,
                Content = ScenarioInformation
            };

            Frame si = new Frame()
            {
                Label = Director.Properties.Resources.ScenarioOverview,
                Padding = 10,
                Content = ScenarioInformationScrollView
            };
            PackStart(si, true, true);
        }
示例#28
0
        /// <summary>
        /// Create all checkboxes in VBox layout.
        /// </summary>
        private void _initializeComponents()
        {
            // Create list
            ScenarioCheckboxList = new VBox();

            // Create select all checkbox
            SelectAll = new CheckBox(Director.Properties.Resources.SelectAll);
            SelectAll.Toggled += SelectAll_Toggled;
            ScenarioCheckboxList.PackStart(SelectAll);

            // Create all scenarios checkboxes
            foreach (Scenario s in ActiveServer.Scenarios)
            {
                CheckBoxListItem c = new CheckBoxListItem()
                {
                    ScenarioCheckBox = new CheckBox(s.Name),
                    ScenarioInstance = s
                };
                c.ScenarioCheckBox.Toggled += ScenarioList_Clicked;
                ScenarioCheckboxList.PackStart(c.ScenarioCheckBox);
                CheckBoxes.Add(c);
            }

            // Scroll view
            ListScrollBar = new ScrollView()
            {
                VerticalScrollPolicy = ScrollPolicy.Automatic,
                HorizontalScrollPolicy = ScrollPolicy.Never,
                Content = ScenarioCheckboxList
            };

            // Add as content
            Content = ListScrollBar;
        }
示例#29
0
        private void InitializeUI(BaseScan scan, Image thumbnail)
        {
            mScan = scan;

            Icon = thumbnail;
            Title = scan.Name;

            Buttons.Add(new DialogButton(Command.Cancel));
            Buttons.Add(new DialogButton(Command.Apply));

            Font fontH1 = Font.SystemFont.WithStyle(FontStyle.Oblique).WithSize(16);
            Font fontH2 = fontH1.WithStyle(FontStyle.Normal).WithSize(12);

            VBox mainLayout = new VBox();
            Content = mainLayout;

            HBox overviewLayout = new HBox();
            VBox overviewDataLayout = new VBox();

            ImageView thumbnailView = new ImageView(thumbnail.WithBoxSize(96));
            nameEntryUnedited.Text = scan.Name;
            nameEntryUnedited.Font = fontH1;

            fiberTypeEntryUnedited.Text = scan.FiberType;
            fiberTypeEntryUnedited.Font = fontH2;

            nameEntry.Text = scan.Name;
            nameEntry.Visible = false;
            nameEntry.Font = fontH1;

            fiberTypeEntry.Text = scan.FiberType;
            fiberTypeEntry.Visible = false;
            fiberTypeEntry.Font = fontH2;

            overviewDataLayout.MarginTop = 4;
            overviewDataLayout.MarginLeft = 4;
            overviewDataLayout.PackStart(nameEntryUnedited);
            overviewDataLayout.PackStart(nameEntry);
            overviewDataLayout.PackStart(fiberTypeEntryUnedited);
            overviewDataLayout.PackStart(fiberTypeEntry);

            overviewLayout.PackStart(thumbnailView);
            overviewLayout.PackStart(overviewDataLayout, true, true);

            MetadataView mView = new MetadataView();
            mView.Load(scan);

            ScrollView mViewScroller = new ScrollView { Content = mView, BorderVisible = false };

            mainLayout.PackStart(overviewLayout);
            mainLayout.PackStart(mViewScroller, true, true);
        }
示例#30
0
	  /******************************************
			THIS IS AUTO GENERATED CODE BY GLADEBUILDER
			DO NOT EDIT
			USE THE IMPLEMENTATION CLASS INSTEAD
	  *******************************************/
	  namespace GladeBuilder
示例#31
0
		void Build ()
		{
			Title = Catalog.GetString ("Add Packages");
			Width = 820;
			Height = 520;
			Padding = new WidgetSpacing ();

			// Top part of dialog:
			// Package sources and search.
			var topHBox = new HBox ();
			topHBox.Margin = new WidgetSpacing (8, 5, 6, 5);

			packageSourceComboBox = new ComboBox ();
			packageSourceComboBox.MinWidth = 200;
			topHBox.PackStart (packageSourceComboBox);

			packageSearchEntry = new SearchTextEntry ();
			packageSearchEntry.WidthRequest = 187;
			topHBox.PackEnd (packageSearchEntry);

			this.HeaderContent = topHBox;

			// Middle of dialog:
			// Packages and package information.
			var mainVBox = new VBox ();
			Content = mainVBox;

			var middleHBox = new HBox ();
			middleHBox.Spacing = 0;
			var middleFrame = new FrameBox ();
			middleFrame.Content = middleHBox;
			middleFrame.BorderWidth = new WidgetSpacing (0, 0, 0, 1);
			middleFrame.BorderColor = lineBorderColor;
			mainVBox.PackStart (middleFrame, true, true);

			// Error information.
			var packagesListVBox = new VBox ();
			packagesListVBox.Spacing = 0;
			errorMessageHBox = new HBox ();
			errorMessageHBox.Margin = new WidgetSpacing ();
			errorMessageHBox.BackgroundColor = Colors.Orange;
			errorMessageHBox.Visible = false;
			var errorImage = new ImageView ();
			errorImage.Margin = new WidgetSpacing (10, 0, 0, 0);
			errorImage.Image = ImageService.GetIcon (Stock.Warning, Gtk.IconSize.Menu);
			errorImage.HorizontalPlacement = WidgetPlacement.End;
			errorMessageHBox.PackStart (errorImage);
			errorMessageLabel = new Label ();
			errorMessageLabel.TextColor = Colors.White;
			errorMessageLabel.Margin = new WidgetSpacing (5, 5, 5, 5);
			errorMessageLabel.Wrap = WrapMode.Word;
			errorMessageHBox.PackStart (errorMessageLabel, true);
			packagesListVBox.PackStart (errorMessageHBox);

			// Packages list.
			middleHBox.PackStart (packagesListVBox, true, true);
			packagesListView = new ListView ();
			packagesListView.BorderVisible = false;
			packagesListView.HeadersVisible = false;
			packagesListVBox.PackStart (packagesListView, true, true);

			// Loading spinner.
			var loadingSpinnerHBox = new HBox ();
			loadingSpinnerHBox.HorizontalPlacement = WidgetPlacement.Center;
			var loadingSpinner = new Spinner ();
			loadingSpinner.Animate = true;
			loadingSpinner.MinWidth = 20;
			loadingSpinnerHBox.PackStart (loadingSpinner);

			loadingSpinnerLabel = new Label ();
			loadingSpinnerLabel.Text = Catalog.GetString ("Loading package list...");
			loadingSpinnerHBox.PackEnd (loadingSpinnerLabel);

			loadingSpinnerFrame = new FrameBox ();
			loadingSpinnerFrame.Visible = false;
			loadingSpinnerFrame.BackgroundColor = Colors.White;
			loadingSpinnerFrame.Content = loadingSpinnerHBox;
			loadingSpinnerFrame.BorderWidth = new WidgetSpacing ();
			packagesListVBox.PackStart (loadingSpinnerFrame, true, true);

			// No packages found label.
			var noPackagesFoundHBox = new HBox ();
			noPackagesFoundHBox.HorizontalPlacement = WidgetPlacement.Center;

			var noPackagesFoundLabel = new Label ();
			noPackagesFoundLabel.Text = Catalog.GetString ("No matching packages found.");
			noPackagesFoundHBox.PackEnd (noPackagesFoundLabel);

			noPackagesFoundFrame = new FrameBox ();
			noPackagesFoundFrame.Visible = false;
			noPackagesFoundFrame.BackgroundColor = Colors.White;
			noPackagesFoundFrame.Content = noPackagesFoundHBox;
			noPackagesFoundFrame.BorderWidth = new WidgetSpacing ();
			packagesListVBox.PackStart (noPackagesFoundFrame, true, true);

			// Package information
			packageInfoVBox = new VBox ();
			var packageInfoFrame = new FrameBox ();
			packageInfoFrame.BackgroundColor = packageInfoBackgroundColor;
			packageInfoFrame.BorderWidth = new WidgetSpacing ();
			packageInfoFrame.Content = packageInfoVBox;
			packageInfoVBox.Margin = new WidgetSpacing (15, 12, 15, 12);
			var packageInfoContainerVBox = new VBox ();
			packageInfoContainerVBox.WidthRequest = 240;
			packageInfoContainerVBox.PackStart (packageInfoFrame, true, true);

			var packageInfoScrollView = new ScrollView ();
			packageInfoScrollView.BorderVisible = false;
			packageInfoScrollView.HorizontalScrollPolicy = ScrollPolicy.Never;
			packageInfoScrollView.Content = packageInfoContainerVBox;
			packageInfoScrollView.BackgroundColor = packageInfoBackgroundColor;
			var packageInfoScrollViewFrame = new FrameBox ();
			packageInfoScrollViewFrame.BackgroundColor = packageInfoBackgroundColor;
			packageInfoScrollViewFrame.BorderWidth = new WidgetSpacing (1, 0, 0, 0);
			packageInfoScrollViewFrame.BorderColor = lineBorderColor;
			packageInfoScrollViewFrame.Content = packageInfoScrollView;
			middleHBox.PackEnd (packageInfoScrollViewFrame);

			// Package name and version.
			var packageNameHBox = new HBox ();
			packageInfoVBox.PackStart (packageNameHBox);

			packageNameLabel = new Label ();
			packageNameLabel.Ellipsize = EllipsizeMode.End;
			Font packageInfoSmallFont = packageNameLabel.Font.WithScaledSize (0.8);
			packageNameHBox.PackStart (packageNameLabel, true);

			packageVersionLabel = new Label ();
			packageVersionLabel.TextAlignment = Alignment.End;
			packageNameHBox.PackEnd (packageVersionLabel);

			// Package description.
			packageDescription = new Label ();
			packageDescription.Wrap = WrapMode.Word;
			packageDescription.Font = packageNameLabel.Font.WithScaledSize (0.9);
			packageDescription.BackgroundColor = packageInfoBackgroundColor;
			packageInfoVBox.PackStart (packageDescription);

			// Package id.
			var packageIdHBox = new HBox ();
			packageIdHBox.MarginTop = 7;
			packageInfoVBox.PackStart (packageIdHBox);

			var packageIdLabel = new Label ();
			packageIdLabel.Font = packageInfoSmallFont;
			packageIdLabel.Markup = Catalog.GetString ("<b>Id</b>");
			packageIdHBox.PackStart (packageIdLabel);

			packageId = new Label ();
			packageId.Ellipsize = EllipsizeMode.End;
			packageId.TextAlignment = Alignment.End;
			packageId.Font = packageInfoSmallFont;
			packageIdLink = new LinkLabel ();
			packageIdLink.Ellipsize = EllipsizeMode.End;
			packageIdLink.TextAlignment = Alignment.End;
			packageIdLink.Font = packageInfoSmallFont;
			packageIdHBox.PackEnd (packageIdLink, true);
			packageIdHBox.PackEnd (packageId, true);

			// Package author
			var packageAuthorHBox = new HBox ();
			packageInfoVBox.PackStart (packageAuthorHBox);

			var packageAuthorLabel = new Label ();
			packageAuthorLabel.Markup = Catalog.GetString ("<b>Author</b>");
			packageAuthorLabel.Font = packageInfoSmallFont;
			packageAuthorHBox.PackStart (packageAuthorLabel);

			packageAuthor = new Label ();
			packageAuthor.TextAlignment = Alignment.End;
			packageAuthor.Ellipsize = EllipsizeMode.End;
			packageAuthor.Font = packageInfoSmallFont;
			packageAuthorHBox.PackEnd (packageAuthor, true);

			// Package published
			var packagePublishedHBox = new HBox ();
			packageInfoVBox.PackStart (packagePublishedHBox);

			var packagePublishedLabel = new Label ();
			packagePublishedLabel.Markup = Catalog.GetString ("<b>Published</b>");
			packagePublishedLabel.Font = packageInfoSmallFont;
			packagePublishedHBox.PackStart (packagePublishedLabel);

			packagePublishedDate = new Label ();
			packagePublishedDate.Font = packageInfoSmallFont;
			packagePublishedHBox.PackEnd (packagePublishedDate);

			// Package downloads
			var packageDownloadsHBox = new HBox ();
			packageInfoVBox.PackStart (packageDownloadsHBox);

			var packageDownloadsLabel = new Label ();
			packageDownloadsLabel.Markup = Catalog.GetString ("<b>Downloads</b>");
			packageDownloadsLabel.Font = packageInfoSmallFont;
			packageDownloadsHBox.PackStart (packageDownloadsLabel);

			packageDownloads = new Label ();
			packageDownloads.Font = packageInfoSmallFont;
			packageDownloadsHBox.PackEnd (packageDownloads);

			// Package license.
			var packageLicenseHBox = new HBox ();
			packageInfoVBox.PackStart (packageLicenseHBox);

			var packageLicenseLabel = new Label ();
			packageLicenseLabel.Markup = Catalog.GetString ("<b>License</b>");
			packageLicenseLabel.Font = packageInfoSmallFont;
			packageLicenseHBox.PackStart (packageLicenseLabel);

			packageLicenseLink = new LinkLabel ();
			packageLicenseLink.Text = Catalog.GetString ("View License");
			packageLicenseLink.Font = packageInfoSmallFont;
			packageLicenseHBox.PackEnd (packageLicenseLink);

			// Package project page.
			var packageProjectPageHBox = new HBox ();
			packageInfoVBox.PackStart (packageProjectPageHBox);

			var packageProjectPageLabel = new Label ();
			packageProjectPageLabel.Markup = Catalog.GetString ("<b>Project Page</b>");
			packageProjectPageLabel.Font = packageInfoSmallFont;
			packageProjectPageHBox.PackStart (packageProjectPageLabel);

			packageProjectPageLink = new LinkLabel ();
			packageProjectPageLink.Text = Catalog.GetString ("Visit Page");
			packageProjectPageLink.Font = packageInfoSmallFont;
			packageProjectPageHBox.PackEnd (packageProjectPageLink);

			// Package dependencies
			var packageDependenciesHBox = new HBox ();
			packageInfoVBox.PackStart (packageDependenciesHBox);

			var packageDependenciesLabel = new Label ();
			packageDependenciesLabel.Markup = Catalog.GetString ("<b>Dependencies</b>");
			packageDependenciesLabel.Font = packageInfoSmallFont;
			packageDependenciesHBox.PackStart (packageDependenciesLabel);

			packageDependenciesNoneLabel = new Label ();
			packageDependenciesNoneLabel.Text = Catalog.GetString ("None");
			packageDependenciesNoneLabel.Font = packageInfoSmallFont;
			packageDependenciesHBox.PackEnd (packageDependenciesNoneLabel);

			// Package dependencies list.
			packageDependenciesListHBox = new HBox ();
			packageDependenciesListHBox.Visible = false;
			packageInfoVBox.PackStart (packageDependenciesListHBox);

			packageDependenciesList = new Label ();
			packageDependenciesList.Wrap = WrapMode.WordAndCharacter;
			packageDependenciesList.Margin = new WidgetSpacing (5);
			packageDependenciesList.Font = packageInfoSmallFont;
			packageDependenciesListHBox.PackStart (packageDependenciesList, true);

			// Bottom part of dialog:
			// Show pre-release packages and Close/Add to Project buttons.
			var bottomHBox = new HBox ();
			bottomHBox.Margin = new WidgetSpacing (8, 5, 14, 10);
			bottomHBox.Spacing = 5;
			mainVBox.PackStart (bottomHBox);

			showPrereleaseCheckBox = new CheckBox ();
			showPrereleaseCheckBox.Label = Catalog.GetString ("Show pre-release packages");
			bottomHBox.PackStart (showPrereleaseCheckBox);

			addPackagesButton = new Button ();
			addPackagesButton.MinWidth = 120;
			addPackagesButton.MinHeight = 25;
			addPackagesButton.Label = Catalog.GetString ("Add Package");
			bottomHBox.PackEnd (addPackagesButton);

			var closeButton = new Button ();
			closeButton.MinWidth = 120;
			closeButton.MinHeight = 25;
			closeButton.Label = Catalog.GetString ("Close");
			closeButton.Clicked += (sender, e) => Close ();
			bottomHBox.PackEnd (closeButton);

			packageSearchEntry.SetFocus ();
			packageInfoVBox.Visible = false;
		}
示例#32
0
        private void Build()
        {
            this.Icon = Xwt.Drawing.Image.FromResource("URMSimulator.Resources.urm.png");
            this.Title = "URM Simulator";
            this.Width = 800;
            this.Height = 600;
            this.Padding = 0;

            vbox1 = new VBox();

            vpanned1 = new VPaned();

            te1 = new TextEditor();
            te1.Document.MimeType = "text/x-urm";
            te1.Document.Text = savedContent;
            te1.OnUndoRedoStackChanged += (sender, e) => ReloadMenuAndTitleEnding();

            vpanned1.Panel1.Content = te1;
            vpanned1.Panel1.Resize = true;

            vbox2 = new VBox();

            label1 = new Label("Input:");
            label1.MarginLeft = 5;
            vbox2.PackStart(label1, false);

            entry1 = new TextEntry();
            entry1.PlaceholderText = "0 0 0 0 0 0 0 0 0 0";
            vbox2.PackStart(entry1, false);

            hbox1 = new HBox();

            label2 = new Label("Output:");
            label2.MarginLeft = 5;
            hbox1.PackStart(label2, true);

            label3 = new Label("Register length:");
            hbox1.PackStart(label3, false);

            sb1 = new SpinButton();
            sb1.MinimumValue = 1;
            sb1.Digits = 0;
            sb1.IncrementValue = 1;
            sb1.MaximumValue = 100;
            sb1.Value = regCount;
            sb1.ValueChanged += (sender, e) => regCount = (int)sb1.Value;
            sb1.TextInput += (sender, e) => regCount = (int)sb1.Value;
            hbox1.PackStart(sb1, false);

            vbox2.PackStart(hbox1, false);

            scroll1 = new ScrollView();
            scroll1.HeightRequest = 80;
            scroll1.VerticalScrollPolicy = ScrollPolicy.Never;
            scroll1.BorderVisible = true;

            web1 = new WebView();
            web1.WidthRequest = 2000;
            scroll1.Content = web1;

            vbox2.PackStart(scroll1, true);

            vpanned1.Panel2.Content = vbox2;
            vpanned1.Panel2.Resize = false;

            if (Toolkit.CurrentEngine.Type == ToolkitType.Wpf)
                vpanned1.Position = this.Height - 120;

            vbox1.PackStart(vpanned1, true);

            button1 = new Button("Continue Debugging");
            button1.Visible = false;
            button1.Clicked += (sender, e) => ContinueDebugging();
            vbox1.PackStart(button1, false);

            this.Content = vbox1;
            te1.SetFocus();

            BuildMenu();
        }