Ejemplo n.º 1
0
		void LogEvents(LinkButton button)
		{
			button.Click += delegate
			{
				Log.Write(button, "Click");
			};
		}
Ejemplo n.º 2
0
			/// <summary>
			/// Raises the click event.
			/// </summary>
			public void OnClick(LinkButton widget, EventArgs e)
			{
				widget.Platform.Invoke(() => widget.OnClick(e));
			}
Ejemplo n.º 3
0
		Control DisabledButton()
		{
			var control = new LinkButton { Text = "Disabled Button", Enabled = false };
			LogEvents(control);
			return control;
		}
Ejemplo n.º 4
0
		Control DisabledButtonWithColor()
		{
			var control = new LinkButton { Text = "Disabled Button with color", DisabledTextColor = Colors.Yellow, Enabled = false };
			LogEvents(control);
			return control;
		}
Ejemplo n.º 5
0
		Control LongerButton()
		{
			var control = new LinkButton { Text = "This is a long(er) button title" };
			LogEvents(control);
			return control;
		}
Ejemplo n.º 6
0
		Control ColourButton()
		{
			var control = new LinkButton { Text = "Button with Color", TextColor = Colors.Lime };
			LogEvents(control);
			return control;
		}
Ejemplo n.º 7
0
		Control StretchedButton()
		{
			var control = new LinkButton { Text = "A stretched button" };
			LogEvents(control);
			return control;
		}
Ejemplo n.º 8
0
		Control NormalButton()
		{
			var control = new LinkButton { Text = "Click Me" };
			LogEvents(control);
			return control;
		}
Ejemplo n.º 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;
        }
Ejemplo n.º 10
0
		protected virtual void LogEvents(LinkButton control)
		{
			control.Click += delegate
			{
				Log.Write(control, "Click");
			};

			LogEvents((Control)control);
		}
Ejemplo n.º 11
0
		Control LinkButtonControl()
		{
			var control = new LinkButton { Text = "Link Button" };
			LogEvents(control);
			return control;
		}