示例#1
0
        private void _WorkbookView_RangeSelectionChanged(object sender, RangeSelectionChangedEventArgs e)
        {
            Bold = _WorkbookView.RangeSelection.Font.Bold;
            Italic = _WorkbookView.RangeSelection.Font.Italic;
            Underline = _WorkbookView.RangeSelection.Font.Underline != SpreadsheetGear.UnderlineStyle.None;
            Locked = _WorkbookView.RangeSelection.Locked;
            HorizontalAlignment = _WorkbookView.RangeSelection.HorizontalAlignment;
            HorizontalAlignmentLeft = _WorkbookView.RangeSelection.HorizontalAlignment == HAlign.Left;
            HorizontalAlignmentCenter = _WorkbookView.RangeSelection.HorizontalAlignment == HAlign.Center;
            HorizontalAlignmentRight = _WorkbookView.RangeSelection.HorizontalAlignment == HAlign.Right;
            VerticalAlignment = _WorkbookView.RangeSelection.VerticalAlignment;
            VerticalAlignmentTop = _WorkbookView.RangeSelection.VerticalAlignment == VAlign.Top;
            VerticalAlignmentCenter = _WorkbookView.RangeSelection.VerticalAlignment == VAlign.Center;
            VerticalAlignmentBottom = _WorkbookView.RangeSelection.VerticalAlignment == VAlign.Bottom;

            OnPropertyChanged(nameof(Bold));
            OnPropertyChanged(nameof(Italic));
            OnPropertyChanged(nameof(Underline));
            OnPropertyChanged(nameof(Locked));

            OnPropertyChanged(nameof(HorizontalAlignment));
            OnPropertyChanged(nameof(HorizontalAlignmentLeft));
            OnPropertyChanged(nameof(HorizontalAlignmentCenter));
            OnPropertyChanged(nameof(HorizontalAlignmentRight));

            OnPropertyChanged(nameof(VerticalAlignment));
            OnPropertyChanged(nameof(VerticalAlignmentTop));
            OnPropertyChanged(nameof(VerticalAlignmentCenter));
            OnPropertyChanged(nameof(VerticalAlignmentBottom));
        }
示例#2
0
		private void RangeSlider_RangeSelectionChanged(object sender, RangeSelectionChangedEventArgs e)
		{
			if (_openFile == null)
			{
				RangeLabel.Content = "Choose video file. Menu - File - Open";
				return;
			}
			if (e.NewRangeStop < e.NewRangeStart) // Warning! Shit
				e.NewRangeStop = e.NewRangeStart + 1;
			_from = (int)(e.NewRangeStart);
			_to = (int)(e.NewRangeStop);
			if (_from != _prevFrom)
				ThumbStart.Source = _thumbs.GetThumb(TimeSpan.FromSeconds(_from));
			if (_to != _prevTo)
				ThumbStop.Source = _thumbs.GetThumb(TimeSpan.FromSeconds(_to));
			_prevFrom = _from;
			_prevTo = _to;
			RangeLabel.Content = String.Format("Choose range for Gif: {0} - {1}", TimeSpan.FromSeconds(_from), TimeSpan.FromSeconds(_to));
		}
 //event handler for the range selection changed
 void RangeSliderRangeSelectionChanged(object sender, RangeSelectionChangedEventArgs e)
 {
     rangeSliderSelectedValue1.Text = new DateTime(e.NewRangeStart).ToString();
     rangeSliderSelectedValue2.Text = new DateTime(e.NewRangeStop).ToString();
 }
示例#4
0
        private void rangeSlider_RangeSelectionChanged(object sender, RangeSelectionChangedEventArgs e)
        {
            if (PositionA_TextBox != null && PositionB_TextBox != null)
            {
                PositionA_TextBox.Text = e.NewRangeStart.ToString();
                PositionB_TextBox.Text = e.NewRangeStop.ToString();
            }

            if (_Effect != null)
            {
                _Effect.LowerBound = (double)(e.NewRangeStart) / (double)(rangeSlider.RangeStop);
                _Effect.UpperBound = (double)(e.NewRangeStop) / (double)(rangeSlider.RangeStop);
            }
        }