private bool ReturnToMainScreen() { if (changed) { var alert = new AlertDialog.Builder(this).Create(); var alertView = LayoutInflater.Inflate(Resource.Layout.confirmationPopup, null); alertView.FindViewById <TextView>(Resource.Id.textView2).Text = _vacationsViewModel.Localaizer.Localize("confirmationChange"); alertView.FindViewById <Button>(Resource.Id.confirmation_popup_cancel_button).Text = _vacationsViewModel.Localaizer.Localize("cancel_button"); alertView.FindViewById <Button>(Resource.Id.confirmation_popup_ok_button).Text = _vacationsViewModel.Localaizer.Localize("ok_button"); alertView.FindViewById <TextView>(Resource.Id.textView2).Typeface = FontLoader.GetFontBold(this); alertView.FindViewById <Button>(Resource.Id.confirmation_popup_cancel_button).Typeface = FontLoader.GetFontNormal(this); alertView.FindViewById <Button>(Resource.Id.confirmation_popup_ok_button).Typeface = FontLoader.GetFontNormal(this); alertView.FindViewById <Button>(Resource.Id.confirmation_popup_cancel_button).Click += (s, e) => { alert.Hide(); alert.Cancel(); Exit(); }; alertView.FindViewById <Button>(Resource.Id.confirmation_popup_ok_button).Click += async(s, e) => { alert.Hide(); alert.Cancel(); await Save(); }; alert.SetView(alertView); alert.Show(); return(false); } ViewDispose(); return(true); }
public override View GetView(int position, View convertView, ViewGroup parent) { View view = convertView; if (view == null) { view = _context.LayoutInflater.Inflate(Resource.Layout.VTSListItem, parent, false); } VTSModel item = this[position]; view.FindViewById <TextView>(Resource.Id.VacationType).Text = item.VacationType; view.FindViewById <TextView>(Resource.Id.VacationType).Typeface = FontLoader.GetFontBold(_context); view.FindViewById <TextView>(Resource.Id.Date).Text = item.Date; view.FindViewById <TextView>(Resource.Id.Date).Typeface = FontLoader.GetFontNormal(_context); var imageStatus = view.FindViewById <ImageView>(Resource.Id.Status); if (item.Status.Equals(VacationStatus.Approved.ToString())) { imageStatus.SetImageResource(Resource.Drawable.greencircle); } else { if (item.Status.Equals(VacationStatus.Rejected.ToString())) { imageStatus.SetImageResource(Resource.Drawable.redcircle); } else { imageStatus.SetImageResource(Resource.Drawable.greycircle); } } return(view); }
private void ShowConfirmation(VTSModel vts) { var alert = new AlertDialog.Builder(this).Create(); var alertView = LayoutInflater.Inflate(Resource.Layout.confirmationPopup, null); alertView.FindViewById <TextView>(Resource.Id.textView2).Text = _vacationsViewModel.Localaizer.Localize("confirmDelete"); alertView.FindViewById <Button>(Resource.Id.confirmation_popup_cancel_button).Text = _vacationsViewModel.Localaizer.Localize("cancel_button"); alertView.FindViewById <Button>(Resource.Id.confirmation_popup_ok_button).Text = _vacationsViewModel.Localaizer.Localize("delButton"); alertView.FindViewById <TextView>(Resource.Id.textView2).Typeface = FontLoader.GetFontBold(this); alertView.FindViewById <Button>(Resource.Id.confirmation_popup_cancel_button).Typeface = FontLoader.GetFontNormal(this); alertView.FindViewById <Button>(Resource.Id.confirmation_popup_ok_button).Typeface = FontLoader.GetFontNormal(this); alertView.FindViewById <Button>(Resource.Id.confirmation_popup_cancel_button).Click += (s, e) => { alert.Hide(); alert.Cancel(); }; alertView.FindViewById <Button>(Resource.Id.confirmation_popup_ok_button).Click += async(s, e) => { alert.Hide(); alert.Cancel(); await Delete(vts); }; alert.SetView(alertView); alert.Show(); }
private void LoadFonts() { _epamConfidential.Font = FontLoader.GetFontLight(); _loginButton.Font = _titleView.Font = FontLoader.GetFontBold(); _errorLabel.Font = _userName.Font = _password.Font = FontLoader.GetFontNormal(); }
protected void LoadFonts() { _employee.Font = FontLoader.GetFontNormal(); _vacationType.Font = FontLoader.GetFontNormal(); _approver.Font = FontLoader.GetFontNormal(); _duration.Font = FontLoader.GetFontNormal(); _vacationStatus.Font = FontLoader.GetFontNormal(); _vacationError.Font = FontLoader.GetFontNormal(); _vacationPickImageFromGallery.Font = FontLoader.GetFontNormal(); _vacationPickImageFromCamera.Font = FontLoader.GetFontNormal(); _labelEmployee.Font = FontLoader.GetFontBold(); _labelVacationType.Font = FontLoader.GetFontBold(); _labelApprover.Font = FontLoader.GetFontBold(); _labelDuration.Font = FontLoader.GetFontBold(); _labelVacationStatus.Font = FontLoader.GetFontBold(); _labelAttachments.Font = FontLoader.GetFontBold(); }
private void InintControl() { _employee = FindViewById <TextView>(Resource.Id.ItemEmployee); _vacationType = FindViewById <TextView>(Resource.Id.ItemType); _approver = FindViewById <TextView>(Resource.Id.ItemApprover); _vacationStartDateBtn = FindViewById <Button>(Resource.Id.ItemStartDateBtn); _vacationEndDateBtn = FindViewById <Button>(Resource.Id.ItemEndDateBtn); _duration = FindViewById <TextView>(Resource.Id.ItemDuration); _vacationStatus = FindViewById <TextView>(Resource.Id.ItemStatus); _vacationError = FindViewById <TextView>(Resource.Id.ItemError); _vacationImageView = FindViewById <ImageView>(Resource.Id.ItemImageView); _vacationPickImageFromGallery = FindViewById <Button>(Resource.Id.ItemPickImageFromGallery); _vacationPickImageFromCamera = FindViewById <Button>(Resource.Id.ItemPickImageFromCamera); _labelEmployee = FindViewById <TextView>(Resource.Id.LabelEmployee); _lavelVacationType = FindViewById <TextView>(Resource.Id.LabelType); _labelApprover = FindViewById <TextView>(Resource.Id.LabelApprover); _labelDuration = FindViewById <TextView>(Resource.Id.LabelDuration); _labelVacationStatus = FindViewById <TextView>(Resource.Id.LabelStatus); _labelAttachments = FindViewById <TextView>(Resource.Id.LabelAttachment); _employee.Typeface = FontLoader.GetFontNormal(this); _vacationType.Typeface = FontLoader.GetFontNormal(this); _approver.Typeface = FontLoader.GetFontNormal(this); _vacationStartDateBtn.Typeface = FontLoader.GetFontNormal(this); _vacationEndDateBtn.Typeface = FontLoader.GetFontNormal(this); _duration.Typeface = FontLoader.GetFontNormal(this); _vacationStatus.Typeface = FontLoader.GetFontNormal(this); _vacationError.Typeface = FontLoader.GetFontNormal(this); _vacationPickImageFromGallery.Typeface = FontLoader.GetFontNormal(this); _vacationPickImageFromCamera.Typeface = FontLoader.GetFontNormal(this); _labelEmployee.Typeface = FontLoader.GetFontBold(this); _lavelVacationType.Typeface = FontLoader.GetFontBold(this); _labelApprover.Typeface = FontLoader.GetFontBold(this); _labelDuration.Typeface = FontLoader.GetFontBold(this); _labelVacationStatus.Typeface = FontLoader.GetFontBold(this); _labelAttachments.Typeface = FontLoader.GetFontBold(this); _vacationStartDateBtn.Click += delegate { ShowDialog(from); }; _vacationEndDateBtn.Click += delegate { ShowDialog(to); }; _vacationPickImageFromGallery.Click += onVacationPickImageFromGalleryClick; _vacationImageView.Click += onVacationPickImageFromGalleryClick; _vacationPickImageFromCamera.Click += onVacationPickImageFromCameraClick; }
public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath) { UITableViewCell cell = tableView.DequeueReusableCell(cellIdentifier); var cellStyle = UITableViewCellStyle.Value1; if (cell == null) { cell = new UITableViewCell(cellStyle, cellIdentifier); } cell.TextLabel.Text = tableItems[indexPath.Row].VacationType; if (cellStyle == UITableViewCellStyle.Subtitle || cellStyle == UITableViewCellStyle.Value1 || cellStyle == UITableViewCellStyle.Value2) { cell.DetailTextLabel.Text = tableItems[indexPath.Row].Date; if (tableItems[indexPath.Row].Status.Equals(VacationStatus.Approved.ToString())) { cell.DetailTextLabel.TextColor = UIColor.Green; } else { if (tableItems[indexPath.Row].Status.Equals(VacationStatus.Rejected.ToString())) { cell.DetailTextLabel.TextColor = UIColor.Red; } else { cell.DetailTextLabel.TextColor = UIColor.Gray; } } } if (cellStyle != UITableViewCellStyle.Value2) { cell.ImageView.Image = UIImage.FromFile("Images/person.png"); } cell.Accessory = UITableViewCellAccessory.DisclosureIndicator; cell.DetailTextLabel.Font = FontLoader.GetFontSmall(); cell.TextLabel.Font = FontLoader.GetFontBold(); return(cell); }
private async Task FillData(View view) { _vacationsViewModel = FactorySingleton.Factory.Get <VacationsViewModel>(); _vacationInfo = await _vacationsViewModel.CreateDraftVacationInfo(); view.FindViewById <TextView>(Resource.Id.ItemEmployee).Text = _vacationInfo.Employee.FullName; view.FindViewById <TextView>(Resource.Id.ItemApprover).Text = _vacationInfo.Approver.FullName; view.FindViewById <TextView>(Resource.Id.ItemDuration).Text = String.Format("{0} {1}", ConverterHelper.CalculateDuration(DateTime.Now.Date, DateTime.Now.Date), _vacationsViewModel.Localaizer.Localize("days")); view.FindViewById <TextView>(Resource.Id.ItemStatus).Text = _vacationInfo.Status.Value; view.FindViewById <TextView>(Resource.Id.ItemEmployee).Typeface = FontLoader.GetFontNormal((Activity)_container.Context); view.FindViewById <TextView>(Resource.Id.ItemType).Typeface = FontLoader.GetFontNormal((Activity)_container.Context); view.FindViewById <TextView>(Resource.Id.ItemApprover).Typeface = FontLoader.GetFontNormal((Activity)_container.Context); view.FindViewById <Button>(Resource.Id.ItemStartDateBtn).Typeface = FontLoader.GetFontNormal((Activity)_container.Context); view.FindViewById <Button>(Resource.Id.ItemEndDateBtn).Typeface = FontLoader.GetFontNormal((Activity)_container.Context); view.FindViewById <TextView>(Resource.Id.ItemDuration).Typeface = FontLoader.GetFontNormal((Activity)_container.Context); view.FindViewById <TextView>(Resource.Id.ItemStatus).Typeface = FontLoader.GetFontNormal((Activity)_container.Context); view.FindViewById <TextView>(Resource.Id.ItemError).Typeface = FontLoader.GetFontNormal((Activity)_container.Context); view.FindViewById <Button>(Resource.Id.ItemPickImageFromGallery).Typeface = FontLoader.GetFontNormal((Activity)_container.Context); view.FindViewById <Button>(Resource.Id.ItemPickImageFromCamera).Typeface = FontLoader.GetFontNormal((Activity)_container.Context); view.FindViewById <TextView>(Resource.Id.LabelEmployee).Typeface = FontLoader.GetFontBold((Activity)_container.Context); view.FindViewById <TextView>(Resource.Id.LabelType).Typeface = FontLoader.GetFontBold((Activity)_container.Context); view.FindViewById <TextView>(Resource.Id.LabelApprover).Typeface = FontLoader.GetFontBold((Activity)_container.Context); view.FindViewById <TextView>(Resource.Id.LabelDuration).Typeface = FontLoader.GetFontBold((Activity)_container.Context); view.FindViewById <TextView>(Resource.Id.LabelStatus).Typeface = FontLoader.GetFontBold((Activity)_container.Context); view.FindViewById <TextView>(Resource.Id.LabelAttachment).Typeface = FontLoader.GetFontBold((Activity)_container.Context); }
private void LoadFonts() { _epamConfidential.Typeface = FontLoader.GetFontLight(this); _loginButton.Typeface = _vtsTitle.Typeface = FontLoader.GetFontBold(this); _error.Typeface = _userName.Typeface = _password.Typeface = FontLoader.GetFontNormal(this); }