예제 #1
0
        protected override void OnRightToLeftChanged(EventArgs e)
        {
            System.Windows.Forms.RightToLeft value = base.RightToLeft;
            if (value == RightToLeft.Inherit)
            {
                Control rtlSource = this.Parent;
                while (rtlSource != null && rtlSource.RightToLeft == RightToLeft.Inherit)
                {
                    rtlSource = rtlSource.Parent;
                }
                value = (rtlSource != null) ? rtlSource.RightToLeft : RightToLeft.No;

                if (value == RightToLeft.Yes)
                {
                    RTL = true;
                }
                else
                {
                    RTL = false;
                }
            }
            if (value == RightToLeft.No)
            {
                RTL = false;
            }
            else if (value == RightToLeft.Yes)
            {
                RTL = true;
            }
        }
예제 #2
0
 public OneFieldOfRoomForm(int RoomKey, int ClassId, int StartTime, int DayNo)
 {
     InitializeComponent();
     _roomKey     = RoomKey;
     _classId     = ClassId;
     _startTime   = StartTime;
     _dayNo       = DayNo;
     _RightToLeft = System.Globalization.CultureInfo.CurrentCulture.TextInfo.IsRightToLeft ?
                    System.Windows.Forms.RightToLeft.Yes : System.Windows.Forms.RightToLeft.No;
 }
 public OneFieldOfRoomForm(int RoomKey, int ClassId, int StartTime, int DayNo)
 {
     InitializeComponent();
     _roomKey = RoomKey;
     _classId = ClassId;
     _startTime = StartTime;
     _dayNo = DayNo;
     _RightToLeft = System.Globalization.CultureInfo.CurrentCulture.TextInfo.IsRightToLeft ?
         System.Windows.Forms.RightToLeft.Yes : System.Windows.Forms.RightToLeft.No;
 }
예제 #4
0
        /// <summary>
        ///     Translator for RightToLeft
        /// </summary>
        private static void RightToLeftPropertyTranslator(object host, string propertyName, object value)
        {
            ElementHost elementHost = host as ElementHost;

            if (elementHost != null)
            {
                AvalonAdapter adapter = elementHost.HostContainerInternal;
                if (adapter != null && value is SWF.RightToLeft)
                {
                    SWF.RightToLeft  fromRTL         = (SWF.RightToLeft)value;
                    SW.FlowDirection toFlowDirection = ((fromRTL == SWF.RightToLeft.Yes) ? SW.FlowDirection.RightToLeft : SW.FlowDirection.LeftToRight);
                    adapter.FlowDirection = toFlowDirection;
                }
            }
        }