Skip to content

Instantly share code, notes, and snippets.

@gentisaliu
Created October 11, 2012 11:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gentisaliu/3871641 to your computer and use it in GitHub Desktop.
Save gentisaliu/3871641 to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace KontrataDheFatura_KESH.Views.NewContract
{
[DefaultEvent("BackButtonClicked, ForwardButtonClicked, AddContractButtonClicked, DoneButtonClicked")]
[DefaultProperty("BackButtonEnabled, ForwardButtonEnabled, AddContractButtonEnabled, DoneButtonEnabled")]
public partial class Navigation : UserControl
{
public Navigation()
{
InitializeComponent();
}
public bool BackButtonEnbled
{
get
{
return this.back.Enabled;
}
set
{
this.back.Enabled = value;
}
}
public bool ForwardButtonEnabled
{
get
{
return this.forward.Enabled;
}
set
{
this.forward.Enabled = value;
}
}
public bool AddContractButtonEnabled
{
get
{
return this.addContract.Enabled;
}
set
{
this.addContract.Enabled = value;
}
}
public bool DoneButtonEnabled
{
get
{
return this.done.Enabled;
}
set
{
this.done.Enabled = value;
}
}
[Browsable(true)]
[Description("Raised when the back button is clicked.")]
public event EventHandler BackButtonClicked;
[Description("Raised when the forward button is clicked.")]
public event EventHandler ForwardButtonClicked;
[Description("Raised when the add contract button is clicked.")]
public event EventHandler AddContractButtonClicked;
[Description("Raised when the done button is clicked.")]
public event EventHandler DoneButtonClicked;
private void back_Click(object sender, EventArgs e)
{
if (this.BackButtonClicked != null)
{
this.BackButtonClicked(sender, e);
}
}
private void forward_Click(object sender, EventArgs e)
{
if (this.ForwardButtonClicked != null)
{
this.ForwardButtonClicked(sender, e);
}
}
private void addContract_Click(object sender, EventArgs e)
{
if (this.AddContractButtonClicked != null)
{
this.AddContractButtonClicked(sender, e);
}
}
private void done_Click(object sender, EventArgs e)
{
if (this.DoneButtonClicked != null)
{
this.DoneButtonClicked(sender, e);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment