[chronojump] New class EncoderCaptureDisplay : BooleansInt



commit 22fee08c1960b4b87a58e57b2ef6695cb91b31c0
Author: Xavier de Blas <xaviblas gmail com>
Date:   Tue Jul 20 16:36:16 2021 +0200

    New class EncoderCaptureDisplay : BooleansInt

 src/gui/app1/encoder.cs | 45 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)
---
diff --git a/src/gui/app1/encoder.cs b/src/gui/app1/encoder.cs
index ba6db3011..9d12ae4c8 100644
--- a/src/gui/app1/encoder.cs
+++ b/src/gui/app1/encoder.cs
@@ -7780,3 +7780,48 @@ public partial class ChronoJumpWindow
        /* end of video stuff */
 
 }      
+
+public class EncoderCaptureDisplay : BooleansInt
+{
+//     private int selection;
+
+       //constructor when we have the 0-7 value
+       public EncoderCaptureDisplay(int selection)
+       {
+               this.i = selection;
+       }
+
+       //constructor with the 3 booleans
+       public EncoderCaptureDisplay(bool showBit1, bool showBit2, bool showBit3)
+       {
+               this.i = 0;
+               if(showBit1)
+                       i ++;
+               if(showBit2)
+                       i += 2;
+               if(showBit3)
+                       i += 4;
+       }
+
+       public bool ShowBars
+       {
+               get { return Bit3; }
+       }
+
+       public bool ShowTable
+       {
+               get { return Bit2; }
+       }
+
+       public bool ShowSignal
+       {
+               get { return Bit1; }
+       }
+
+       //just to debug
+       public override string ToString()
+       {
+               return string.Format("selected: {0} (ShowBars: {1}, ShowTable: {2}, ShowSignal: {3})",
+                               i, ShowBars, ShowTable, ShowSignal);
+       }
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]