Exemplo n.º 1
0
            public PropertiesTabControl(ViewerStateModel model, Point location, Size size, int tabIndex)
            {
                this.SuspendLayout();

                this.Font          = ViewerStateModel.StringFont;
                this.ItemSize      = new System.Drawing.Size(52, 18);
                this.Location      = location;
                this.Name          = "tabControl";
                this.SelectedIndex = 0;
                this.Size          = size;
                this.TabIndex      = tabIndex;

                ///
                /// NOTE: Unused property forms and controls were removed in r1313.
                /// They were deleted rather than commented out to avoid code cruftification.
                /// If you want to restore the InkPlaybackPropertiesPage, ReflectorPropertiesPage,
                /// or NamesProperiesPage in the future, just go take a look at r1312.
                ///

                this.Controls.Add(new GeneralPropertiesPage(model));
                this.Controls.Add(new NetworkPropertiesPage(model));
                this.Controls.Add(new DisplayPropertiesPage(model));
#if DEBUG && LOGGING
                this.Controls.Add(new LoggingPropertiesPage(model));
#endif

                this.ResumeLayout();
            }
Exemplo n.º 2
0
                    public DeviceDropDown(ViewerStateModel vsm, Point location, Size size, int tabIndex)
                    {
                        this.m_VSModel = vsm;
                        this.SuspendLayout();

                        this.FlatStyle     = FlatStyle.System;
                        this.Location      = location;
                        this.Size          = size;
                        this.TabIndex      = tabIndex;
                        this.DropDownStyle = ComboBoxStyle.DropDownList;
                        this.Items.Add("<none>");
                        this.Items.Add("NVIDIA nView -- nvcpl.dll");
                        this.Items.Add("<custom>");

                        using (Synchronizer.Lock(vsm.SyncRoot)) {
                            if (this.m_VSModel.SecondMonitorCustomCommandType == "")
                            {
                                this.SelectedItem = "<none>";
                            }
                            else
                            {
                                this.SelectedItem = this.m_VSModel.SecondMonitorCustomCommandType;
                            }
                        }

                        this.ResumeLayout();
                    }
Exemplo n.º 3
0
                public LanguageComboBox(ViewerStateModel vsm, Point location, Size size, int tabIndex)
                {
                    this.m_VSModel = vsm;

                    this.SuspendLayout();

                    this.Location = location;
                    this.Size     = size;
                    this.TabIndex = tabIndex;
                    this.Name     = "LanguageComboBox";

                    this.Items.AddRange(this.m_Language);

                    string lang;

                    using (Synchronizer.Lock(this.m_VSModel.SyncRoot)) {
                        lang = this.m_VSModel.Language;
                    }

                    for (int i = 0; i < this.m_Local.Length; i++)
                    {
                        if (lang.Equals(this.m_Local[i]))
                        {
                            this.SelectedIndex = i;
                            break;
                        }
                    }

                    if (this.SelectedIndex == -1)
                    {
                        this.SelectedIndex = 0;
                    }

                    this.ResumeLayout();
                }
Exemplo n.º 4
0
                public LoggingPathTextBox(ViewerStateModel model, Point location, Size size, int tabIndex)
                {
                    this.m_ViewerState = model;

                    this.SuspendLayout();

                    this.Location = location;
                    this.Size     = size;
                    this.TabIndex = tabIndex;
                    this.Name     = "LoggingPathTextBox";
                    this.ReadOnly = false;
                    this.Text     = "";
                    this.Enabled  = true;

                    if (model != null)
                    {
                        string text = "";
                        using (Synchronizer.Lock(model.SyncRoot)) {
                            text = model.LoggingPath;
                        }

                        this.Text = text;
                    }

                    this.ResumeLayout();
                }
Exemplo n.º 5
0
        private void FontSetting()
        {
            string family = SystemFonts.MessageBoxFont.Name;
            float  size   = SystemFonts.MessageBoxFont.Size;

            ViewerStateModel.SetUIFont(family, size);
        }
Exemplo n.º 6
0
            public BeaconIntervalUpDown(ViewerStateModel vsm, Point location, Size size, int tabIndex)
            {
                this.m_VSModel = vsm;

                this.SuspendLayout();

                this.Location = location;
                this.Size     = size;
                this.TabIndex = tabIndex;
                this.Name     = "BeaconIntervalUpDown";

                //Retrive the current value from the model
                int currValue;

                using (Synchronizer.Lock(vsm.SyncRoot)) {
                    currValue = vsm.BeaconInterval;
                }
                this.Value = currValue;

                this.Maximum       = 300.0M;
                this.Minimum       = 1M;
                this.Increment     = 1M;
                this.DecimalPlaces = 0;
                this.Enabled       = true;

                this.ResumeLayout();
            }
Exemplo n.º 7
0
        /// <summary>
        /// Constructs a properties form and hooks it into the model
        /// </summary>
        public PropertiesForm(ViewerStateModel model)
        {
            // Save the model
            applicationModel = model;
            localModel       = (ViewerStateModel)model.Clone();

            // Setup the display of the form
            this.SuspendLayout();

            this.AutoScaleBaseSize = new Size(5, 13);
            this.ClientSize        = new System.Drawing.Size(564, 342);
            this.Font            = ViewerStateModel.FormFont;
            this.FormBorderStyle = FormBorderStyle.FixedDialog;
            this.MaximizeBox     = false;
            this.Name            = "PropertiesForm";
            this.Text            = Strings.Properties;

            // Add the child controls
            this.Controls.Add(new PropertiesTabControl(localModel, new Point(0, 0), new Size(564, 304), 0));
            this.Controls.Add(new PropertiesOKButton(applicationModel, localModel, new Point(122, 310), 1));
            this.Controls.Add(new PropertiesCancelButton(applicationModel, localModel, new Point(241, 310), 2));
            this.Controls.Add(new PropertiesApplyButton(applicationModel, localModel, new Point(360, 310), 3));

            this.ResumeLayout();
        }
Exemplo n.º 8
0
                /// <summary>
                ///
                /// </summary>
                public SpecialCommandsGroup(ViewerStateModel vsm, Point location, Size size, int tabIndex)
                {
                    this.SuspendLayout();

                    this.FlatStyle = FlatStyle.System;
                    this.Location  = location;
                    this.Size      = size;
                    this.TabIndex  = tabIndex;
                    this.Name      = "SpecialCommandsGroup";
                    this.TabStop   = false;
                    this.Text      = Strings.CustomCommands;
                    this.Enabled   = true;

                    // Add the controls
                    this.Controls.Add(new DeviceInfoLabel(new Point(16, 17), new Size(100, 24), 7));
                    deviceDropDown = new DeviceDropDown(vsm, new Point(118, 16), new Size(308, 21), 8);
                    this.Controls.Add(deviceDropDown);
                    this.Controls.Add(new CloneInfoLabel(new Point(30, 41), new Size(148, 24), 9));
                    cloneTextBox = new CloneTextBox(vsm, new Point(180, 40), new Size(246, 21), 10);
                    this.Controls.Add(cloneTextBox);
                    this.Controls.Add(new ExtendedInfoLabel(new Point(30, 65), new Size(138, 24), 11));
                    extendedTextBox = new ExtendedTextBox(vsm, new Point(180, 64), new Size(246, 21), 12);
                    this.Controls.Add(extendedTextBox);

                    this.ResumeLayout();
                }
Exemplo n.º 9
0
                    public ExtendedTextBox(ViewerStateModel vsm, Point location, Size size, int tabIndex)
                    {
                        this.m_ViewerState = vsm;

                        this.SuspendLayout();

                        this.Location = location;
                        this.Size     = size;
                        this.TabIndex = tabIndex;
                        this.Name     = "ExtendedTextBox";
                        this.ReadOnly = false;
                        this.Text     = "";
                        this.Enabled  = true;

                        if (this.m_ViewerState != null)
                        {
                            string text = "";
                            using (Synchronizer.Lock(this.m_ViewerState.SyncRoot)) {
                                text = this.m_ViewerState.SecondMonitorExtendCommand;
                            }

                            this.Text = text;
                        }

                        this.ResumeLayout();
                    }
Exemplo n.º 10
0
        /// <summary>
        /// Attach to the ViewerStateModel and listen for changes
        /// </summary>
        /// <param name="viewer"></param>
        public void AttachToModel(ViewerStateModel viewer)
        {
            this.m_ViewerState = viewer;

            // Add even listeners
            this.m_ViewerState.Changed["LoggingEnabled"].Add(new PropertyEventHandler(this.OnLoggingChanged));
            this.m_ViewerState.Changed["LoggingPath"].Add(new PropertyEventHandler(this.OnLoggingChanged));
        }
Exemplo n.º 11
0
 public PropertiesCancelButton(ViewerStateModel oldModel, ViewerStateModel newModel, Point location, int tabIndex)
 {
     this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
     this.FlatStyle    = FlatStyle.System;
     this.Font         = ViewerStateModel.StringFont;
     this.Location     = location;
     this.Name         = "propertiesCancelButton";
     this.TabIndex     = tabIndex;
     this.Text         = Strings.Cancel;
 }
Exemplo n.º 12
0
        /// <summary>
        /// Constructs the backend for updating information about the machine state of the
        /// application
        /// </summary>
        /// <param name="viewerState">
        /// The <see cref="ViewerStateModel"/> object to be modified
        /// </param>
        public ViewerStateService(ViewerStateModel viewerState)
        {
            // We need access to the viewer state
            m_ViewerState = viewerState;

            // Create the timer to listen for changes to the environment
            this.m_ScreenCheckTimer          = new System.Windows.Forms.Timer();
            this.m_ScreenCheckTimer.Interval = 500;
            this.m_ScreenCheckTimer.Enabled  = true;
            this.m_ScreenCheckTimer.Tick    += new EventHandler(this.OnScreenCheckTimerTick);
        }
Exemplo n.º 13
0
 public CaptureGraphForm(SlideModel slide, ViewerStateModel viewerstate)//, Viewer.Slides.MainSlideViewer m)
 {
     this.m_ViewerState = viewerstate;
     using (Synchronizer.Lock(this.m_ViewerState.SyncRoot))
     {
         this.m_DeviceName = this.m_ViewerState.DeviceName;
         this.m_OutPutSize = this.m_ViewerState.OutPutSize;
     }
     this.m_Slide = slide;
     InitializeComponent();
 }
Exemplo n.º 14
0
            public PropertiesApplyButton(ViewerStateModel oldModel, ViewerStateModel newModel, Point location, int tabIndex)
            {
                this.applicationModel = oldModel;
                this.localModel       = newModel;

                this.FlatStyle = FlatStyle.System;
                this.Font      = ViewerStateModel.StringFont;
                this.Location  = location;
                this.Name      = "propertiesApplyButton";
                this.TabIndex  = tabIndex;
                this.Text      = Strings.Apply;
            }
Exemplo n.º 15
0
                public RestoreSettingsButton(ViewerStateModel vsm, Point location, Size size, int tabIndex)
                {
                    this.m_VSM = vsm;

                    this.SuspendLayout();

                    this.FlatStyle = FlatStyle.System;
                    this.Location  = location;
                    this.Size      = size;
                    this.TabIndex  = tabIndex;
                    this.Name      = "RestoreSettingsButton";
                    this.Text      = Strings.RestoreDefaults;

                    this.ResumeLayout();
                }
Exemplo n.º 16
0
        /// <summary>
        /// Constructs a new Logging Properties page
        /// </summary>
        public LoggingPropertiesPage(ViewerStateModel model)
        {
            this.SuspendLayout();

            this.Location = new System.Drawing.Point(4, 22);
            this.Name     = "LoggingTabPage";
            this.Size     = new System.Drawing.Size(556, 248);
            this.TabIndex = 9;
            this.Text     = Strings.Logging;

            // Add the controls
            this.Controls.Add(new LoggingGroup(model, new Point(16, 24), new Size(524, 88), 3));

            this.ResumeLayout();
        }
Exemplo n.º 17
0
        /// <summary>
        /// Constructs a service to keep track of changes to the model objects and store them in the
        /// registry
        /// </summary>
        /// <param name="toSave">The model class with values we want to save in the registry</param>
        public PrintingService(ViewerStateModel viewer)
        {
            this.m_ViewerState = viewer;

            using (Synchronizer.Lock(this.m_ViewerState.SyncRoot)) {
                viewer.Document.PrintPage += new PrintPageEventHandler(this.OnPrintPage);
            }

            // Add even listeners
            this.m_ViewerState.Changed["SlidesPerPage"].Add(new PropertyEventHandler(this.OnPageSetupChanged));

            // Get the initial Pages Per Sheet setting
            using (Synchronizer.Lock(this.m_ViewerState.SyncRoot)) {
                this.m_PagesPerSheet = this.m_ViewerState.SlidesPerPage;
            }
        }
Exemplo n.º 18
0
        /// <summary>
        /// Constructs a new Display Properties Page
        /// </summary>
        public DisplayPropertiesPage(ViewerStateModel vsm)
        {
            this.SuspendLayout();

            this.Location = new System.Drawing.Point(4, 22);
            this.Name     = "DisplayTabPage";
            this.Size     = new System.Drawing.Size(556, 248);
            this.TabIndex = 6;
            this.Text     = Strings.Displays;

            // Add the controls
            this.Controls.Add(new DualMonitorEnabledCheckBox(vsm, new Point(16, 8), new Size(522, 24), 0));
            this.Controls.Add(new MonitorSwitchingGroup(vsm, new Point(16, 32), new Size(522, 196), 1));

            this.ResumeLayout();
        }
Exemplo n.º 19
0
 public PresenterModel()
 {
     this.m_Stylus          = null;
     this.m_CurrentResult   = null;
     this.m_Network         = new NetworkModel();
     this.m_VersionExchange = new VersionExchangeModel();
     /// Note: We currently assume that the ParticipantModel Guid will be different for each application invocation.
     /// (In particular TCP reconnection relies on this assumption.)  If we need an identifer that persists across
     /// sessions, we'd need to create a new identifier for this.
     ParticipantId      = Guid.NewGuid();
     this.m_Participant = new ParticipantModel(ParticipantId, System.Windows.Forms.SystemInformation.UserName);
     this.m_Workspace   = new WorkspaceModel();
     this.m_Undo        = new UndoModel();
     this.m_ViewerState = new ViewerStateModel();
     this.m_PenState    = new PenStateModel();
     TheInstance        = this;
 }
Exemplo n.º 20
0
            public BroadcastIPGroup(ViewerStateModel model, Point location, Size size, int tabIndex)
            {
                this.SuspendLayout();

                this.FlatStyle = FlatStyle.System;
                this.Location  = location;
                this.Size      = size;
                this.TabIndex  = tabIndex;
                this.Name      = "groupBox1";
                this.TabStop   = false;
                this.Text      = Strings.BroadcastIP;

                // Add the controls
                this.Controls.Add(new BroadcastIPCheckBox(model, new Point(16, 12), new Size(220, 24), 0));

                this.ResumeLayout();
            }
Exemplo n.º 21
0
            /// <summary>
            ///
            /// </summary>
            public StudentSubmissionTimerPropertiesGroup(ViewerStateModel vsm, Point location, Size size, int tabIndex)
            {
                this.SuspendLayout();

                this.FlatStyle = FlatStyle.System;
                this.Location  = location;
                this.Size      = size;
                this.TabIndex  = tabIndex;
                this.Name      = "StudentSubmissionTimerPropertiesGroup";
                this.TabStop   = false;
                this.Text      = Strings.StudentSubmissionTimerProperties;
                this.Enabled   = true;

                this.Controls.Add(new SubmissionIntervalLabel(new Point(16, 14), new Size(110, 25), 2));
                this.Controls.Add(new SubmissionIntervalUpDown(vsm, new Point(130, 16), new Size(50, 20), 3));

                this.ResumeLayout();
            }
Exemplo n.º 22
0
            /// <summary>
            /// Constructor a LanguageGroup
            /// </summary>
            public LanguageGroup(ViewerStateModel vsm, Point location, Size size, int tabIndex)
            {
                this.SuspendLayout();

                this.FlatStyle = FlatStyle.System;
                this.Location  = location;
                this.Size      = size;
                this.TabIndex  = tabIndex;
                this.Name      = "LanguageGroup";
                this.TabStop   = false;
                this.Text      = Strings.Language;
                this.Enabled   = true;

                this.Controls.Add(new LanguageComboBox(vsm, new Point(16, 44), new Size(180, 21), 0));
                this.Controls.Add(new LanguageLabel(new Point(16, 16), new Size(220, 28), 1));

                this.ResumeLayout();
            }
Exemplo n.º 23
0
            /// <summary>
            ///
            /// </summary>
            public SavingFilesGroup(ViewerStateModel vsm, Point location, Size size, int tabIndex)
            {
                this.SuspendLayout();

                this.FlatStyle = FlatStyle.System;
                this.Location  = location;
                this.Size      = size;
                this.TabIndex  = tabIndex;
                this.Name      = "SavingFilesGroup";
                this.TabStop   = false;
                this.Text      = Strings.SavingFiles;
                this.Enabled   = true;

                // Add the controls
                this.Controls.Add(new ClosePromptCheckBox(vsm, new Point(16, 12), new Size(220, 24), 3));

                this.ResumeLayout();
            }
Exemplo n.º 24
0
            /// <summary>
            ///
            /// </summary>
            public DefaultSettingsGroup(ViewerStateModel vsm, Point location, Size size, int tabIndex)
            {
                this.SuspendLayout();

                this.FlatStyle = FlatStyle.System;
                this.Location  = location;
                this.Size      = size;
                this.TabIndex  = tabIndex;
                this.Name      = "DefaultSettingsGroup";
                this.TabStop   = false;
                this.Text      = Strings.DefaultSettings;
                this.Enabled   = true;

                // Add the controls
                this.Controls.Add(new RestoreSettingsButton(vsm, new Point(43, 18), new Size(164, 23), 1));

                this.ResumeLayout();
            }
Exemplo n.º 25
0
                public AutoScrollCheckBox(ViewerStateModel vsm, Point location, Size size, int tabIndex)
                {
                    this.m_VSModel = vsm;
                    this.SuspendLayout();

                    this.FlatStyle = FlatStyle.System;
                    this.Location  = location;
                    this.Size      = size;
                    this.TabIndex  = tabIndex;
                    this.Name      = "AutoScrollCheckBox";
                    this.Text      = Strings.AutoScroll;

                    using (Synchronizer.Lock(this.m_VSModel.SyncRoot)) {
                        this.Checked = this.m_VSModel.AutoScrollEnabled;
                    }

                    this.ResumeLayout();
                }
Exemplo n.º 26
0
                public PagesDropDown(ViewerStateModel vsm, Point location, Size size, int tabIndex)
                {
                    this.m_VSModel = vsm;
                    this.SuspendLayout();

                    this.FlatStyle = FlatStyle.System;
                    this.Location  = location;
                    this.Size      = size;
                    this.TabIndex  = tabIndex;
                    this.Items.Add(1);
                    this.Items.Add(2);
                    this.Items.Add(4);
                    this.Items.Add(6);

                    using (Synchronizer.Lock(vsm.SyncRoot))
                        this.SelectedItem = vsm.SlidesPerPage;

                    this.ResumeLayout();
                }
Exemplo n.º 27
0
            /// <summary>
            ///
            /// </summary>
            public PrintingGroup(ViewerStateModel vsm, Point location, Size size, int tabIndex)
            {
                this.SuspendLayout();

                this.FlatStyle = FlatStyle.System;
                this.Location  = location;
                this.Size      = size;
                this.TabIndex  = tabIndex;
                this.Name      = "PrintingGroup";
                this.TabStop   = false;
                this.Text      = Strings.Printing;
                this.Enabled   = true;

                // Add the controls
                this.Controls.Add(new PagesDropDown(vsm, new Point(16, 18), new Size(40, 20), 0));
                this.Controls.Add(new PagesInfoLabel(new Point(60, 20), new Size(170, 24), 1));

                this.ResumeLayout();
            }
Exemplo n.º 28
0
            /// <summary>
            /// Constructor for the group box
            /// </summary>
            public LoggingGroup(ViewerStateModel model, Point location, Size size, int tabIndex)
            {
                this.SuspendLayout();

                this.Location  = location;
                this.FlatStyle = FlatStyle.System;
                this.Size      = size;
                this.TabIndex  = tabIndex;
                this.Name      = "grpLogging";
                this.TabStop   = false;
                this.Text      = Strings.LoggingOptions;
                this.Enabled   = true;

                // Add the controls
                this.Controls.Add(new LoggingEnabledCheckBox(model, new Point(10, 18), new Size(260, 24), 32));
                this.Controls.Add(new LoggingPathLabel(new Point(10, 50), new Size(155, 24), 68));
                this.Controls.Add(new LoggingPathTextBox(model, new Point(169, 50), new Size(341, 21), 31));

                this.ResumeLayout();
            }
Exemplo n.º 29
0
            /// <summary>
            ///
            /// </summary>
            public PenPropertiesGroup(ViewerStateModel vsm, Point location, Size size, int tabIndex)
            {
                this.SuspendLayout();

                this.FlatStyle = FlatStyle.System;
                this.Location  = location;
                this.Size      = size;
                this.TabIndex  = tabIndex;
                this.Name      = "PenPropertiesGroup";
                this.TabStop   = false;
                this.Text      = Strings.Pen;
                this.Enabled   = true;

                this.Controls.Add(new UseLightColorCheckBox(vsm, new Point(16, 14), new Size(210, 20), 1));
                this.Controls.Add(new PenWidthLabel(new Point(16, 38), new Size(110, 20), 2));
                this.Controls.Add(new PenWidthUpDown(vsm, new Point(130, 36), new Size(50, 20), 3));
                this.Controls.Add(new HLWidthLabel(new Point(16, 61), new Size(110, 20), 4));
                this.Controls.Add(new HLWidthUpDown(vsm, new Point(130, 59), new Size(50, 20), 5));

                this.ResumeLayout();
            }
Exemplo n.º 30
0
            /// <summary>
            ///
            /// </summary>
            public FilmstripPropertiesGroup(ViewerStateModel vsm, Point location, Size size, int tabIndex)
            {
                this.SuspendLayout();

                this.FlatStyle = FlatStyle.System;
                this.Location  = location;
                this.Size      = size;
                this.TabIndex  = tabIndex;
                this.Name      = "FilmstripPropertiesGroup";
                this.TabStop   = false;
                this.Text      = Strings.FilmStrip;
                this.Enabled   = true;

                // Add the controls
                this.Controls.Add(new SlidePreviewCheckBox(vsm, new Point(16, 36), new Size(200, 20), 1));
                this.Controls.Add(new SlidePreviewWidthLabel(new Point(16, 64), new Size(120, 20), 2));
                this.Controls.Add(new SlidePreviewWidthUpDown(vsm, new Point(141, 63), new Size(50, 20), 3));
                this.Controls.Add(new AutoScrollCheckBox(vsm, new Point(16, 14), new Size(200, 20), 6));

                this.ResumeLayout();
            }