Esempio n. 1
0
 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);
 }
Esempio n. 2
0
 public CreateFunctionDialogEx()
 {
     InitializeComponent();
     FunctionItems = new ObservableCollection <FunctionItem>();
     FunctionStructure.Background  = new SolidColorBrush(EditorColors.Get <FunctionDeclaration>());
     FunctionStructure.ItemsSource = FunctionItems;
     FunctionNameText.Focus();
     FunctionNameText.SelectAll();
 }
Esempio n. 3
0
        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)));
        }
Esempio n. 4
0
 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);
         }
     }
 }
Esempio n. 5
0
 public CreateFunctionDlg()
 {
     InitializeComponent();
     FunctionItems = new ObservableCollection <FunctionItem>();
     FunctionItems.Add(new TextFunctionItem()
     {
         Value = "text"
     });
     FunctionStructure.Background  = new SolidColorBrush(EditorColors.Get <FunctionDeclaration>());
     FunctionStructure.ItemsSource = FunctionItems;
 }
Esempio n. 6
0
 public static Color Get <T>(this GraphicScriptEditor editor)
 {
     return(EditorColors.Get <T>());
 }
Esempio n. 7
0
 public static Color Get(this GraphicScriptEditor editor, Type t)
 {
     return(EditorColors.Get(t));
 }