aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Scripting/Tango.Scripting.Basic/Resources/template.csx
blob: 307e1e4838363220554109e4e6c0e86bd385badf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
using System;
using System.Threading;
using System.Threading.Tasks;
using Tango.Scripting.Basic;

public class MainScript
{
    public object OnExecute(IContext context)
    {
        return new
        {
            Item1 = "1",
            Item2 = "2"
        };
    }
}
22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Tango.MachineStudio.Synchronization.Views
{
    /// <summary>
    /// Interaction logic for MainView.xaml
    /// </summary>
    public partial class MainView : UserControl
    {
        public static MainView Instance;

        public MainView()
        {
            InitializeComponent();
            Instance = this;
        }

        private void txtLog_TextChanged(object sender, TextChangedEventArgs e)
        {
            Task.Factory.StartNew(() =>
            {
                Thread.Sleep(50);

                this.Dispatcher.Invoke(() =>
                {
                    txtLog.SelectionStart = txtLog.Text.Length;
                    txtLog.ScrollToEnd();
                });
            });
        }
    }
}