private void FontSelectorTitleSelectionChanged(object sender, SelectionChangedEventArgs e) { _fontFamilyTitle = (FontFamily)FontSelectorTitle.SelectedValue; TextBlockExampleTitle.FontFamily = _fontFamilyTitle; Properties.Settings.Default.Plot_Font_Name_Title = _fontFamilyTitle.Source; GraphUc.UpdateStyles(); }
private void InitGraphData() { _grDataSeries1 = new List <KeyValuePair <object, object> >(); _grDataSeries2 = new List <KeyValuePair <object, object> >(); _grDataSeries3 = new List <KeyValuePair <object, object> >(); GraphUc.DataSourceSeries1 = _grDataSeries1; GraphUc.DataSourceSeries2 = _grDataSeries2; GraphUc.DataSourceSeries3 = _grDataSeries3; _grDataSeries1.Add(new KeyValuePair <object, object>(new DateTime(2011, 11, 22, 1, 10, 0).TimeOfDay, 5.1)); _grDataSeries1.Add(new KeyValuePair <object, object>(new DateTime(2011, 11, 22, 1, 20, 0).TimeOfDay, 3.2)); _grDataSeries1.Add(new KeyValuePair <object, object>(new DateTime(2011, 11, 22, 1, 30, 0).TimeOfDay, 8.4)); _grDataSeries1.Add(new KeyValuePair <object, object>(new DateTime(2011, 11, 22, 1, 40, 0).TimeOfDay, 9.5)); _grDataSeries1.Add(new KeyValuePair <object, object>(new DateTime(2011, 11, 22, 1, 50, 0).TimeOfDay, 2.2)); _grDataSeries2.Add(new KeyValuePair <object, object>(new DateTime(2011, 11, 22, 1, 10, 0).TimeOfDay, 5.1)); _grDataSeries2.Add(new KeyValuePair <object, object>(new DateTime(2011, 11, 22, 1, 20, 0).TimeOfDay, 5.1)); _grDataSeries2.Add(new KeyValuePair <object, object>(new DateTime(2011, 11, 22, 1, 30, 0).TimeOfDay, 5.1)); _grDataSeries2.Add(new KeyValuePair <object, object>(new DateTime(2011, 11, 22, 1, 40, 0).TimeOfDay, 5.1)); _grDataSeries2.Add(new KeyValuePair <object, object>(new DateTime(2011, 11, 22, 1, 50, 0).TimeOfDay, 5.1)); _grDataSeries3.Add(new KeyValuePair <object, object>(new DateTime(2011, 11, 22, 1, 05, 0).TimeOfDay, 3.2)); _grDataSeries3.Add(new KeyValuePair <object, object>(new DateTime(2011, 11, 22, 1, 15, 0).TimeOfDay, 3.7)); _grDataSeries3.Add(new KeyValuePair <object, object>(new DateTime(2011, 11, 22, 1, 25, 0).TimeOfDay, 4.4)); _grDataSeries3.Add(new KeyValuePair <object, object>(new DateTime(2011, 11, 22, 1, 35, 0).TimeOfDay, 6.5)); _grDataSeries3.Add(new KeyValuePair <object, object>(new DateTime(2011, 11, 22, 1, 45, 0).TimeOfDay, 1.6)); GraphUc.ShowSecondarySeries(true); GraphUc.RefreshData(); }
private void CheckBoxKeyTransparentUnchecked(object sender, RoutedEventArgs e) { if (!_init) { return; } Properties.Settings.Default.Plot_BG_Key_Transparent = false; GraphUc.UpdateStyles(); }
private void SliderFontSizeTitleValueChanged(object sender, RoutedPropertyChangedEventArgs <double> e) { if (!_init || e.NewValue < 5) { return; } TextBlockExampleTitle.FontSize = e.NewValue; Properties.Settings.Default.Plot_Font_Size_Title = e.NewValue.ToString(CultureInfo.InvariantCulture); GraphUc.UpdateStyles(); }
private void LabelKeyBgMouseUp(object sender, MouseButtonEventArgs e) { using (var cd = new System.Windows.Forms.ColorDialog()) { cd.AllowFullOpen = true; if (cd.ShowDialog() == System.Windows.Forms.DialogResult.OK) { _bgBrushKey = new SolidColorBrush(System.Windows.Media.Color.FromRgb(cd.Color.R, cd.Color.G, cd.Color.B)); Properties.Settings.Default.Plot_BG_Key = System.Drawing.Color.FromArgb(cd.Color.R, cd.Color.G, cd.Color.B); LabelKeyBg.Background = _bgBrushKey; GraphUc.UpdateStyles(); } } }
private void LabelFgColorTitleMouseUp(object sender, MouseButtonEventArgs e) { using (var cd = new System.Windows.Forms.ColorDialog()) { cd.AllowFullOpen = true; if (cd.ShowDialog() == System.Windows.Forms.DialogResult.OK) { _fgBrushTitle = new SolidColorBrush(System.Windows.Media.Color.FromRgb(cd.Color.R, cd.Color.G, cd.Color.B)); Properties.Settings.Default.Plot_FG_Color_Title = System.Drawing.Color.FromArgb(cd.Color.R, cd.Color.G, cd.Color.B); LabelFgColorTitle.Background = _fgBrushTitle; TextBlockExampleTitle.Foreground = _fgBrushTitle; GraphUc.UpdateStyles(); } } }
private void ComboBoxStyleTitleSelectionChanged(object sender, SelectionChangedEventArgs e) { if (ComboBoxStyleTitle.SelectedValue == null) { return; } var fontStyle = (string)ComboBoxStyleTitle.SelectedValue; var fsc = new FontStyleConverter(); PlotFontStyleTitle = (FontStyle)fsc.ConvertFromString(fontStyle); TextBlockExampleTitle.FontStyle = PlotFontStyleTitle; Properties.Settings.Default.Plot_Font_Style_Title = fontStyle; GraphUc.UpdateStyles(); }
private void ComboBoxWeightSelectionChanged(object sender, SelectionChangedEventArgs e) { if (ComboBoxWeight.SelectedValue == null) { return; } var fontWeight = (string)ComboBoxWeight.SelectedValue; var fwc = new FontWeightConverter(); PlotFontWeight = (FontWeight)fwc.ConvertFromString(fontWeight); TextBlockExample.FontWeight = PlotFontWeight; Properties.Settings.Default.Plot_Font_Weight = fontWeight; GraphUc.UpdateStyles(); }
private void TextBoxTertiaryThicknessTextChanged(object sender, TextChangedEventArgs e) { if (!_init) { return; } try { var d = double.Parse(TextBoxTertiaryThickness.Text); Properties.Settings.Default.Plot_Tertiary_Thickness = d; GraphUc.UpdateStyles(); } catch { } }
private void WindowLoaded(object sender, RoutedEventArgs e) { if (RestartConfig) { TabControl1.SelectedIndex = RestartTab; } RestartConfig = false; RestartTab = 0; InitText(); InitTextTitle(); InitGraphColors(); InitSeriesStyles(); InitGraphData(); GraphUc.UpdateStyles(); InitUiControls(); _init = true; }