aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Scripting/Tango.Scripting.IDE/app.config
blob: 877a49c00cbd94ff3bfa6e4a11fc101e230896db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Security.Cryptography.Algorithms" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.IO.FileSystem" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.IO.FileSystem.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Security.Cryptography.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Xml.XPath.XDocument" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Console" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Diagnostics.StackTrace" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.4.2.0" newVersion="1.4.2.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>
m.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; using Tango.Logging; using Tango.SharedUI.Controls; namespace Tango.MachineStudio.Common.Controls { /// <summary> /// Interaction logic for HiveComboControl.xaml /// </summary> public partial class HiveComboControl : UserControl { public event EventHandler<Color> SelectedColorChanged; public event EventHandler<HexagonControl> SelectedHexagonChanged; public event EventHandler<int> LAxisValueChanged; public event EventHandler<int> ResolutionChanged; public event EventHandler HiveGenerated; public int Resolution { get { return (int)GetValue(ResolutionProperty); } set { SetValue(ResolutionProperty, value); } } public static readonly DependencyProperty ResolutionProperty = DependencyProperty.Register("Resolution", typeof(int), typeof(HiveComboControl), new PropertyMetadata(1, (d, e) => (d as HiveComboControl).OnResolutionChanged())); public HexagonControl SelectedHexagon { get { return (HexagonControl)GetValue(SelectedHexagonProperty); } set { SetValue(SelectedHexagonProperty, value); } } public static readonly DependencyProperty SelectedHexagonProperty = DependencyProperty.Register("SelectedHexagon", typeof(HexagonControl), typeof(HiveComboControl), new PropertyMetadata(null, (d, e) => (d as HiveComboControl).OnSelectedHexagonChanged())); public int LAxisValue { get { return (int)GetValue(LAxisValueProperty); } set { SetValue(LAxisValueProperty, value); } } public static readonly DependencyProperty LAxisValueProperty = DependencyProperty.Register("LAxisValue", typeof(int), typeof(HiveComboControl), new PropertyMetadata(0, (d, e) => (d as HiveComboControl).OnLAxisValueChanged())); public HexagonControl CenterHexagon { get { return hive.CenterHexagon; } } public HiveComboControl() { InitializeComponent(); hive.HiveGenerated += (x, e) => HiveGenerated?.Invoke(this, new EventArgs()); } private void OnLAxisValueChanged() { LAxisValueChanged?.Invoke(this, LAxisValue); } private void OnSelectedHexagonChanged() { SelectedHexagonChanged?.Invoke(this, SelectedHexagon); } private void OnResolutionChanged() { ResolutionChanged?.Invoke(this, Resolution); } public void GenerateDemoModeHiveColors(Color originalColor) { if (hive.CenterHexagon != null) { Random rnd = new Random(); (hive.CenterHexagon.Fill as SolidColorBrush).Color = originalColor; int counter = 0; foreach (var hexagon in hive.Hexagons.Where(x => x != hive.CenterHexagon).OrderBy(x => rnd.Next())) { (hexagon.Fill as SolidColorBrush).Color = Color.FromRgb((byte)Math.Min(originalColor.R + counter++, 255), (byte)Math.Min((originalColor.G + counter++), 255), (byte)Math.Min((originalColor.B + counter++), 255)); counter += (int)(4d * ((double)Resolution / 4d)); } } } private void OnResolutionUpClicked(object sender, RoutedEventArgs e) { if (Resolution < 10) { Resolution++; } } private void OnResolutionDownClicked(object sender, RoutedEventArgs e) { if (Resolution > 1) { Resolution--; } } private void OnRowHiveHexagonSelected(object sender, HexagonControl hexagon) { LAxisValue = 2 - hexagon.Row; } private void OnHexagonSelected(object sender, HexagonControl e) { SelectedHexagon = e; } public void SelectHeagon(HexagonControl hexagon) { hive.SelectHexagon(hexagon); SelectedHexagonChanged?.Invoke(this, hexagon); } } }