当前位置: 首页>>代码示例>>C#>>正文


C# Model.ControlEventQueue类代码示例

本文整理汇总了C#中UW.ClassroomPresenter.Model.ControlEventQueue的典型用法代码示例。如果您正苦于以下问题:C# ControlEventQueue类的具体用法?C# ControlEventQueue怎么用?C# ControlEventQueue使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ControlEventQueue类属于UW.ClassroomPresenter.Model命名空间,在下文中一共展示了ControlEventQueue类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: PresentationRadioButton

        public PresentationRadioButton(ControlEventQueue dispatcher, PresentationModel presentation, StartupForm stup, PresentationsPanel parent, int i, ClassroomModel classroom)
        {
            this.m_EventQueue = dispatcher;
            this.m_Presentation = presentation;
            this.Tag = presentation.Owner;
            this.m_Startup = stup;
            this.Parent = parent;
            this.m_PresentationsPanel = parent;
            this.m_Classroom = classroom;
            this.Parent.Controls.Add(this);

            this.FlatStyle = FlatStyle.System;
            this.Font = Model.Viewer.ViewerStateModel.StringFont1;
            this.index = i;

            this.Location = new Point(10, (2*this.Font.Height) * (this.index + 1));
            this.Size = new Size(this.Parent.Width - 14, 2*this.Font.Height);

            //If the role changes we should remove ourself from our parent.
            this.m_ViewerStateRoleListener = new EventQueue.PropertyEventDispatcher(this.m_Startup.m_EventQueue,
                    new PropertyEventHandler(this.HandleViewerStateRoleChanged));
            this.m_Startup.m_Model.ViewerState.Changed["iRole"].Add(this.m_ViewerStateRoleListener.Dispatcher);

            this.m_HumanNameChangedDispatcher = new EventQueue.PropertyEventDispatcher(this.m_EventQueue, new PropertyEventHandler(this.HandleHumanNameChanged));
            this.Presentation.Changed["HumanName"].Add(this.m_HumanNameChangedDispatcher.Dispatcher);
            this.m_HumanNameChangedDispatcher.Dispatcher(this.Presentation, null);
            this.CheckedChanged += new EventHandler(HandlePresentationSelectionChanged);

            this.m_ConnectedChangedDispatcher = new EventQueue.PropertyEventDispatcher(this.m_EventQueue, new PropertyEventHandler(this.HandleConnectedChanged));
            this.m_Classroom.Changed["Connected"].Add(this.m_ConnectedChangedDispatcher.Dispatcher);
            this.HandleConnectedChanged(this.m_Classroom, null);
        }
开发者ID:ClassroomPresenter,项目名称:CP3,代码行数:32,代码来源:PresentationsPanel.cs

示例2: ConnectTCPRadioButton

        public ConnectTCPRadioButton(ControlEventQueue dispatcher, PresenterModel model, ManualConnectionPanel manual, Point location, int width)
        {
            this.m_EventQueue = dispatcher;
            this.m_Model = model;
            this.m_Manual = manual;
            this.m_Connected = false;
            this.FlatStyle = FlatStyle.System;
            this.Font = Model.Viewer.ViewerStateModel.StringFont1;
            this.Text = Strings.ConnectToTCPServer;
            this.Location = location;
            this.Size = new Size(width, this.Font.Height + 5);
            this.m_ClassroomManager = null;

            //Watch for Role changes and disable if role is Instructor.
            this.m_RoleChangedDispatcher = new EventQueue.PropertyEventDispatcher(this.m_EventQueue, new PropertyEventHandler(this.HandleRoleChanged));
            this.m_Model.Participant.Changed["Role"].Add(this.m_RoleChangedDispatcher.Dispatcher);
            using (Synchronizer.Lock(this.m_Model.Participant.SyncRoot)) {
                if (this.m_Model.Participant.Role is InstructorModel)
                    this.Enabled = false;
                else
                    this.Enabled = true;
            }

            //should probably make this a listener
            //Do persistence in a more intelligent way - this doesn't make the popup pop up.
            /*using (Synchronizer.Lock(this.m_Model.ViewerState.SyncRoot)) {
                if (this.Text == this.m_Model.ViewerState.ManualConnectionButtonName) {
                    this.Checked = true;
                    }
                }*/

            this.CheckedChanged += new EventHandler(OnClick);

            this.m_ProtocolCollectionHelper = new ProtocolCollectionHelper(this, this.m_Model.Network);
        }
开发者ID:kevinbrink,项目名称:CP3_Enhancement,代码行数:35,代码来源:ConnectTCPRadioButton.cs

示例3: RedoMenuItem

 public RedoMenuItem(ControlEventQueue dispatcher, PresenterModel model)
     : base(dispatcher, model)
 {
     this.Text = Strings.Redo;
     this.Shortcut = Shortcut.CtrlY;
     this.ShowShortcut = true;
 }
开发者ID:kevinbrink,项目名称:CP3_Enhancement,代码行数:7,代码来源:EditMenu.cs

示例4: EditMenu

        public EditMenu(ControlEventQueue dispatcher, PresenterModel model)
        {
            this.Text = Strings.Edit;

            this.MenuItems.Add(new UndoMenuItem(dispatcher, model));
            this.MenuItems.Add(new RedoMenuItem(dispatcher, model));
        }
开发者ID:kevinbrink,项目名称:CP3_Enhancement,代码行数:7,代码来源:EditMenu.cs

示例5: MainToolBar

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="model">The model that this component modifies</param>
        public MainToolBar(PresenterModel model, ControlEventQueue dispatcher)
        {
            // Initialize private variables
            this.m_EventQueue = dispatcher;
            this.m_Model = model;

            // Setup the object UI description
            this.SuspendLayout();

            this.Name = "MainToolBar";
            this.GripStyle = ToolStripGripStyle.Hidden;

            // Create the primary image list for this object
            this.ImageList = new ImageList();
            this.ImageList.ImageSize = new Size(40, 40);
            this.ImageList.ColorDepth = ColorDepth.Depth32Bit;

            // Set the default button size
            this.ImageScalingSize = new Size( 40, 40 );
            this.AutoSize = true;

            // Assign a custom renderer to this object so that rendering appears
            // in the old style
            this.Renderer = new CustomRenderer();

            this.ResumeLayout();
        }
开发者ID:ClassroomPresenter,项目名称:CP3,代码行数:31,代码来源:MainToolBar.cs

示例6: FileMenu

        public FileMenu(ControlEventQueue dispatcher, PresenterModel model, DeckMarshalService marshal, CloseFormDelegate cfd) {
            this.Text = Strings.File;

            open_deck_ = new OpenDeckMenuItem(model, marshal);
            this.MenuItems.Add(open_deck_);
            this.MenuItems.Add(new CloseDeckMenuItem(dispatcher, model, marshal));
            this.MenuItems.Add(new MenuItem("-"));// Text of "-" signifies a separator bar.
            this.MenuItems.Add(new SaveDeckMenuItem(model, marshal));
            this.MenuItems.Add(new SaveDeckAsMenuItem(model, marshal));
            this.MenuItems.Add(new SaveAllDecksMenuItem(model, marshal));
            this.MenuItems.Add(new SaveAllDecksAsMenuItem(model, marshal));
            this.MenuItems.Add(new MenuItem("-")); // Text of "-" signifies a separator bar.
            this.MenuItems.Add(new ExportDeckAsImageItem(model));
            this.MenuItems.Add(new ExportDeckAsHTMLItem(model));
            this.MenuItems.Add(new ExportInkMenuItem(model));
            this.MenuItems.Add(new MenuItem("-"));
            this.MenuItems.Add(new PageSetupMenuItem(this, model));
            this.MenuItems.Add(new PrintPreviewMenuItem(this, model));
            this.MenuItems.Add(new PrintMenuItem(this, model));
            this.MenuItems.Add(new MenuItem( "-" ));
            this.MenuItems.Add(new ExitMenuItem(cfd));

            presenter_model_ = model;
            presenter_model_.Workspace.CurrentPresentation.ListenAndInitialize(dispatcher, new Property<PresentationModel>.EventHandler(this.HandlePresentationChanged));
            presenter_model_.Workspace.CurrentDeckTraversal.ListenAndInitialize(dispatcher, new Property<DeckTraversalModel>.EventHandler(this.HandleDeckChanged));
        }
开发者ID:ClassroomPresenter,项目名称:CP3,代码行数:26,代码来源:FileMenu.cs

示例7: FilmStripAlignmentMenu

 public FilmStripAlignmentMenu(ControlEventQueue dispatcher, PresenterModel model)
     : base(Strings.FilmStripAlignment)
 {
     this.MenuItems.Add(new DockMenuItem(dispatcher, model, DockStyle.Left, Strings.Left));
     this.MenuItems.Add(new DockMenuItem(dispatcher, model, DockStyle.Right, Strings.Right));
     this.MenuItems.Add(new DockMenuItem(dispatcher, model, DockStyle.Top, Strings.Top));
     this.MenuItems.Add(new DockMenuItem(dispatcher, model, DockStyle.Bottom, Strings.Bottom));
 }
开发者ID:kevinbrink,项目名称:CP3_Enhancement,代码行数:8,代码来源:ViewMenu.cs

示例8: ViewerMainMenu

 public ViewerMainMenu(ControlEventQueue dispatcher, PresenterModel model, DeckMarshalService marshal, FileMenu.CloseFormDelegate cfd)
 {
     this.MenuItems.Add(new FileMenu(dispatcher, model, marshal, cfd));
     this.MenuItems.Add(new EditMenu(dispatcher, model));
     this.MenuItems.Add(new ViewMenu(dispatcher, model));
     //this.MenuItems.Add(new ConnectMenu(dispatcher, model));
     this.MenuItems.Add(new ToolsMenu(model));
     this.MenuItems.Add(new DecksMenu(dispatcher, model));
     this.MenuItems.Add(new StudentMenu(dispatcher, model));
     this.MenuItems.Add(new HelpMenu());
 }
开发者ID:kevinbrink,项目名称:CP3_Enhancement,代码行数:11,代码来源:MainMenu.cs

示例9: DockMenuItem

            public DockMenuItem(ControlEventQueue dispatcher, PresenterModel model, DockStyle dock, string text)
                : base(text)
            {
                this.m_Model = model;
                this.m_DockStyle = dock;

                this.m_FilmStripAlignmentListener = new EventQueue.PropertyEventDispatcher(dispatcher,
                    new PropertyEventHandler(this.HandleFilmStripAlignmentChanged));
                this.m_Model.ViewerState.Changed["FilmStripAlignment"].Add(this.m_FilmStripAlignmentListener.Dispatcher);
                this.m_FilmStripAlignmentListener.Dispatcher(this, null);
            }
开发者ID:kevinbrink,项目名称:CP3_Enhancement,代码行数:11,代码来源:ViewMenu.cs

示例10: PreviewTraversalModelAdapter

        public PreviewTraversalModelAdapter(ControlEventQueue dispatcher, SlideViewer viewer, PresenterModel model)
        {
            this.m_EventQueue = dispatcher;
            this.m_Model = model;
            this.m_Viewer = viewer;

            this.m_CurrentSlidePreviewDeckTraversalChangedDispatcher =
                this.m_Model.Workspace.CurrentSlidePreviewDeckTraversal.ListenAndInitialize(dispatcher,
                delegate(Property<DeckTraversalModel>.EventArgs args) {
                    this.CurrentSlidePreviewDeckTraversal = args.New;
                });
        }
开发者ID:ClassroomPresenter,项目名称:CP3,代码行数:12,代码来源:PreviewTraversalModelAdater.cs

示例11: UndoMenuItem

            public UndoMenuItem(ControlEventQueue dispatcher, PresenterModel model)
            {
                this.m_Model = model;
                this.m_EventQueue = dispatcher;

                this.Text = Strings.Undo;
                this.Shortcut = Shortcut.CtrlZ;
                this.ShowShortcut = true;

                this.m_Model.Undo.Update += new EventHandler(this.HandleUndoableChanged);
                this.m_WorkspaceModelAdapter = new WorkspaceModelAdapter(dispatcher, this, this.m_Model);
            }
开发者ID:kevinbrink,项目名称:CP3_Enhancement,代码行数:12,代码来源:EditMenu.cs

示例12: StylusToolBarButton

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="dispatcher">The event queue</param>
        /// <param name="stylus">The stylus model</param>
        /// <param name="model">The presenter model</param>
        public StylusToolBarButton(ControlEventQueue dispatcher, StylusModel stylus, PresenterModel model)
        {
            this.m_EventQueue = dispatcher;
            this.m_Stylus = stylus;
            this.m_Model = model;

            this.m_StylusChangedDispatcher = new EventQueue.PropertyEventDispatcher(this.m_EventQueue, new PropertyEventHandler(this.HandleStylusChanged));
            this.m_Model.Changed["Stylus"].Add(this.m_StylusChangedDispatcher.Dispatcher);

            // Initialize the Pushed state.
            this.m_StylusChangedDispatcher.Dispatcher(null, null);
        }
开发者ID:kevinbrink,项目名称:CP3_Enhancement,代码行数:18,代码来源:StylusToolBarButton.cs

示例13: CloseDeckMenuItem

        public CloseDeckMenuItem(ControlEventQueue dispatcher, PresenterModel model, DeckMarshalService marshal)
        {
            this.m_EventQueue = dispatcher;
            this.m_Model = model;
            this.Text = Strings.CloseDeck;
            this.m_Marshal = marshal;

            this.m_CurrentDeckTraversalChangedDispatcher =
                this.m_Model.Workspace.CurrentDeckTraversal.ListenAndInitialize(dispatcher,
                delegate(Property<DeckTraversalModel>.EventArgs args) {
                    this.CurrentDeckTraversal = args.New;
                });
        }
开发者ID:ClassroomPresenter,项目名称:CP3,代码行数:13,代码来源:CloseDeckMenuItem.cs

示例14: SlidePreview

        /// <summary>
        /// Constructs this control
        /// </summary>
        public SlidePreview(PresenterModel model, Control linked)
        {
            this.m_Model = model;

            this.m_EventQueue = new ControlEventQueue(this);

            this.m_Linked = linked;
            this.m_Linked.SizeChanged += new EventHandler(this.OnLinkedControlSizeChanged);
            this.m_Linked.LocationChanged += new EventHandler(this.OnLinkedControlSizeChanged);
            this.m_Linked.DockChanged += new EventHandler(this.OnLinkedControlSizeChanged);
            //this.OnLinkedControlSizeChanged(this, EventArgs.Empty);

            // Create the control's properties
            this.SuspendLayout();

            this.Name = "SlidePreview";
            this.Visible = false;
            this.BackColor = System.Drawing.Color.Black;
            this.DockPadding.All = 4;

            this.m_PreviewSlideViewer = new MainSlideViewer(this.m_Model, false);
            this.m_PreviewSlideViewer.Dock = DockStyle.Fill;
            //Set the disposition to always be public
            using (Synchronizer.Lock(this.m_PreviewSlideViewer.SlideDisplay.SyncRoot)) {
                this.m_PreviewSlideViewer.SlideDisplay.SheetDisposition = Model.Presentation.SheetDisposition.SecondMonitor;
            }

            //Listen to changes in the role
            this.m_Model.Participant.Changed["Role"].Add(new PropertyEventHandler(this.onRoleChange));
            //Set the initial role
            this.onRoleChange(this, null);

            this.m_SlidePreviewChangedDispatcher = new EventQueue.PropertyEventDispatcher(this.m_EventQueue, new PropertyEventHandler(this.HandleSlidePreviewChanged));
            this.m_Model.ViewerState.Changed["SlidePreviewEnabled"].Add(this.m_SlidePreviewChangedDispatcher.Dispatcher);
            this.m_Model.ViewerState.Changed["SlidePreviewVisible"].Add(this.m_SlidePreviewChangedDispatcher.Dispatcher);
            this.m_SlidePreviewSizeChangedDispatcher = new EventQueue.PropertyEventDispatcher(this.m_EventQueue, new PropertyEventHandler(this.HandleSlidePreviewSizeChanged));
            this.m_Model.ViewerState.Changed["SlidePreviewWidth"].Add(this.m_SlidePreviewSizeChangedDispatcher.Dispatcher);
            this.m_Model.ViewerState.Changed["SlidePreviewHeight"].Add(this.m_SlidePreviewSizeChangedDispatcher.Dispatcher);

            this.Controls.Add(this.m_PreviewSlideViewer);

            // Initialize the SlidePreview's visibility.
            this.m_SlidePreviewChangedDispatcher.Dispatcher(this, null);
            this.m_SlidePreviewSizeChangedDispatcher.Dispatcher(this, null);

            this.ResumeLayout();

            // Create the control immediately, or else event queue will never execute anything (chicken and the egg).
            this.CreateHandle();
        }
开发者ID:ClassroomPresenter,项目名称:CP3,代码行数:53,代码来源:SlidePreview.cs

示例15: MainToolBars

        public MainToolBars(PresenterModel model, ControlEventQueue dispatcher)
        {
            this.m_Model = model;
            this.m_EventQueue = dispatcher;

            this.m_StylusToolBarButton = new StylusToolBarButtons(this.m_Model);
            this.m_SlideToolBarButton = new SlideToolBarButtons(this.m_Model);
            this.m_StudentToolBarButton = new StudentToolBarButtons(this.m_Model);
            this.m_UndoToolBarButton = new UndoToolBarButtons(this.m_Model);
            this.m_InstructorToolBarButton = new InstructorToolBarButtons(this.m_Model);
            this.m_DeckNavigationToolBarButton = new DeckNavigationToolBarButtons(this.m_Model);

            this.m_MainToolBar = new MainToolBar(this.m_Model, this.m_EventQueue);
            this.m_StylusToolBarButton.MakeButtons(this.m_MainToolBar, this.m_EventQueue);
            this.m_MainToolBar.Items.Add(new ToolStripSeparator());
            this.m_MainToolBar.Items.Add(new ToolStripSeparator());
            this.m_SlideToolBarButton.MakeButtons(this.m_MainToolBar, this.m_EventQueue);
            this.m_MainToolBar.Items.Add(new ToolStripSeparator());
            this.m_StudentToolBarButton.MakeButtons(this.m_MainToolBar, this.m_EventQueue);
            this.m_MainToolBar.Items.Add(new ToolStripSeparator());
            this.m_UndoToolBarButton.MakeButtons(this.m_MainToolBar, this.m_EventQueue);
            this.m_MainToolBar.Items.Add(new ToolStripSeparator());
            this.m_MainToolBar.Items.Add(new ToolStripSeparator());
            this.m_InstructorToolBarButton.MakeButtons(this.m_MainToolBar, this.m_EventQueue);
            this.m_MainToolBar.Items.Add(new ToolStripSeparator());
            this.m_DeckNavigationToolBarButton.MakeButtons(this.m_MainToolBar, this.m_EventQueue);

            this.m_MainClassmateToolBar = new MainToolBar(this.m_Model, this.m_EventQueue);
            this.m_ExtraClassmateToolBar = new MainToolBar(this.m_Model, this.m_EventQueue);
            this.m_StylusToolBarButton.MakeButtons(this.m_MainClassmateToolBar, this.m_ExtraClassmateToolBar, this.m_EventQueue);
            this.m_MainClassmateToolBar.Items.Add(new ToolStripSeparator());
            this.m_ExtraClassmateToolBar.Items.Add(new ToolStripSeparator());
            this.m_SlideToolBarButton.MakeButtons(this.m_MainClassmateToolBar, this.m_ExtraClassmateToolBar, this.m_EventQueue);
            this.m_StudentToolBarButton.MakeButtons(this.m_MainClassmateToolBar, this.m_ExtraClassmateToolBar, this.m_EventQueue);
            this.m_UndoToolBarButton.MakeButtons(this.m_MainClassmateToolBar, this.m_ExtraClassmateToolBar, this.m_EventQueue);
            this.m_InstructorToolBarButton.MakeButtons(this.m_MainClassmateToolBar, this.m_ExtraClassmateToolBar, this.m_EventQueue);
            this.m_DeckNavigationToolBarButton.MakeButtons(this.m_MainClassmateToolBar, this.m_ExtraClassmateToolBar, this.m_EventQueue);

            this.m_MainToolBar.Dock = DockStyle.Top;
            this.m_MainClassmateToolBar.Dock = DockStyle.Right;
            this.m_ExtraClassmateToolBar.Dock = DockStyle.Right;

            this.m_Disposed = false;

            this.m_ToolBarModeListener = new EventQueue.PropertyEventDispatcher(this.m_EventQueue, new PropertyEventHandler(this.ToolBarModeChanged));
            this.m_Model.ViewerState.Changed["ClassmateMode"].Add(this.m_ToolBarModeListener.Dispatcher);
            this.m_ToolBarModeListener.Dispatcher(this, null);
        }
开发者ID:ClassroomPresenter,项目名称:CP3,代码行数:48,代码来源:MainToolBars.cs


注:本文中的UW.ClassroomPresenter.Model.ControlEventQueue类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。