示例#1
0
        //public void SetDateFormat(GlobalData.GnosisDateFormat dateFormat)
        //{
        //    if (dateFormat == GlobalData.GnosisDateFormat.SHORT)
        //    {
        //        picker.SelectedDateFormat = DatePickerFormat.Short;
        //    }
        //    else if (dateFormat == GlobalData.GnosisDateFormat.LONG)
        //    {
        //        picker.SelectedDateFormat = DatePickerFormat.Long;
        //    }

        //}

        //public void SetLocked(bool locked)
        //{
        //    if (locked)
        //    {
        //        //replace datepicker with textbox
        //        string text = picker.Text;
        //        picker.Visibility = System.Windows.Visibility.Collapsed;

        //        txtDate.Visibility = System.Windows.Visibility.Visible;
        //        txtDate.Text = text;
        //    }
        //    else
        //    {
        //        if (txtDate.Visibility == System.Windows.Visibility.Visible)
        //        {
        //            string text = txtDate.Text;
        //            txtDate.Visibility = System.Windows.Visibility.Collapsed;

        //            picker.SelectedDate = Convert.ToDateTime(text);
        //            picker.Visibility = System.Windows.Visibility.Visible;
        //        }
        //    }
        //    Locked = locked;
        //}

        public void SetVerticalContentAlignment(GnosisController.VerticalAlignmentType verticalAlignment)
        {
            switch (verticalAlignment)
            {
            case GnosisController.VerticalAlignmentType.TOP:
                picker.VerticalContentAlignment  = VerticalAlignment.Top;
                txtDate.VerticalContentAlignment = VerticalAlignment.Top;
                break;

            case GnosisController.VerticalAlignmentType.CENTRE:
                picker.VerticalContentAlignment  = VerticalAlignment.Center;
                txtDate.VerticalContentAlignment = VerticalAlignment.Center;
                break;

            case GnosisController.VerticalAlignmentType.BOTTOM:
                picker.VerticalContentAlignment  = VerticalAlignment.Bottom;
                txtDate.VerticalContentAlignment = VerticalAlignment.Bottom;
                break;

            case GnosisController.VerticalAlignmentType.STRETCH:
                picker.VerticalContentAlignment  = VerticalAlignment.Stretch;
                txtDate.VerticalContentAlignment = VerticalAlignment.Stretch;
                break;
            }
        }
示例#2
0
        public static void SetVerticalContentAlignmentExt(this Control control, GnosisController.VerticalAlignmentType verticalContentAlignment)
        {
            switch (verticalContentAlignment)
            {
            case GnosisController.VerticalAlignmentType.TOP:
                control.VerticalContentAlignment = System.Windows.VerticalAlignment.Top;
                break;

            case GnosisController.VerticalAlignmentType.CENTRE:
                control.VerticalContentAlignment = System.Windows.VerticalAlignment.Center;
                break;

            case GnosisController.VerticalAlignmentType.BOTTOM:
                control.VerticalContentAlignment = System.Windows.VerticalAlignment.Bottom;
                break;

            case GnosisController.VerticalAlignmentType.STRETCH:
                control.VerticalContentAlignment = VerticalAlignment.Stretch;
                break;
            }
        }
示例#3
0
        public static void SetVerticalAlignmentExt(this FrameworkElement element, GnosisController.VerticalAlignmentType verticalAlignment)
        {
            switch (verticalAlignment)
            {
            case GnosisController.VerticalAlignmentType.TOP:
                element.VerticalAlignment = VerticalAlignment.Top;
                break;

            case GnosisController.VerticalAlignmentType.CENTRE:
                element.VerticalAlignment = VerticalAlignment.Center;
                break;

            case GnosisController.VerticalAlignmentType.BOTTOM:
                element.VerticalAlignment = VerticalAlignment.Bottom;
                break;

            case GnosisController.VerticalAlignmentType.STRETCH:
                element.VerticalAlignment = VerticalAlignment.Stretch;
                break;
            }
        }
        //public void SetTooltip(string tooltip)
        //{
        //    cboTimeZone.ToolTip = tooltip;
        //    datePicker.ToolTip = tooltip;
        //    timePicker.ToolTip = tooltip;
        //}

        public void SetVerticalContentAlignment(GnosisController.VerticalAlignmentType verticalAlignment)
        {
            cboTimeZone.SetVerticalContentAlignmentExt(verticalAlignment);
            datePicker.SetVerticalContentAlignmentExt(verticalAlignment);
            timePicker.SetVerticalContentAlignmentExt(verticalAlignment);
        }
 public void SetVerticalAlignment(GnosisController.VerticalAlignmentType verticalAlignment)
 {
     this.SetVerticalAlignmentExt(verticalAlignment);
 }
示例#6
0
 public void SetVerticalAlignment(GnosisController.VerticalAlignmentType top)
 {
     throw new NotImplementedException();
 }
示例#7
0
 public void SetVerticalContentAlignment(GnosisController.VerticalAlignmentType verticalAlignment)
 {
     btn.SetVerticalContentAlignmentExt(verticalAlignment);
 }
 public void SetCaptionAlignmentVertical(GnosisController.VerticalAlignmentType captionAlignmentVertical)
 {
     throw new NotImplementedException();
 }