public static void Register <A, B, C, D>(this GraphicScriptEditor editor, Color b) { EditorColors.Register <A>(b); EditorColors.Register <B>(b); EditorColors.Register <C>(b); EditorColors.Register <D>(b); }
public CreateFunctionDialogEx() { InitializeComponent(); FunctionItems = new ObservableCollection <FunctionItem>(); FunctionStructure.Background = new SolidColorBrush(EditorColors.Get <FunctionDeclaration>()); FunctionStructure.ItemsSource = FunctionItems; FunctionNameText.Focus(); FunctionNameText.SelectAll(); }
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { if (value == null) { return(new SolidColorBrush(Colors.Green)); } Type type = value.GetType(); return(new SolidColorBrush(EditorColors.Get(type))); }
public static void Register(this GraphicScriptEditor editor, Color b, Type t, params Type[] types) { EditorColors.Register(b, t); if (types != null) { foreach (var tp in types) { EditorColors.Register(b, tp); } } }
public CreateFunctionDlg() { InitializeComponent(); FunctionItems = new ObservableCollection <FunctionItem>(); FunctionItems.Add(new TextFunctionItem() { Value = "text" }); FunctionStructure.Background = new SolidColorBrush(EditorColors.Get <FunctionDeclaration>()); FunctionStructure.ItemsSource = FunctionItems; }
public static Color Get <T>(this GraphicScriptEditor editor) { return(EditorColors.Get <T>()); }
public static Color Get(this GraphicScriptEditor editor, Type t) { return(EditorColors.Get(t)); }