public Value_ScalableImage(DataStore datas, ScalableImage image) { InitializeComponent(); cont = image; data = datas; positionselector.SetData(cont); positionselector.LoadData(); effectselector.SetData(cont); effectselector.LoadData(); BitmapScalingMode scalingMode = RenderOptions.GetBitmapScalingMode(cont); if ((int)scalingMode == 2) { ComboBox_Quality.SelectedIndex = 0; } if ((int)scalingMode == 1) { ComboBox_Quality.SelectedIndex = 1; } if ((int)scalingMode == 3) { ComboBox_Quality.SelectedIndex = 2; } if (cont.M_Img.Source != null) { R_ImageFill.Fill = new ImageBrush(cont.M_Img.Source); ((ImageBrush)R_ImageFill.Fill).Stretch = Stretch.UniformToFill; } SliderZoom.Value = cont.SliderZoom.Value; NTB_Zoom.Text = "" + (int)SliderZoom.Value; GetImageSize(); BS_ControlPanel.SetData(cont, data, false, cont.PathToCPImage); BS_ControlPanel.LoadData(cont.ControlPanelBack); BS_ControlPanel.ChangedBrush -= ControlBackground_ChangedBrush; BS_ControlPanel.ChangedBrush += ControlBackground_ChangedBrush; }
public Value_WebBrowser(DataStore data, WebPage_Control webbrowser) { InitializeComponent(); cont = webbrowser; positionselector.SetData(cont); positionselector.LoadData(); if (cont.Effect != null) { if (cont.Effect is DropShadowEffect) { CheckBoxShadow.IsChecked = true; DropShadowEffect effect = (DropShadowEffect)cont.Effect; Rect_ShadowColor.Fill = new SolidColorBrush(effect.Color); TextBox_ShadowDepth.Text = effect.ShadowDepth + ""; TextBox_ShadowDirection.Text = effect.Direction + ""; SliderShadowOpacity.Value = effect.Opacity * 100; TextBox_BlurRadius.Text = effect.BlurRadius + ""; } } if (cont.BackForwardVisibility == Visibility.Visible) { NavCheckBox.IsChecked = true; } else { NavCheckBox.IsChecked = false; } Box_Web.Text = cont.WebUrl; ToolbarCheckBox.IsChecked = (cont.ToolbarPanel.Visibility == Visibility.Visible); BS_ControlPanel.SetData(cont, data, false, cont.PathToCPImage); BS_ControlPanel.LoadData(cont.ControlPanelBack); BS_ControlPanel.ChangedBrush -= ControlBackground_ChangedBrush; BS_ControlPanel.ChangedBrush += ControlBackground_ChangedBrush; }
public Value_MediaPlayer(DataStore datas, MediaPlayerController_Control control) { InitializeComponent(); cont = control; data = datas; if (cont.Width < cont.MinWidth) { cont.Width = cont.MinWidth; } if (cont.Height < cont.MinHeight) { cont.Height = cont.MinHeight; } positionselector.SetData(cont); positionselector.LoadData(); CB_IsVisible.IsChecked = (cont.Visibility == Visibility.Visible); if (cont.Tag != null) { TBL_Media.Text = cont.Tag.ToString(); } CB_Autoplay.IsChecked = cont.Autoplay; SL_Volume.Value = cont.Volume; BS_ControlPanel.SetData(cont, data, false, cont.PathToCPImage); BS_ControlPanel.LoadData(cont.G_ControlPanel.Background); BS_ControlPanel.ChangedBrush -= ControlBackground_ChangedBrush; BS_ControlPanel.ChangedBrush += ControlBackground_ChangedBrush; }
public Value_InkCanvas(DataStore datas, InkCanvas_Control inkCanvas_Control) { InitializeComponent(); cont = inkCanvas_Control; data = datas; positionselector.SetData(cont); positionselector.LoadData(); effectselector.SetData(cont); effectselector.LoadData(); brushselector.SetData(cont, data, true); brushselector.LoadData(cont.inkCanvas.Background); brushselector.ChangedBrush -= Brushselector_ChangedBrush; brushselector.ChangedBrush += Brushselector_ChangedBrush; BS_ControlPanel.SetData(cont, data, false, cont.PathToCPImage); BS_ControlPanel.LoadData(cont.ControlPanelBack); BS_ControlPanel.ChangedBrush -= ControlBackground_ChangedBrush; BS_ControlPanel.ChangedBrush += ControlBackground_ChangedBrush; }