示例#1
0
        private void RenderTimes(HtmlTextWriter output)
        {
            output.AddAttribute("width", "25px");
            output.AddAttribute("rowspan", "100");
            output.AddAttribute("valign", "top");
            output.RenderBeginTag("td");

            output.RenderBeginTag("table");
            string hour = "";

            //dummy cell to allow for names on header
            output.RenderBeginTag("tr");
            output.AddAttribute("class", "DiaryEmployeeNameSmall");
            output.AddAttribute("colspan", "2");
            output.AddAttribute("valign", "top");
            output.AddStyleAttribute("height", RowHeight.ToString() + "px");
            output.RenderBeginTag("td");
            output.RenderEndTag(); // td
            output.RenderEndTag(); // tr

            for (DateTime time = GetEarliestStartTime(CurrentDate); time < GetLatestFinishTime(CurrentDate);)
            {
                // create a new row
                output.AddAttribute("Height", RowHeight.ToString());
                output.RenderBeginTag("tr");

                // create a cell in the row for the time
                string ApptTime = time.ToString("HH:mm");

                if (ApptTime.Substring(0, 2) != hour)
                {
                    hour = ApptTime.Substring(0, 2);

                    output.AddAttribute("class", "DiaryTimeHour");
                    output.AddAttribute("rowspan", "4");
                    output.AddAttribute("style", String.Format("width:20px;height:{0}px;", RowHeight));
                    output.AddAttribute("valign", "middle");
                    output.RenderBeginTag("td");
                    output.Write(ApptTime.Substring(0, 2));
                    output.RenderEndTag();//td
                }

                output.AddAttribute("class", "DiaryTimeMinute");
                output.AddAttribute("style", "width:12px");
                output.RenderBeginTag("td");
                output.Write(ApptTime.Substring(3, 2));
                output.RenderEndTag(); //td

                output.RenderEndTag(); // tr
                time = time.AddMinutes(15);
            }

            output.RenderEndTag(); //table
            output.RenderEndTag(); // td
        }
示例#2
0
        public string Get(string propertyName)
        {
            switch (propertyName)
            {
            //ELEMENT
            case nameof(ClassId):
                return(ClassId.ToString());

            case nameof(AutomationId):
                return(AutomationId.ToString());

            case nameof(Id):
                return(Id.ToString());

            case nameof(StyleId):
                return(StyleId.ToString());

            //VISUAL ELEMENT
            case nameof(AnchorX):
                return(AnchorX.ToString());

            case nameof(AnchorY):
                return(AnchorY.ToString());

            case nameof(BackgroundColor):
                return(BackgroundColor.ToHex());

            case nameof(Width):
                return(this.Width.ToString());

            case nameof(Height):
                return(this.Height.ToString());

            case nameof(IsEnabled):
                return(IsEnabled.ToString());

            case nameof(WidthRequest):
                return(this.WidthRequest.ToString());

            case nameof(HeightRequest):
                return(this.HeightRequest.ToString());

            case nameof(IsFocused):
                return(IsFocused.ToString());

            case nameof(IsVisible):
                return(IsVisible.ToString());

            case nameof(InputTransparent):
                return(InputTransparent.ToString());

            case nameof(X):
                return(this.X.ToString());

            case nameof(Y):
                return(this.Y.ToString());

            case nameof(Opacity):
                return(this.Opacity.ToString());

            case nameof(TranslationX):
                return(this.TranslationX.ToString());

            case nameof(TranslationY):
                return(this.TranslationY.ToString());

            case nameof(Rotation):
                return(this.Rotation.ToString());

            case nameof(RotationX):
                return(this.RotationX.ToString());

            case nameof(RotationY):
                return(this.RotationY.ToString());

            case nameof(Scale):
                return(this.Scale.ToString());

            //VIEW
            case nameof(Margin):
                return(this.Margin.ToString());

            case nameof(VerticalOptions):
                return(this.VerticalOptions.ToString());

            case nameof(HorizontalOptions):
                return(this.HorizontalOptions.ToString());

            //ITEMSVIEW
            case nameof(ItemsSource):
                return(ItemsSource.OfType <object>().Select(x => x.ToString()).Aggregate((x, y) => x + "," + y));

            //LISTVIEW
            case nameof(HasUnevenRows):
                return(HasUnevenRows.ToString());

            case nameof(IsGroupingEnabled):
                return(IsGroupingEnabled.ToString());

            case nameof(RowHeight):
                return(RowHeight.ToString());

            case nameof(Footer):
                return(Footer.ToString());

            case nameof(Header):
                return(Header.ToString());

            case nameof(IsPullToRefreshEnabled):
                return(IsPullToRefreshEnabled.ToString());

            case nameof(IsRefreshing):
                return(IsRefreshing.ToString());

            case nameof(SelectedItem):
                return(SelectedItem.ToString());

            case nameof(SeparatorColor):
                return(SeparatorColor.ToHex());

            case nameof(this.SeparatorVisibility):
                return(SeparatorVisibility.ToString());

            default:
                return(string.Empty);
            }
        }
示例#3
0
        public string Get(string propertyName)
        {
            switch (propertyName)
            {
            //ELEMENT
            case nameof(ClassId):
                return(ClassId.ToString());

            case nameof(AutomationId):
                return(AutomationId.ToString());

            case nameof(Id):
                return(Id.ToString());

            case nameof(StyleId):
                return(StyleId.ToString());

            //VISUAL ELEMENT
            case nameof(AnchorX):
                return(AnchorX.ToString());

            case nameof(AnchorY):
                return(AnchorY.ToString());

            case nameof(BackgroundColor):
                return(BackgroundColor.ToHex());

            case nameof(Width):
                return(this.Width.ToString());

            case nameof(Height):
                return(this.Height.ToString());

            case nameof(IsEnabled):
                return(IsEnabled.ToString());

            case nameof(WidthRequest):
                return(this.WidthRequest.ToString());

            case nameof(HeightRequest):
                return(this.HeightRequest.ToString());

            case nameof(IsFocused):
                return(IsFocused.ToString());

            case nameof(IsVisible):
                return(IsVisible.ToString());

            case nameof(InputTransparent):
                return(InputTransparent.ToString());

            case nameof(X):
                return(this.X.ToString());

            case nameof(Y):
                return(this.Y.ToString());

            case nameof(Opacity):
                return(this.Opacity.ToString());

            case nameof(TranslationX):
                return(this.TranslationX.ToString());

            case nameof(TranslationY):
                return(this.TranslationY.ToString());

            case nameof(Rotation):
                return(this.Rotation.ToString());

            case nameof(RotationX):
                return(this.RotationX.ToString());

            case nameof(RotationY):
                return(this.RotationY.ToString());

            case nameof(Scale):
                return(this.Scale.ToString());

            //VIEW
            case nameof(Margin):
                return(this.Margin.ToString());

            case nameof(VerticalOptions):
                return(this.VerticalOptions.ToString());

            case nameof(HorizontalOptions):
                return(this.HorizontalOptions.ToString());

            //TABLEVIEW
            case nameof(HasUnevenRows):
                return(HasUnevenRows.ToString());

            case nameof(Intent):
                return(Intent.ToString());

            case nameof(RowHeight):
                return(RowHeight.ToString());

            case nameof(Model):
                return(Model.ToString());

            default:
                return(string.Empty);
            }
        }
示例#4
0
        private void RenderEmptyCells(HtmlTextWriter output)
        {
            for (DateTime time = GetEarliestStartTime(CurrentDate); time < GetLatestFinishTime(CurrentDate);)
            {
                // create a new row
                output.AddAttribute("Height", RowHeight.ToString());
                output.RenderBeginTag("tr");

                if (DiaryType == CalendarType.DayView)
                {
                    TeamViewCountEventArgs args = new TeamViewCountEventArgs(1);
                    RaiseMultiCount(args);

                    // add a column for each staff member
                    for (int i = 0; i < args.Count; i++)
                    {
                        TeamViewGetEventArgs headerArgs = new TeamViewGetEventArgs(i);
                        RaiseMultiCountHeader(headerArgs);

                        output.AddAttribute("class", "DiaryEmpteCellTD");
                        output.AddStyleAttribute("width", String.Format("{0}px", ColumnWidth));
                        output.AddAttribute("colspan", "1");
                        output.RenderBeginTag("td");

                        if (true) //appts.Options.AllowCreateAppointment(CurrentDate, t))
                        {
                            output.AddAttribute("class", "DiaryAppointmentFree");
                            output.AddAttribute("onclick", "javascript:" + Page.ClientScript.GetPostBackEventReference(this, String.Format("EC:{0} {1}", time.ToString("HH:mm"), i)));
                        }
                        //else
                        //{
                        //    output.AddAttribute("class", "DiaryNotWorking");
                        //}

                        output.AddStyleAttribute("width", String.Format("{0}px", ColumnWidth - 2));
                        output.AddStyleAttribute("height", String.Format("{0}px", RowHeight - 2));
                        output.RenderBeginTag("div");
                        output.RenderEndTag(); //div

                        output.RenderEndTag(); //td
                    }
                }
                else
                {
                    DateTime currentDate = CurrentDate;

                    for (int i = 1; i <= ColumnCount; i++)
                    {
                        output.AddAttribute("class", "DiaryEmpteCellTD");
                        output.AddStyleAttribute("width", String.Format("{0}px", ColumnWidth));
                        output.AddAttribute("colspan", "1");
                        output.RenderBeginTag("td");

                        if (true) //therapist != null && therapist.AllowCreateAppointment(currentDate, t))
                        {
                            output.AddAttribute("class", "DiaryAppointmentFree");
                            output.AddAttribute("onclick", "javascript:" + Page.ClientScript.GetPostBackEventReference(this, String.Format("WVEC:{0} {1}", currentDate.ToShortDateString(), time.ToString("HH:mm"))));
                        }
                        //else
                        //{
                        //    output.AddAttribute("class", "DiaryNotWorking");
                        //}

                        output.AddStyleAttribute("width", String.Format("{0}px", ColumnWidth - 2));
                        output.AddStyleAttribute("height", String.Format("{0}px", RowHeight - 2));
                        output.RenderBeginTag("div");
                        output.RenderEndTag(); //div

                        output.RenderEndTag(); //td

                        currentDate = currentDate.AddDays(1);
                    }
                }

                output.RenderEndTag(); // tr

                time = time.AddMinutes(15);
            }
        }