예제 #1
0
        public PicturePage(ImageSource source, HairAppBl.Interfaces.IHairBl hairbl)
        {
            InitializeComponent();

            var navi = new Controls.NavigationControl("Home", "", hairbl);

            NavigationContainer.Content = navi.View;
            navi.LeftButton.Clicked    += LeftButton_Clicked;;

            mImageView.Source = source;
        }
예제 #2
0
        private void InitFields()
        {
            //Title
            mLabelTitle.Text = AppResources.DoYourCareDay + $" {mDefinition.Name}";

            //Description
            DescriptionFrame.IsVisible = false;
            if (!string.IsNullOrEmpty(mDefinition.Description))
            {
                Description.Text           = mDefinition.Description;
                DescriptionFrame.IsVisible = true;
            }

            //Save close
            var saveClose = new Controls.NavigationControl(AppResources.Cancel, AppResources.Save, mHairbl);

            SaveButtonContainer.Content = saveClose.View;

            saveClose.RightButton.Clicked += OKButton_Clicked;
            saveClose.LeftButton.Clicked  += CancelButton_Clicked;

            RefreshList();

            //Needed Time
            UsedTime.Time = mInstance.NeededTime;

            //Comment
            mAddCommentButton.Clicked += AddComment_Clicked;
            mCommentEntry.Text         = mInstance.Comment;
            mCommentFrame.IsVisible    = false;
            if (!String.IsNullOrEmpty(mInstance.Comment))
            {
                ShowComment();
            }

            //Take pic
            takePicButton.Clicked += TakePicture_Clicked;

            PictureListContainer.IsVisible = mInstance.Pictures.Any();
            foreach (var pic in mInstance.Pictures)
            {
                AddPicToAlbum(ImageSource.FromFile(pic.Path));
            }

            //Resources
            mTakePicLabel.Text     = AppResources.TakePic;
            mAddCommentButton.Text = AppResources.AddComment;
            mNeededTimeLabel.Text  = AppResources.NeededTime;
        }