void LogEvents(LinkButton button)
		{
			button.Click += delegate
			{
				Log.Write(button, "Click");
			};
		}
Exemple #2
0
			/// <summary>
			/// Raises the click event.
			/// </summary>
			public void OnClick(LinkButton widget, EventArgs e)
			{
				widget.Platform.Invoke(() => widget.OnClick(e));
			}
		Control DisabledButton()
		{
			var control = new LinkButton { Text = "Disabled Button", Enabled = false };
			LogEvents(control);
			return control;
		}
		Control DisabledButtonWithColor()
		{
			var control = new LinkButton { Text = "Disabled Button with color", DisabledTextColor = Colors.Yellow, Enabled = false };
			LogEvents(control);
			return control;
		}
		Control LongerButton()
		{
			var control = new LinkButton { Text = "This is a long(er) button title" };
			LogEvents(control);
			return control;
		}
		Control ColourButton()
		{
			var control = new LinkButton { Text = "Button with Color", TextColor = Colors.Lime };
			LogEvents(control);
			return control;
		}
		Control StretchedButton()
		{
			var control = new LinkButton { Text = "A stretched button" };
			LogEvents(control);
			return control;
		}
		Control NormalButton()
		{
			var control = new LinkButton { Text = "Click Me" };
			LogEvents(control);
			return control;
		}
Exemple #9
0
        void RenderContent()
        {
            var linkButtonCreditIcons = new LinkButton { Text = "VisualPharm" };
            linkButtonCreditIcons.Click += delegate { Process.Start("http://www.visualpharm.com"); };

            ButtonShowThirdPartyLicenses.Click += delegate {
                if (CheckThirdPartyLicensesAvailability()) {
                    Process.Start(Utilities.PathDirectoryThirdPartyLicenses);
                }
            };

            var dynamicLayoutMain = new DynamicLayout { Padding = new Padding(Utilities.Padding6), Spacing = Utilities.Spacing6 };

            dynamicLayoutMain.BeginHorizontal();
            dynamicLayoutMain.BeginVertical();
            dynamicLayoutMain.AddCentered(new ImageView { Image = Utilities.LoadImage("Icon-192x192", true) });
            dynamicLayoutMain.EndVertical();

            dynamicLayoutMain.BeginVertical();
            dynamicLayoutMain.Add(new TableLayout(
                new TableRow(
                    new Label {
                        Text = Desktop.Properties.Resources.TextClientName,
                        TextAlignment = TextAlignment.Center,
                        Font = new Font(SystemFont.Default, Utilities.FontSize3)
                    }
                ),

                new TableRow(
                    new Label {
                        Text = "v" + Utilities.ApplicationVersionString,
                        TextAlignment = TextAlignment.Center
                    }
                ),

                new Panel { Height = Utilities.Padding3 },

                new TableRow(
                    TextAreaLicense
                ) { ScaleHeight = true },

                new Panel { Height = Utilities.Padding3 },

                new TableRow(
                    new TableRow(
                        new TableCell(
                            new TableLayout(
                                new TableRow(
                                    new TableCell(new Label { Text = Desktop.Properties.Resources.AboutWindowCreditIcons + " " }, true)
                                ),
                                new TableRow(
                                    new TableCell(linkButtonCreditIcons, true)
                                )
                            ),
                            true
                        ),

                        new TableCell(ButtonShowThirdPartyLicenses)
                    )
                )
            ));
            dynamicLayoutMain.EndVertical();
            dynamicLayoutMain.EndHorizontal();

            Content = dynamicLayoutMain;
        }
Exemple #10
0
		protected virtual void LogEvents(LinkButton control)
		{
			control.Click += delegate
			{
				Log.Write(control, "Click");
			};

			LogEvents((Control)control);
		}
Exemple #11
0
		Control LinkButtonControl()
		{
			var control = new LinkButton { Text = "Link Button" };
			LogEvents(control);
			return control;
		}