예제 #1
0
 public VixenPreviewSetupElementsDocument(VixenPreviewControl preview)
 {
     InitializeComponent();
     _preview = preview;
     _preview.OnSelectDisplayItem   += OnSelectDisplayItem;
     _preview.OnDeSelectDisplayItem += OnDeSelectDisplayItem;
 }
        public VixenPreviewSetupElementsDocument(VixenPreviewControl preview)
        {
            InitializeComponent();
            int iconSize = (int)(24 * ScalingTools.GetScaleFactor());

            buttonAddTemplate.Image = Tools.GetIcon(Resources.add, iconSize);
            buttonAddTemplate.Text  = "";
            var elementTemplates = ApplicationServices.GetAllElementTemplates();

            comboBoxNewItemType.BeginUpdate();
            foreach (IElementTemplate template in elementTemplates)
            {
                ComboBoxItem item = new ComboBoxItem(template.TemplateName, template);
                comboBoxNewItemType.Items.Add(item);
            }
            comboBoxNewItemType.EndUpdate();
            if (comboBoxNewItemType.Items.Count > 0)
            {
                comboBoxNewItemType.SelectedIndex = 0;
            }

            ThemeUpdateControls.UpdateControls(this);
            _preview = preview;
            treeElements.AllowPropertyEdit = false;
            treeElements.AllowWireExport   = false;
        }
 public VixenPreviewSetupElementsDocument(VixenPreviewControl preview)
 {
     InitializeComponent();
     _preview = preview;
     _preview.OnSelectDisplayItem += OnSelectDisplayItem;
     _preview.OnDeSelectDisplayItem += OnDeSelectDisplayItem;
     _preview.OnElementsChanged += OnElementsChanged;
 }
예제 #4
0
 public VixenPreviewSetupElementsDocument(VixenPreviewControl preview)
 {
     InitializeComponent();
     treeElements.BackColor = ThemeColorTable.BackgroundColor;
     treeElements.ForeColor = ThemeColorTable.ForeColor;
     _preview = preview;
     _preview.OnSelectDisplayItem   += OnSelectDisplayItem;
     _preview.OnDeSelectDisplayItem += OnDeSelectDisplayItem;
     _preview.OnElementsChanged     += OnElementsChanged;
 }
예제 #5
0
 public PreviewCustomPropBuilder(Prop prop, double zoomLevel, VixenPreviewControl parent)
 {
     if (prop == null)
     {
         throw new ArgumentNullException(nameof(prop));
     }
     _prop             = prop;
     _parent           = parent;
     PreviewCustomProp = new PreviewCustomProp(zoomLevel);
 }
		public VixenPreviewSetupElementsDocument(VixenPreviewControl preview)
		{
			InitializeComponent();
			treeElements.BackColor = ThemeColorTable.BackgroundColor;
			treeElements.ForeColor = ThemeColorTable.ForeColor;
			_preview = preview;
			_preview.OnSelectDisplayItem += OnSelectDisplayItem;
			_preview.OnDeSelectDisplayItem += OnDeSelectDisplayItem;
            _preview.OnElementsChanged += OnElementsChanged;
		}
예제 #7
0
		public PreviewItemsAddedUndoAction(VixenPreviewControl form, IEnumerable<DisplayItem> items)
			: base(form, items)
		{
		}
예제 #8
0
 private void EnableButton(Control.ControlCollection parent, VixenPreviewControl.Tools tool)
 {
     if (parent != null)
     {
         foreach (Control c in parent)
         {
             if (c is Button && c.Tag != null && c.Tag.ToString() != "")
             {
                 Button button = c as Button;
                 if (c.Tag.ToString() == previewForm.Preview.CurrentTool.ToString())
                 {
                     button.BackColor = Color.Gainsboro;
                     button.FlatAppearance.BorderColor = button.BackColor;
                 }
                 else
                 {
                     button.BackColor = Color.White;
                     button.FlatAppearance.BorderColor = button.BackColor;
                 }
             }
             EnableButton(c.Controls, tool);
         }
     }
 }
		public PreviewItemsAddedRemovedUndoAction(VixenPreviewControl form, IEnumerable<DisplayItem> items)
		{
			m_form = form;
			m_elements = items;
			m_count = m_elements.Count();
		}
		public PreviewItemsGroupAddedSeparateUndoAction(VixenPreviewControl form, DisplayItem newDisplayItem)
		{
			m_form = form;
			m_newDisplay = newDisplayItem;
		}
		public PreviewItemsGroupAddedUndoAction(VixenPreviewControl form, DisplayItem newDisplayItem)
			: base(form, newDisplayItem)
		{
		}
예제 #12
0
 public VixenPreviewSetupPropertiesDocument(VixenPreviewControl previewControl)
 {
     InitializeComponent();
     ThemeUpdateControls.UpdateControls(this);
     _previewControl = previewControl;
 }
예제 #13
0
		public PreviewItemsRemovedUndoAction(VixenPreviewControl form, List<DisplayItem> items)
			: base(form, items)
		{
		}
예제 #14
0
 public PreviewItemResizingEventArgs(VixenPreviewControl.PreviewItemResizeMoveInfo info)
 {
     if (info != null)
         PreviousSize = info.OriginalPreviewItem;
 }
		public PreviewItemsGroupSeparateAction(VixenPreviewControl form, DisplayItem newDisplayItem)
			: base(form, newDisplayItem)
		{
		}
예제 #16
0
		public PreviewItemsMoveUndoAction(VixenPreviewControl form, Dictionary<DisplayItem, VixenPreviewControl.PreviewItemPositionInfo> ChangedPreviewItems)
		{
			m_changedPreviewItems = ChangedPreviewItems;
			m_form = form;
		}