Esempio n. 1
0
        /// <summary>
        /// Code copied from CP3
        /// </summary>
        /// <param name="style"></param>
        /// <returns></returns>
        public static List <string> GetVoteStringsFromStyle(QuickPollModel.QuickPollStyle style)
        {
            List <string> strings = new List <string>();

            switch (style)
            {
            case QuickPollModel.QuickPollStyle.YesNo:
                strings.Add("Yes");
                strings.Add("No");
                break;

            case QuickPollModel.QuickPollStyle.YesNoBoth:
                strings.Add("Yes");
                strings.Add("No");
                strings.Add("Both");
                break;

            case QuickPollModel.QuickPollStyle.YesNoNeither:
                strings.Add("Yes");
                strings.Add("No");
                strings.Add("Neither");
                break;

            case QuickPollModel.QuickPollStyle.ABC:
                strings.Add("A");
                strings.Add("B");
                strings.Add("C");
                break;

            case QuickPollModel.QuickPollStyle.ABCD:
                strings.Add("A");
                strings.Add("B");
                strings.Add("C");
                strings.Add("D");
                break;

            case QuickPollModel.QuickPollStyle.ABCDE:
                strings.Add("A");
                strings.Add("B");
                strings.Add("C");
                strings.Add("D");
                strings.Add("E");
                break;

            case QuickPollModel.QuickPollStyle.ABCDEF:
                strings.Add("A");
                strings.Add("B");
                strings.Add("C");
                strings.Add("D");
                strings.Add("E");
                strings.Add("F");
                break;

            case QuickPollModel.QuickPollStyle.Custom:
                // Do Nothing for now
                break;
            }
            return(strings);
        }
Esempio n. 2
0
            /// <summary>
            /// Constructs this menu item
            /// </summary>
            /// <param name="model">The PresenterModel to operate over</param>
            public PollTypeOptionMenuItem(PresenterModel model, string text, QuickPollModel.QuickPollStyle style)
            {
                localModel   = model;
                this.m_Style = style;
                this.Text    = text;

                using (Synchronizer.Lock(this.localModel.ViewerState.SyncRoot)) {
                    this.localModel.ViewerState.Changed["PollStyle"].Add(new PropertyEventHandler(this.HandleStyleChanged));
                }

                // Initialize the state of the menu items.
                this.HandleStyleChanged(this, null);
            }
Esempio n. 3
0
        /// <summary>
        /// Instantiates a new <see cref="ViewerStateModel"/>.
        /// </summary>
        public ViewerStateModel()
        {
            this.m_PollStyle                          = QuickPollModel.QuickPollStyle.ABCD;
            this.m_Document                           = new PrintDocument();
            this.m_PrintableDeck                      = null;
            this.m_SlidesPerPage                      = 6;
            this.m_LoggingEnabled                     = true;
            this.m_LoggingPath                        = ".\\Logs";
            this.m_SecondMonitorEnabled               = true;
            this.m_SecondMonitorWindowsAPIsEnabled    = true;
            this.m_SecondMonitorCustomCommandsEnabled = false;
            this.m_SecondMonitorCustomCommandType     = "";
            this.m_SecondMonitorCloneCommand          = "";
            this.m_SecondMonitorExtendCommand         = "";
            this.m_NumberOfScreens                    = System.Windows.Forms.Screen.AllScreens.Length;
            this.m_SlidePreviewEnabled                = true;
            this.m_SlidePreviewVisible                = false;
            this.m_SlidePreviewWidth                  = 400;
            this.m_SlidePreviewHeight                 = 300;
            this.m_AutoScrollEnabled                  = true;
            this.m_FilmStripEnabled                   = true;
            this.m_PrimaryMonitorFullScreen           = false;
            this.m_FEC = 0;
            this.m_InterPacketDelay          = 0;
            this.m_BeaconInterval            = 5;
            this.m_FilmStripAlignment        = DockStyle.Right;
            this.m_SaveOnClose               = true;
            this.m_BroadcastDisabled         = false;
            this.m_UseLightColorSet          = false;
            this.m_ClassmateMode             = false;
            this.m_DefaultPenWidth           = 53;
            this.m_DefaultHLWidth            = 318;
            this.m_StudentSubmissionInterval = 5;
            this.m_Language   = "en";
            this.m_DeviceName = string.Empty;
            this.m_OutPutSize = "320x240";

            this.m_FilmStripWidth             = 1;
            this.m_SSFilmStripWidth           = 3;
            this.m_iRole                      = 0;//0-disconnected, 1-Viewer, 2-Presenter, 3-Public
            this.m_Advanced                   = false;
            this.m_ManualConnectionButtonName = "";
            this.m_TCPaddress                 = "";
            this.m_ShowIP                     = true;
            this.m_StudentNavigationType      = LinkedDeckTraversalModel.NavigationSelector.Full;

            this.m_Diagnostic     = new DiagnosticModel();
            this.m_WebPerformance = new WebPerformanceModel();
        }
Esempio n. 4
0
        /// <summary>
        /// Handle the quick poll model changing
        /// </summary>
        /// <param name="sender">The object sending this event</param>
        /// <param name="args">The arguments for this event</param>
        private void HandleQuickPollChanged(object sender, PropertyEventArgs args)
        {
            QuickPollModel.QuickPollStyle pollStyle = QuickPollModel.QuickPollStyle.ABCD;

            if (this.m_Presentation != null)
            {
                using (Synchronizer.Lock(this.m_Presentation.SyncRoot))
                {
                    if (this.m_Presentation.QuickPoll != null)
                    {
                        using (Synchronizer.Lock(this.m_Presentation.QuickPoll.SyncRoot))
                        {
                            pollStyle = this.m_Presentation.QuickPoll.PollStyle;
                        }
                    }
                }
            }

            lock (WebService.Instance.GlobalModel) {
                WebService.Instance.GlobalModel.PollStyle = (int)pollStyle;
            }
            WebService.Instance.UpdateModel();
        }
Esempio n. 5
0
            /// <summary>
            /// Constructs this menu item
            /// </summary>
            /// <param name="model">The PresenterModel to operate over</param>
            public PollTypeOptionMenuItem( PresenterModel model, string text, QuickPollModel.QuickPollStyle style )
            {
                localModel = model;
                this.m_Style = style;
                this.Text = text;

                using( Synchronizer.Lock( this.localModel.ViewerState.SyncRoot ) ) {
                    this.localModel.ViewerState.Changed["PollStyle"].Add( new PropertyEventHandler( this.HandleStyleChanged ) );
                }

                // Initialize the state of the menu items.
                this.HandleStyleChanged( this, null );
            }
        private bool m_UseLightColorSet; // Use light color set as the pen color set

        #endregion Fields

        #region Constructors

        /// <summary>
        /// Instantiates a new <see cref="ViewerStateModel"/>.
        /// </summary>
        public ViewerStateModel()
        {
            this.m_PollStyle = QuickPollModel.QuickPollStyle.ABCD;
            this.m_Document = new PrintDocument();
            this.m_PrintableDeck = null;
            this.m_SlidesPerPage = 6;
            this.m_LoggingEnabled = true;
            this.m_LoggingPath = ".\\Logs";
            this.m_SecondMonitorEnabled = true;
            this.m_SecondMonitorWindowsAPIsEnabled = true;
            this.m_SecondMonitorCustomCommandsEnabled = false;
            this.m_SecondMonitorCustomCommandType = "";
            this.m_SecondMonitorCloneCommand = "";
            this.m_SecondMonitorExtendCommand = "";
            this.m_NumberOfScreens = System.Windows.Forms.Screen.AllScreens.Length;
            this.m_SlidePreviewEnabled = true;
            this.m_SlidePreviewVisible = false;
            this.m_SlidePreviewWidth = 400;
            this.m_SlidePreviewHeight = 300;
            this.m_AutoScrollEnabled = true;
            this.m_FilmStripEnabled = true;
            this.m_PrimaryMonitorFullScreen = false;
            this.m_FEC = 0;
            this.m_InterPacketDelay = 0;
            this.m_BeaconInterval = 5;
            this.m_FilmStripAlignment = DockStyle.Right;
            this.m_SaveOnClose = true;
            this.m_BroadcastDisabled = false;
            this.m_UseLightColorSet = false;
            this.m_ClassmateMode = false;
            this.m_DefaultPenWidth = 53;
            this.m_DefaultHLWidth = 318;
            this.m_Language = "en";

            this.m_FilmStripWidth = 1;
            this.m_SSFilmStripWidth = 3;
            this.m_iRole = 0;//0-disconnected, 1-Viewer, 2-Presenter, 3-Public
            this.m_Advanced = false;
            this.m_ManualConnectionButtonName = "";
            this.m_TCPaddress = "";
            this.m_ShowIP = true;

            this.m_Diagnostic = new DiagnosticModel();
        }
Esempio n. 7
0
 public VoteCounter(QuickPollModel.QuickPollStyle style)
 {
     m_Style = style;
     m_Votes = new Dictionary <Guid, string>();
 }