本文整理汇总了C#中ImageButton类的典型用法代码示例。如果您正苦于以下问题:C# ImageButton类的具体用法?C# ImageButton怎么用?C# ImageButton使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ImageButton类属于命名空间,在下文中一共展示了ImageButton类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnCreate
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
SetContentView(Resource.Layout.Response);
userDao = new UserDao();
postService = new PostService();
audioService = new SendAudioService();
deliverPostService = new SendPostService();
actionBar = SupportActionBar;
actionBar.SetHomeButtonEnabled(false);
actionBar.SetDisplayHomeAsUpEnabled(false);
actionBar.SetDisplayUseLogoEnabled(false);
actionBar.SetDisplayShowHomeEnabled(false);
actionBar.Title = "Responder";
chronometer = FindViewById<TextView>(Resource.Id.recording_lenght);
previewRecord = FindViewById<ImageView>(Resource.Id.record_image);
message = FindViewById<EditText>(Resource.Id.criar_topico_conteudo);
submit = FindViewById<Button>(Resource.Id.criar_topico_submit);
submit.Click += new System.EventHandler(submit_Click);
record = FindViewById<ImageButton>(Resource.Id.btn_gravar);
record.Click += new System.EventHandler(record_Click);
ServiceLocator.Dispatcher = new DispatchAdapter(this);
ServiceLocator.Recorder = new RecordAdapter();
timer = new System.Timers.Timer(1000);
timer.Elapsed += new System.Timers.ElapsedEventHandler(timer_Elapsed);
timer.Enabled = true;
}
示例2: lbDelete_Click
protected void lbDelete_Click(object sender, EventArgs e)
{
ImageButton linkButton = new ImageButton();
linkButton = (ImageButton)sender;
bool result = USER_RoleWiseMenuManager.DeleteUSER_RoleWiseMenu(Convert.ToInt32(linkButton.CommandArgument));
USER_RoleWiseMenuManager.LoadUSER_RoleWiseMenuPage(gvUSER_RoleWiseMenu, rptPager, 1, ddlPageSize);
}
示例3: lbDelete_Click
protected void lbDelete_Click(object sender, EventArgs e)
{
ImageButton linkButton = new ImageButton();
linkButton = (ImageButton)sender;
bool result = HR_DesignationManager.DeleteHR_Designation(Convert.ToInt32(linkButton.CommandArgument));
HR_DesignationManager.LoadHR_DesignationPage(gvHR_Designation, rptPager, 1, ddlPageSize);
}
示例4: lbDelete_Click
protected void lbDelete_Click(object sender, EventArgs e)
{
ImageButton linkButton = new ImageButton();
linkButton = (ImageButton)sender;
bool result = ACC_HeadUserManager.DeleteACC_HeadUser(Convert.ToInt32(linkButton.CommandArgument));
ACC_HeadUserManager.LoadACC_HeadUserPage(gvACC_HeadUser, rptPager, 1, ddlPageSize);
}
示例5: OnCreate
protected override void OnCreate(Bundle bundle)
{
base.OnCreate (bundle);
SetContentView (Resource.Layout.PlayAnimation);
ImageView btns = FindViewById<ImageView> (Resource.Id.imgNewLoginHeader);
TextView header = FindViewById<TextView> (Resource.Id.txtFirstScreenHeader);
RelativeLayout relLayout = FindViewById<RelativeLayout> (Resource.Id.relativeLayout1);
ImageHelper.setupTopPanel (btns, header, relLayout, header.Context);
Header.headertext = Application.Context.Resources.GetString (Resource.String.animationPlaybackTitle);
Header.fontsize = 36f;
ImageHelper.fontSizeInfo (header.Context);
header.SetTextSize (Android.Util.ComplexUnitType.Dip, Header.fontsize);
header.Text = Header.headertext;
animationView = FindViewById<WebView> (Resource.Id.animationView);
ImageButton btnBack = FindViewById<ImageButton> (Resource.Id.btnBack);
btnBack.Tag = 0;
btnBack.Click += delegate {
Finish ();
};
ImageButton btnPlay = FindViewById<ImageButton> (Resource.Id.btnPlay);
btnPlay.Tag = 1;
LinearLayout bottom = FindViewById<LinearLayout> (Resource.Id.bottomHolder);
ImageButton[] buttons = new ImageButton[2];
buttons [0] = btnBack;
buttons [1] = btnPlay;
ImageHelper.setupButtonsPosition (buttons, bottom, header.Context);
}
示例6: OnCreateView
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
View view = inflater.Inflate(Resource.Layout.InspectUser, container, false);
//mProfilePic = view.FindViewById<ProfilePictureView>(Resource.Id.profilePic);
mProfilePic = view.FindViewById<RoundedImageView>(Resource.Id.profilePic);
mNameText = view.FindViewById<TextView>(Resource.Id.nameTxt);
addUserAsFriendBtn = view.FindViewById<Button>(Resource.Id.addUserAsFriendsBtn);
trackUserBtn = view.FindViewById<Button>(Resource.Id.trackUserBtn);
topLeftToolbarButton = Activity.FindViewById<Button>(Resource.Id.topToolbarButtonLeft);
topRightToolbarButton = Activity.FindViewById<Button>(Resource.Id.topToolbarButtonRight);
topLeftToolbarImageButton = Activity.FindViewById<ImageButton>(Resource.Id.topToolbarImageButtonLeft);
topRightToolbarImageButton = Activity.FindViewById<ImageButton>(Resource.Id.topToolbarImageButtonRight);
topLeftToolbarButton.Visibility = ViewStates.Gone;
topLeftToolbarImageButton.Visibility = ViewStates.Gone;
topRightToolbarButton.Visibility = ViewStates.Gone;
topRightToolbarImageButton.Visibility = ViewStates.Gone;
addUserAsFriendBtn.Visibility = ViewStates.Invisible;
trackUserBtn.Visibility = ViewStates.Invisible;
//mProfilePic.ProfileId = Profile.CurrentProfile.Id;
webClient = new WebClient();
profilePicUri = new Uri("https://graph.facebook.com/"+Profile.CurrentProfile.Id+"/picture?height=500&width=500");
webClient.DownloadDataAsync(profilePicUri);
webClient.DownloadDataCompleted += WebClient_DownloadDataCompleted;
mNameText.Text = Profile.CurrentProfile.Name;
return view;
}
示例7: OnCreate
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
SetContentView(Resource.Layout.Main);
InitializeHelloWorldServiceClient();
getRandomMonkeyButton = FindViewById<Button>(Resource.Id.getRandomMonkeyButton);
getRandomMonkeyButton.Click += getRandomMonkeyButton_Click;
randomMonkeyLabel = FindViewById<TextView>(Resource.Id.randomMonkeyLabel);
familyText = FindViewById<EditText>(Resource.Id.familyText);
subfamilyText = FindViewById<EditText>(Resource.Id.subfamilyText);
genusText = FindViewById<EditText>(Resource.Id.genusText);
searchButton = FindViewById<ImageButton>(Resource.Id.searchButton);
searchButton.Click += searchButton_Click;
searchResultsList = FindViewById<ListView>(Resource.Id.searchResultsList);
adapter = new Adapters.MonkeyInformationAdapter(this, Enumerable.Empty<MonkeyInformation>());
searchResultsList.Adapter = adapter;
}
示例8: OnCreateView
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
View view = inflater.Inflate(Resource.Layout.InspectEvent, container, false);
titleTextView = view.FindViewById<TextView>(Resource.Id.titleTextView);
timeTextView = view.FindViewById<TextView>(Resource.Id.timeTextView);
distanceTextView = view.FindViewById<TextView>(Resource.Id.distanceTextView);
descriptionTextView = view.FindViewById<TextView>(Resource.Id.descriptionTextView);
currentUsersEventButton = view.FindViewById<Button>(Resource.Id.current_users_event_btn);
eventCreatorIconImageView = view.FindViewById<RoundedImageView>(Resource.Id.eventCreatorIcon);
topLeftToolbarButton = Activity.FindViewById<Button>(Resource.Id.topToolbarButtonLeft);
topRightToolbarButton = Activity.FindViewById<Button>(Resource.Id.topToolbarButtonRight);
topLeftToolbarImageButton = Activity.FindViewById<ImageButton>(Resource.Id.topToolbarImageButtonLeft);
topRightToolbarImageButton = Activity.FindViewById<ImageButton>(Resource.Id.topToolbarImageButtonRight);
topLeftToolbarImageButton.SetImageResource(Resource.Drawable.ic_chevron_left);
topLeftToolbarButton.Visibility = ViewStates.Gone;
topLeftToolbarImageButton.Visibility = ViewStates.Visible;
topRightToolbarButton.Visibility = ViewStates.Gone;
topRightToolbarImageButton.Visibility = ViewStates.Gone;
titleTextView.Text = chosenEvent.Title;
timeTextView.Text = chosenEvent.Time;
distanceTextView.Text = chosenEvent.Position;
descriptionTextView.Text = chosenEvent.Description;
currentUsersEventButton.Text = chosenEvent.CurrentUsers + "/" + chosenEvent.TotalUsers;
currentUsersEventButton.Click += CurrentUsersEventButton_Click;
eventCreatorIconImageView.Click += EventCreatorIconImageView_Click;
return view;
}
示例9: lbDelete_Click
protected void lbDelete_Click(object sender, EventArgs e)
{
ImageButton linkButton = new ImageButton();
linkButton = (ImageButton)sender;
bool result = HR_EmployeeSalaryRulesManager.DeleteHR_EmployeeSalaryRules(Convert.ToInt32(linkButton.CommandArgument));
HR_EmployeeSalaryRulesManager.LoadHR_EmployeeSalaryRulesPage(gvHR_EmployeeSalaryRules, rptPager, 1, ddlPageSize);
}
示例10: OnCreate
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
// Set our view from the "main" layout resource
SetContentView(Resource.Layout.Main);
cs = new ClientSocket(this);
_smsSentBroadcastReceiver = new SMSSentReceiver();
_smsDeliveredBroadcastReceiver = new SMSDeliveredReceiver();
_smsSentBroadcastReceiver.sentErrorReSendEvent += reSend;
_smsDeliveredBroadcastReceiver.deliverErrorReSendEvent += reSend;
ipText = FindViewById<EditText>(Resource.Id.IPText);
connectButton = FindViewById<ImageButton>(Resource.Id.connectImageButton);
connectButton.Click += delegate
{
if (ipText.Text != "") {
cs.Connect(ipText.Text);
}
else {
ipText.SetBackgroundColor(Android.Graphics.Color.Red);
ipText.Error = "Enter IP address!";
}
};
}
示例11: lbDelete_Click
protected void lbDelete_Click(object sender, EventArgs e)
{
ImageButton linkButton = new ImageButton();
linkButton = (ImageButton)sender;
bool result = INV_MRRInfoMasterManager.DeleteINV_MRRInfoMaster(Convert.ToInt32(linkButton.CommandArgument));
INV_MRRInfoMasterManager.LoadINV_MRRInfoMasterPage(gvINV_MRRInfoMaster, rptPager, 1, ddlPageSize);
}
示例12: TileChunkArea
public TileChunkArea(UIManager.UIManager uiManager)
{
var tileChunkArea = uiManager.UIManagerAreas.TileChunkArea = new UIArea<TileChunk>(null, 700, 500, 390, 390) {Closable = true};
tileChunkArea.Visible = false;
uiManager.AddArea(tileChunkArea);
tileChunkArea.AddControl(new TextArea(30, 25, "Tile Chunks") {Color = "blue"});
tileChunkArea.AddControl(chunkPieceList = new ScrollBox(30, 70, 96 - 16, 3, 64) {BackColor = "rgb(50,60,127)"});
TileChunk[] tileChunks = SonicManager.Instance.SonicLevel.TileChunks.Array();
for (int index = 0; index < tileChunks.Length; index++) {
var tileChunk = tileChunks[index];
ImageButton<TileChunk> chunkButton = new ImageButton<TileChunk>(tileChunk, 0, 0, 0, 0);
chunkButton.OnDraw = (cnv, x, y) => {
// chunkButton.Data.DrawUI(cnv, new Point(x, y), new DoublePoint(0.5d, 0.5d), 0);
// chunkButton.Data.DrawUI(cnv, new Point(x, y), new DoublePoint(0.5d, 0.5d), 1);
};
chunkButton.Font = UIManager.UIManager.SmallTextFont;
chunkButton.Text = "Chunk #" + index;
chunkButton.Click = (e) => { tileChunkArea.Data = tileChunk; };
chunkPieceList.AddControl(chunkButton);
}
Image image = new Image(125, 70, 256, 256);
int areaDrawScale = 2;
image.OnDraw += (context, x, y) => {
if (tileChunkArea.Data == null) return;
// tileChunkArea.Data.DrawUI(context, new Point(x, y), new Point(areaDrawScale, areaDrawScale), 0);
// tileChunkArea.Data.DrawUI(context, new Point(x, y), new Point(areaDrawScale, areaDrawScale), 1);
};
image.Click += (e) => {
if (tileChunkArea.Data == null) return;
// var tilePiece = tileChunkArea.Data.GetBlockAt(e.X / areaDrawScale, e.Y / areaDrawScale);
// uiManager.UIManagerAreas.TilePieceArea.Visible = false;
// uiManager.UIManagerAreas.TilePieceArea.Data = tilePiece;
// tilePieceList.ScrollIndex = Math.Max(uiManager.sonicManager.SonicLevel.TilePieces.IndexOf(tilePiece) - 1, 0);
};
tileChunkArea.AddControl(image);
buildTilePiece(uiManager);
/*
var table=tileChunkArea.AddControl(new Table(10, 40, 350, 280));
var row = table.AddRow(new TableRow(50.Percent()));
var cell = row.AddCell(new TableCell(50.Percent(), 50.Percent()));
cell.AddControl(new Button(0, 0, 0, 0, "Text"));
cell = row.AddCell(new TableCell(50.Percent(), 50.Percent()));
cell.AddControl(new Button(0, 0, 0, 0, "Text1"));
row = table.AddRow(new TableRow(100));
cell = row.AddCell(new TableCell(100, 100));
cell.AddControl(new Button(0, 0, 100, 100, "Text"));
cell = row.AddCell(new TableCell(100, 100){FullSize=false});
cell.AddControl(new Button(0, 0, 100, 50, "Text1"));
cell.AddControl(new Button(0, 50, 100, 50, "Text2"));*/
}
示例13: lbClose_Click
protected void lbClose_Click(object sender, EventArgs e)
{
ImageButton linkButton = new ImageButton();
linkButton = (ImageButton)sender;
bool result = STD_ClassManager.HistorySTD_Class(Convert.ToInt32(linkButton.CommandArgument),Profile.card_id);
STD_ClassManager.LoadSTD_ClassPageSearch(gvSTD_Class, rptPager, 1, ddlPageSize, txtClassForSearch.Text);
}
示例14: CreateControls
private void CreateControls()
{
_panel = new Panel();
_panel.CssClass = "panTemper";
_image = new Image();
_image.ImageUrl = "~/Images/Temper1.png";
_image.CssClass = "imgBt";
_panel.Controls.Add(_image);
_imBtAdd = new ImageButton();
_imBtAdd.ImageUrl = "~/Images/up_plus.png";
_imBtAdd.CssClass = "imgBtV";
_imBtAdd.Click += _imBtAdd_Click;
_panel.Controls.Add(_imBtAdd);
_temperLabel = new Label();
_temperLabel.Text = ((ITemperature)_data.Device).Temperature.ToString();
_temperLabel.CssClass = "labelTemperat";
_panel.Controls.Add(_temperLabel);
_imBtDel = new ImageButton();
_imBtDel.ImageUrl = "~/Images/down_minus.png";
_imBtDel.CssClass = "imgBt imgBtV";
_imBtDel.Click += _imBtDel_Click;
_panel.Controls.Add(_imBtDel);
Controls.Add(_panel);
}
示例15: CreateControls
private void CreateControls()
{
_panel = new Panel();
_panel.CssClass = "panVolume";
_image = new Image();
_image.ImageUrl = "~/Images/sound_low.png";
_image.CssClass = "imgBt";
_panel.Controls.Add(_image);
_imBtAdd = new ImageButton();
_imBtAdd.ImageUrl = "~/Images/up_plus.png";
_imBtAdd.CssClass = "imgBtV";
_imBtAdd.Click += _imBtAdd_Click;
_panel.Controls.Add(_imBtAdd);
_volumeLabel = new Label();
_volumeLabel.Text = ((IVolume)_data.Device).Volume.ToString();
_volumeLabel.CssClass = "labelVolume";
_panel.Controls.Add(_volumeLabel);
_imBtDel = new ImageButton();
_imBtDel.ImageUrl = "~/Images/down_minus.png";
_imBtDel.CssClass = "imgBt imgBtV";
_imBtDel.Click += _imBtDel_Click;
_panel.Controls.Add(_imBtDel);
Controls.Add(_panel);
}