Browse Source

API development completed

Jalal Khademi 8 years ago
parent
commit
e87f7a09fb

+ 9 - 1
bbiwarg.sln

@@ -1,18 +1,26 @@
 
 Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2012
+# Visual Studio 14
+VisualStudioVersion = 14.0.23107.0
+MinimumVisualStudioVersion = 10.0.40219.1
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "bbiwarg", "bbiwarg\bbiwarg.csproj", "{12271049-82D6-436D-A51E-E6614C8E9C50}"
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
+		Debug|x86 = Debug|x86
 		Release|Any CPU = Release|Any CPU
+		Release|x86 = Release|x86
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
 		{12271049-82D6-436D-A51E-E6614C8E9C50}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{12271049-82D6-436D-A51E-E6614C8E9C50}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{12271049-82D6-436D-A51E-E6614C8E9C50}.Debug|x86.ActiveCfg = Debug|x86
+		{12271049-82D6-436D-A51E-E6614C8E9C50}.Debug|x86.Build.0 = Debug|x86
 		{12271049-82D6-436D-A51E-E6614C8E9C50}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{12271049-82D6-436D-A51E-E6614C8E9C50}.Release|Any CPU.Build.0 = Release|Any CPU
+		{12271049-82D6-436D-A51E-E6614C8E9C50}.Release|x86.ActiveCfg = Release|x86
+		{12271049-82D6-436D-A51E-E6614C8E9C50}.Release|x86.Build.0 = Release|x86
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

+ 29 - 0
bbiwarg/API/Grid.cs

@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BBIWARG.API
+{
+    public class Grid
+    {
+        public string Type { get; set; }
+        public int Rows { get; set; }
+        public int Cols { get; set; }
+
+        public static Grid instance;
+        public static Grid getInctance()
+        {
+            if (instance == null)
+                instance = new Grid();
+            return instance;
+        }
+        private Grid()
+        {
+            Type = "grid";
+            Rows = 0;
+            Cols = 0;
+        }
+    }
+}

+ 25 - 0
bbiwarg/API/IServer.cs

@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.Serialization;
+using System.ServiceModel;
+using System.Text;
+
+namespace BBIWARG.API
+{
+    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IServer" in both code and config file together.
+    [ServiceContract]
+    public interface IServer
+    {
+        [OperationContract]
+        Grid getGrid();
+        [OperationContract]
+        string setGrid(Grid g);
+
+        [OperationContract]
+        Slider getSlider();
+        [OperationContract]
+
+        string setSlider(Slider s);
+    }
+}

+ 77 - 0
bbiwarg/API/Server.cs

@@ -0,0 +1,77 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.Serialization;
+using System.ServiceModel;
+using System.ServiceModel.Web;
+using System.Text;
+using System.Windows.Forms;
+
+namespace BBIWARG.API
+{
+    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Server" in both code and config file together.
+    public class Server : IServer
+    {
+        [WebInvoke(Method = "GET",
+                     ResponseFormat = WebMessageFormat.Json,
+                     UriTemplate = "grid")]
+        public Grid getGrid()
+        {
+            return Grid.getInctance();
+        }
+
+        [WebInvoke(Method = "POST",
+                      RequestFormat = WebMessageFormat.Json,
+                     ResponseFormat = WebMessageFormat.Json,
+                     UriTemplate = "grid")]
+        public string setGrid(Grid grid)
+        {
+            try
+            {
+                Grid.getInctance().Cols = grid.Cols;
+                Grid.getInctance().Rows = grid.Rows;
+                Output.DebugOutput.DebugWindow.palmGridNumColumnsTrackBar.Invoke((MethodInvoker)delegate {
+                    Output.DebugOutput.DebugWindow.palmGridNumColumnsTrackBar.Value = grid.Cols;
+                });
+                Output.DebugOutput.DebugWindow.palmGridNumRowsTrackBar.Invoke((MethodInvoker)delegate {
+                    Output.DebugOutput.DebugWindow.palmGridNumRowsTrackBar.Value = grid.Rows;
+                });
+                return "Done!";
+            }
+            catch(Exception e)
+            { return e.ToString(); }
+        }
+
+
+        [WebInvoke(Method = "GET",
+                     ResponseFormat = WebMessageFormat.Json,
+                     UriTemplate = "slider")]
+        public Slider getSlider()
+        {
+            Slider.getInctance().Cur = Parameters.PalmSliderCurr;
+            Slider.getInctance().Pos = Parameters.PalmSliderPos;
+            Slider.getInctance().Max = Parameters.PalmSliderMax;
+            return Slider.getInctance();
+        }
+
+        [WebInvoke(Method = "POST",
+                      RequestFormat = WebMessageFormat.Json,
+                     ResponseFormat = WebMessageFormat.Json,
+                     UriTemplate = "slider")]
+        public string setSlider(Slider slider)
+        {
+            try
+            {
+                Slider.getInctance().Cur = slider.Cur;
+                Slider.getInctance().Pos = slider.Pos;
+                Slider.getInctance().Max = slider.Max;
+                Parameters.PalmSliderCurr = slider.Cur;
+                Parameters.PalmSliderPos = slider.Pos;
+                Parameters.PalmSliderMax = slider.Max;
+                return "Done!";
+            }
+            catch (Exception e)
+            { return e.ToString(); }
+        }
+    }
+}

+ 31 - 0
bbiwarg/API/Slider.cs

@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BBIWARG.API
+{
+    public class Slider
+    {
+        public string Type { get; set; }
+        public int Pos { get; set; }
+        public int Max { get; set; }
+        public int Cur { get; set; }
+
+        public static Slider instance;
+        public static Slider getInctance()
+        {
+            if (instance == null)
+                instance = new Slider();
+            return instance;
+        }
+        private Slider()
+        {
+            Type = "slider";
+            Pos = 0;
+            Max = 0;
+            Cur = 0;
+        }
+    }
+}

+ 17 - 1
bbiwarg/App.config

@@ -1,6 +1,22 @@
-<?xml version="1.0" encoding="utf-8" ?>
+<?xml version="1.0" encoding="utf-8" ?>
 <configuration>
   <startup>
     <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
   </startup>
+<system.serviceModel>
+  <services>
+    <service name="BBIWARG.API.Server">
+      <endpoint address="http://localhost:8733/Design_Time_Addresses/BBIWARG.API/Server/"
+           binding="webHttpBinding"
+           contract="BBIWARG.API.IServer"/>
+    </service>
+  </services>
+  <behaviors>
+    <endpointBehaviors>
+      <behavior>
+        <webHttp />
+      </behavior>
+    </endpointBehaviors>
+  </behaviors>
+    </system.serviceModel>
 </configuration>

+ 3 - 0
bbiwarg/BBWIWARG.cs

@@ -126,6 +126,9 @@ namespace BBIWARG
         {
             Console.SetWindowSize(Parameters.ConsoleWidth, Parameters.ConsoleHeight);
 
+            System.ServiceModel.ServiceHost host = new System.ServiceModel.ServiceHost(typeof(API.Server));
+            host.Open();
+
             BBIWARG program = new BBIWARG(args);
             program.run();
         }

+ 6 - 1
bbiwarg/Output/DebugOutput/DebugImageCreator.cs

@@ -189,7 +189,12 @@ namespace BBIWARG.Output.DebugOutput
             if (TouchImage != null)
                 TouchImage.Dispose();
 
-            TouchImage = touchEventVisualizer.getOutputImage(frameData.ImageSize, numRows, numColumns);
+            TouchImage = touchEventVisualizer.getOutputImage(frameData.ImageSize,
+                numRows,
+                numColumns,
+                Parameters.PalmSliderPos,
+                Parameters.PalmSliderMax,
+                Parameters.PalmSliderCurr);
         }
     }
 }

+ 28 - 25
bbiwarg/Output/DebugOutput/DebugWindow.Designer.cs

@@ -2,6 +2,9 @@
 {
     partial class DebugWindow
     {
+
+        public static System.Windows.Forms.TrackBar palmGridNumRowsTrackBar;
+        public static System.Windows.Forms.TrackBar palmGridNumColumnsTrackBar;
         /// <summary>
         /// Required designer variable.
         /// </summary>
@@ -36,13 +39,15 @@
             this.imageBox6 = new Emgu.CV.UI.ImageBox();
             this.panel1 = new System.Windows.Forms.Panel();
             this.frameLabel = new System.Windows.Forms.Label();
-            this.palmGridNumColumnsTrackBar = new System.Windows.Forms.TrackBar();
+            palmGridNumColumnsTrackBar = new System.Windows.Forms.TrackBar();
             this.palmGridNumColumnsLabel = new System.Windows.Forms.Label();
             this.palmGridNumRowsLabel = new System.Windows.Forms.Label();
             this.palmGridLabel = new System.Windows.Forms.Label();
             this.label2 = new System.Windows.Forms.Label();
             this.videoControlLabel = new System.Windows.Forms.Label();
-            this.palmGridNumRowsTrackBar = new System.Windows.Forms.TrackBar();
+
+
+            palmGridNumRowsTrackBar = new System.Windows.Forms.TrackBar();
             this.previousFrameButton = new System.Windows.Forms.Button();
             this.nextFrameButton = new System.Windows.Forms.Button();
             this.playPauseButton = new System.Windows.Forms.Button();
@@ -53,8 +58,8 @@
             ((System.ComponentModel.ISupportInitialize)(this.palmImageBox)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.imageBox6)).BeginInit();
             this.panel1.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.palmGridNumColumnsTrackBar)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.palmGridNumRowsTrackBar)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(palmGridNumColumnsTrackBar)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(palmGridNumRowsTrackBar)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.touchImageBox)).BeginInit();
             this.SuspendLayout();
             // 
@@ -110,13 +115,13 @@
             // panel1
             // 
             this.panel1.Controls.Add(this.frameLabel);
-            this.panel1.Controls.Add(this.palmGridNumColumnsTrackBar);
+            this.panel1.Controls.Add(palmGridNumColumnsTrackBar);
             this.panel1.Controls.Add(this.palmGridNumColumnsLabel);
             this.panel1.Controls.Add(this.palmGridNumRowsLabel);
             this.panel1.Controls.Add(this.palmGridLabel);
             this.panel1.Controls.Add(this.label2);
             this.panel1.Controls.Add(this.videoControlLabel);
-            this.panel1.Controls.Add(this.palmGridNumRowsTrackBar);
+            this.panel1.Controls.Add(palmGridNumRowsTrackBar);
             this.panel1.Controls.Add(this.previousFrameButton);
             this.panel1.Controls.Add(this.nextFrameButton);
             this.panel1.Controls.Add(this.playPauseButton);
@@ -137,13 +142,13 @@
             // 
             // palmGridNumColumnsTrackBar
             // 
-            this.palmGridNumColumnsTrackBar.Location = new System.Drawing.Point(56, 148);
-            this.palmGridNumColumnsTrackBar.Minimum = 1;
-            this.palmGridNumColumnsTrackBar.Name = "palmGridNumColumnsTrackBar";
-            this.palmGridNumColumnsTrackBar.Size = new System.Drawing.Size(247, 45);
-            this.palmGridNumColumnsTrackBar.TabIndex = 4;
-            this.palmGridNumColumnsTrackBar.Value = 1;
-            this.palmGridNumColumnsTrackBar.Scroll += new System.EventHandler(this.palmGridTrackBar_Scroll);
+            palmGridNumColumnsTrackBar.Location = new System.Drawing.Point(56, 148);
+            palmGridNumColumnsTrackBar.Minimum = 1;
+           palmGridNumColumnsTrackBar.Name = "palmGridNumColumnsTrackBar";
+            palmGridNumColumnsTrackBar.Size = new System.Drawing.Size(247, 45);
+            palmGridNumColumnsTrackBar.TabIndex = 4;
+            palmGridNumColumnsTrackBar.Value = 1;
+            palmGridNumColumnsTrackBar.Scroll += new System.EventHandler(this.palmGridTrackBar_Scroll);
             // 
             // palmGridNumColumnsLabel
             // 
@@ -193,13 +198,13 @@
             // 
             // palmGridNumRowsTrackBar
             // 
-            this.palmGridNumRowsTrackBar.Location = new System.Drawing.Point(56, 108);
-            this.palmGridNumRowsTrackBar.Minimum = 1;
-            this.palmGridNumRowsTrackBar.Name = "palmGridNumRowsTrackBar";
-            this.palmGridNumRowsTrackBar.Size = new System.Drawing.Size(247, 45);
-            this.palmGridNumRowsTrackBar.TabIndex = 3;
-            this.palmGridNumRowsTrackBar.Value = 1;
-            this.palmGridNumRowsTrackBar.Scroll += new System.EventHandler(this.palmGridTrackBar_Scroll);
+            palmGridNumRowsTrackBar.Location = new System.Drawing.Point(56, 108);
+            palmGridNumRowsTrackBar.Minimum = 1;
+            palmGridNumRowsTrackBar.Name = "palmGridNumRowsTrackBar";
+            palmGridNumRowsTrackBar.Size = new System.Drawing.Size(247, 45);
+            palmGridNumRowsTrackBar.TabIndex = 3;
+            palmGridNumRowsTrackBar.Value = 1;
+            palmGridNumRowsTrackBar.Scroll += new System.EventHandler(this.palmGridTrackBar_Scroll);
             // 
             // previousFrameButton
             // 
@@ -270,8 +275,8 @@
             ((System.ComponentModel.ISupportInitialize)(this.imageBox6)).EndInit();
             this.panel1.ResumeLayout(false);
             this.panel1.PerformLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.palmGridNumColumnsTrackBar)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.palmGridNumRowsTrackBar)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(palmGridNumColumnsTrackBar)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(palmGridNumRowsTrackBar)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.touchImageBox)).EndInit();
             this.ResumeLayout(false);
 
@@ -287,16 +292,14 @@
         private System.Windows.Forms.Panel panel1;
         private System.Windows.Forms.Button playPauseButton;
         private System.Windows.Forms.Label videoControlLabel;
-        private System.Windows.Forms.TrackBar palmGridNumRowsTrackBar;
         private System.Windows.Forms.Button previousFrameButton;
         private System.Windows.Forms.Button nextFrameButton;
         private System.Windows.Forms.Label label2;
         private System.Windows.Forms.Label palmGridLabel;
         private System.Windows.Forms.Label palmGridNumRowsLabel;
-        private System.Windows.Forms.TrackBar palmGridNumColumnsTrackBar;
         private System.Windows.Forms.Label palmGridNumColumnsLabel;
         private System.Windows.Forms.Label frameLabel;
         private Emgu.CV.UI.ImageBox touchImageBox;
-
+        
     }
 }

+ 7 - 0
bbiwarg/Output/DebugOutput/DebugWindow.cs

@@ -16,6 +16,8 @@ namespace BBIWARG.Output.DebugOutput
         /// </summary>
         private int currentFrameID;
 
+        private API.Grid grid;
+
         /// <summary>
         /// the debug image creator
         /// </summary>
@@ -69,6 +71,10 @@ namespace BBIWARG.Output.DebugOutput
             palmGridNumRowsTrackBar.Value = Parameters.PalmGridDefaultNumRows;
             palmGridNumColumnsTrackBar.Value = Parameters.PalmGridDefaultNumColumns;
 
+            grid = API.Grid.getInctance();
+            grid.Cols = Parameters.PalmGridDefaultNumColumns;
+            grid.Rows = Parameters.PalmGridDefaultNumRows;
+
             timer = new System.Windows.Forms.Timer();
             timer.Interval = updateInterval;
             timer.Tick += update;
@@ -232,6 +238,7 @@ namespace BBIWARG.Output.DebugOutput
 
             int numRows = palmGridNumRowsTrackBar.Value;
             int numColumns = palmGridNumColumnsTrackBar.Value;
+
             debugImageCreator.updateImages(frameData, numRows, numColumns);
         }
     }

+ 89 - 14
bbiwarg/Output/DebugOutput/TouchEventVisualizer.cs

@@ -60,7 +60,7 @@ namespace BBIWARG.Output.DebugOutput
         /// <param name="numRows">number of rows in the palm grid</param>
         /// <param name="numColumns">number columns in the palm grid</param>
         /// <returns>image showing touch events</returns>
-        public OutputImage getOutputImage(ImageSize imageSize, int numRows, int numColumns)
+        public OutputImage getOutputImage(ImageSize imageSize, int numRows, int numColumns, int sliderPos, int sliderMax, int sliderCurr)
         {
             lock (sync)
             {
@@ -79,37 +79,93 @@ namespace BBIWARG.Output.DebugOutput
                 int heightPerRow = imageHeight / numRows;
 
                 // find active blocks
-                bool[,] activeBlocks = new bool[numRows, numColumns];
+                List<List<bool>> activeBlocks = getActiveBlocks(numRows, numColumns, sliderPos, sliderMax, sliderCurr);
                 if (numRows * numColumns > 1)
                 {
-                    foreach (List<Vector2D> positions in activeTouches.Values)
+                    for (int i = 0; i < activeTouches.Values.Count; i++)
                     {
+                        List<Vector2D> positions = activeTouches.Values.ElementAt(i);
                         Vector2D lastPosition = positions.Last();
                         int activeRow = (int)Math.Min(lastPosition.Y * numRows, numRows - 1);
-                        int activeCol = (int)Math.Min(lastPosition.X * numColumns, numColumns - 1);
-                        activeBlocks[activeRow, activeCol] = true;
+                        int activeCol = (int)Math.Min(lastPosition.X * activeBlocks.ElementAt(activeRow).Count,
+                            activeBlocks.ElementAt(activeRow).Count - 1);
+                        if (activeRow != sliderPos)
+                            activeBlocks.ElementAt(activeRow)[activeCol] = true;
+                        if (activeRow == sliderPos)
+                        {
+                            if (Parameters.PalmSliderLastTouched != -1)
+                            {
+                                int temp = Parameters.PalmSliderCurr + (activeCol - Parameters.PalmSliderLastTouched);
+                                if (temp < 0)
+                                    Parameters.PalmSliderCurr = 0;
+                                if (temp > Parameters.PalmSliderMax)
+                                    Parameters.PalmSliderCurr = Parameters.PalmSliderMax;
+                                else
+                                    Parameters.PalmSliderCurr = temp;
+                                Parameters.PalmSliderLastTouched = activeCol;
+                            }
+                            else if (Parameters.PalmSliderLastTouched == -1)
+                            {
+                                Parameters.PalmSliderLastTouched = activeCol;
+                            }
+                        }
+                        else
+                        {
+                            Parameters.PalmSliderLastTouched = -1;
+                        }
+                    }
+                    if (activeTouches.Values.Count < 1)
+                    {
+                        Parameters.PalmSliderLastTouched = -1;
                     }
                 }
+                if(sliderPos > -1 && sliderPos < numRows)
+                {
+                    for (int i = 0; i < Parameters.PalmSliderCurr; i++)
+                    {
+                        activeBlocks.ElementAt(sliderPos)[i] = true;
+                    }
+                }
+                
 
                 // draw blocks
+
                 int index = 1;
                 for (int row = 0; row < numRows; row++)
                 {
-                    for (int col = 0; col < numColumns; col++)
+                    for (int col = 0; col < activeBlocks.ElementAt(row).Count; col++)
                     {
-                        if (activeBlocks[row, col])
-                            outputImage.fillRectangle(new Rectangle(col * widthPerColumn, row * heightPerRow, widthPerColumn, heightPerRow), Parameters.TouchEventVisualizerActiveBlockColor);
+                        if (activeBlocks.ElementAt(row)[col])
+                            outputImage.fillRectangle(new Rectangle(col * imageWidth/activeBlocks.ElementAt(row).Count,
+                                row * heightPerRow, imageWidth / activeBlocks.ElementAt(row).Count, heightPerRow),
+                                Parameters.TouchEventVisualizerActiveBlockColor);
+                        if(row != sliderPos)
+                        {
+                            int x = (int)((col + 0.5f) * imageWidth / activeBlocks.ElementAt(row).Count) - 5;
+                            int y = (int)((row + 0.5f) * heightPerRow) + 5;
+                            outputImage.drawText(new Point(x, y), index.ToString(), Parameters.TouchEventVisualizerTextColor);
+                            index++;
 
-                        int x = (int)((col + 0.5f) * widthPerColumn) - 5;
-                        int y = (int)((row + 0.5f) * heightPerRow) + 5;
-                        outputImage.drawText(new Point(x, y), index.ToString(), Parameters.TouchEventVisualizerTextColor);
-                        index++;
+                        }
                     }
                 }
 
                 // draw grid
-                for (int i = 0; i <= numColumns; i++)
-                    outputImage.drawLineSegment(new LineSegment2D(new Vector2D(i * widthPerColumn, 0), new Vector2D(i * widthPerColumn, imageHeight - 1)), Parameters.TouchEventVisualizerGridColor);
+
+
+                for(int i = 0; i < activeBlocks.Count; i++)
+                {
+                    for(int j = 0; j < activeBlocks.ElementAt(i).Count; j++)
+                    {
+                        outputImage.drawLineSegment(new LineSegment2D(
+                            new Vector2D(j * imageWidth/activeBlocks.ElementAt(i).Count, i * heightPerRow),
+                            new Vector2D(j * imageWidth / activeBlocks.ElementAt(i).Count, (i + 1) * heightPerRow -1)),
+                            Parameters.TouchEventVisualizerGridColor);
+                    }
+                }
+
+                //for (int i = 0; i <= numColumns; i++)
+                //    outputImage.drawLineSegment(new LineSegment2D(new Vector2D(i * widthPerColumn, 0), new Vector2D(i * widthPerColumn, imageHeight - 1)), Parameters.TouchEventVisualizerGridColor);
                 for (int i = 0; i <= numRows; i++)
                     outputImage.drawLineSegment(new LineSegment2D(new Vector2D(0, i * heightPerRow), new Vector2D(imageWidth - 1, i * heightPerRow)), Parameters.TouchEventVisualizerGridColor);
 
@@ -130,6 +186,25 @@ namespace BBIWARG.Output.DebugOutput
             }
         }
 
+        private List<List<bool>> getActiveBlocks(int numRows, int numColumns, int sliderPos, int sliderMax, int sliderCurr)
+        {
+            List<List<bool>> res = new List<List<bool>>();
+            for(int i = 0; i < numRows; i++)
+            {
+                List<bool> temp = new List<bool>();
+                if (i == sliderPos)
+                {
+                    for (int j = 0; j < sliderMax; j++) temp.Add(false);
+                }
+                else
+                {
+                    for (int j = 0; j < numColumns; j++) temp.Add(false);
+                }
+                res.Add(temp);
+            }
+            return res;
+        }
+
         /// <summary>
         /// Handles the event that a new frame is finished processing by updating the touch events.
         /// </summary>

+ 26 - 0
bbiwarg/Parameters.cs

@@ -458,6 +458,32 @@ namespace BBIWARG
         /// </summary>
         public static readonly int PalmGridDefaultNumRows = 3;
 
+        /// <summary>
+        /// number of palm slider capacity
+        /// </summary>
+        public static int PalmSliderMax = 10;
+
+        /// <summary>
+        /// position of palm slider
+        /// </summary>
+        public static int PalmSliderPos = 1;
+
+        /// <summary>
+        /// current value of palm slider
+        /// </summary>
+        public static int PalmSliderCurr = 0;
+
+        /// <summary>
+        /// current state of palm slider
+        /// </summary>
+        public static int PalmSliderState = 0;
+
+        /// <summary>
+        /// 
+        /// </summary>
+        public static int PalmSliderLastTouched = 0;
+
+
         #endregion palm grid
 
         #region touch detection

+ 0 - 1
bbiwarg/TUIO/TuioCommunicator.cs

@@ -116,7 +116,6 @@ namespace BBIWARG.TUIO
                 List<int> updatedIDs = new List<int>();
                 foreach (Palm palm in frameData.TrackedPalms)
                 {
-
                     if (tobjects.Keys.Contains(palm.TrackID))
                     {
                         // update / move

+ 34 - 1
bbiwarg/bbiwarg.csproj

@@ -26,6 +26,7 @@
     <IsWebBootstrapper>false</IsWebBootstrapper>
     <UseApplicationTrust>false</UseApplicationTrust>
     <BootstrapperEnabled>true</BootstrapperEnabled>
+    <WcfConfigValidationEnabled>True</WcfConfigValidationEnabled>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <PlatformTarget>x86</PlatformTarget>
@@ -51,6 +52,29 @@
   <PropertyGroup>
     <StartupObject>BBIWARG.BBIWARG</StartupObject>
   </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x86\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+    <Optimize>true</Optimize>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>true</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
+    <OutputPath>bin\x86\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>true</Prefer32Bit>
+  </PropertyGroup>
   <ItemGroup>
     <Reference Include="Emgu.CV, Version=2.4.2.1777, Culture=neutral, PublicKeyToken=7281126722ab4438, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
@@ -75,6 +99,9 @@
     <Reference Include="System" />
     <Reference Include="System.Core" />
     <Reference Include="System.Drawing" />
+    <Reference Include="System.Runtime.Serialization" />
+    <Reference Include="System.ServiceModel" />
+    <Reference Include="System.ServiceModel.Web" />
     <Reference Include="System.Windows.Forms" />
     <Reference Include="System.Xml.Linq" />
     <Reference Include="System.Data.DataSetExtensions" />
@@ -83,6 +110,10 @@
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="API\Grid.cs" />
+    <Compile Include="API\IServer.cs" />
+    <Compile Include="API\Server.cs" />
+    <Compile Include="API\Slider.cs" />
     <Compile Include="Input\InputHandling\NewProcessedFrameEventArgs.cs" />
     <Compile Include="Input\InputProviding\NewFrameEventArgs.cs" />
     <Compile Include="Output\GlassesOutput\GlassesWindow.cs">
@@ -181,7 +212,9 @@
     <Compile Include="Utility\Vector3D.cs" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="App.config" />
+    <None Include="App.config">
+      <SubType>Designer</SubType>
+    </None>
   </ItemGroup>
   <ItemGroup>
     <Content Include="cudart32_55.dll">