本文整理汇总了C#中PropertyEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# PropertyEventArgs类的具体用法?C# PropertyEventArgs怎么用?C# PropertyEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PropertyEventArgs类属于命名空间,在下文中一共展示了PropertyEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: onRoleChange
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
/// Notice that we want to be careful about how groups are removed and added. If we remove a group, even if
/// we intend to add it back immediately, we can miss network transmissions to that group in the window
/// of our non-membership. To avoid this, we should only add/remove groups when necessary, never remove
/// 'All Participants' (eg. never do Groups.Clear), and do adds before removes.
/// Another solution to this would be to merge all group changes into one atomic GroupUpdate message.
private void onRoleChange(object sender, PropertyEventArgs e)
{
RoleModel role = null;
using (Synchronizer.Lock(this.m_Participant.SyncRoot)) {
if (m_Participant.Role == null)
{
return;
}
role = m_Participant.Role;
}
using(Synchronizer.Lock(this.m_SlideViewer.SlideDisplay.SyncRoot)) {
this.m_SlideViewer.SlideDisplay.SheetDisposition = Model.Presentation.SheetDisposition.All | Model.Presentation.SheetDisposition.Background;
if (role is Model.Network.InstructorModel) {
addGroup(Group.AllInstructor);
addGroup(Group.Submissions);
removeGroup(Group.AllPublic);
removeGroup(Group.AllStudent);
this.m_SlideViewer.SlideDisplay.SheetDisposition ^= Model.Presentation.SheetDisposition.Instructor;
} else if (role is Model.Network.StudentModel) {
addGroup(Group.AllStudent);
removeGroup(Group.AllPublic);
removeGroup(Group.AllInstructor);
removeGroup(Group.Submissions);
this.m_SlideViewer.SlideDisplay.SheetDisposition ^= Model.Presentation.SheetDisposition.Student;
} else if (role is Model.Network.PublicModel) {
addGroup(Group.AllPublic);
addGroup(Group.Submissions);
removeGroup(Group.AllInstructor);
removeGroup(Group.AllStudent);
this.m_SlideViewer.SlideDisplay.SheetDisposition ^= Model.Presentation.SheetDisposition.Public;
}
}
}
开发者ID:ClassroomPresenter,项目名称:CP3,代码行数:43,代码来源:RoleSynchronizer.cs
示例2: HandleRoleChanged
protected void HandleRoleChanged(object sender, PropertyEventArgs e)
{
// Bug 988: Completely disable the role menu for the Instructor role.
using (Synchronizer.Lock(this.m_Model.Participant.SyncRoot)) {
this.Enabled = this.Visible = !(this.m_Model.Participant.Role is InstructorModel);
}
}
开发者ID:ClassroomPresenter,项目名称:CP3,代码行数:7,代码来源:RoleMenu.cs
示例3: HandleQuickPollChanged
private void HandleQuickPollChanged( object sender, PropertyEventArgs args )
{
Group receivers = Group.AllParticipant;
this.SendQuickPollChanged( receivers );
if( this.m_QuickPollNetworkService != null ) {
this.m_QuickPollNetworkService.Dispose();
}
this.m_QuickPollNetworkService = new QuickPollNetworkService( this.m_Sender, this.m_Presentation );
}
开发者ID:ClassroomPresenter,项目名称:CP3,代码行数:11,代码来源:PresentationNetworkService.cs
示例4: InstructorSendStatus
/// <summary>
/// Message from instructor to student.
/// </summary>
/// <param name="o"></param>
/// <param name="args"></param>
private void InstructorSendStatus(object o, PropertyEventArgs args)
{
PropertyChangeEventArgs pcea = (PropertyChangeEventArgs)args;
//The Id is actually the student Participant ID.
Guid StudentId = (Guid)pcea.NewValue;
if (!StudentId.Equals(Guid.Empty)) {
Group studentGroup = new SingletonGroup(new ParticipantModel(StudentId));
sender_.Post(delegate() {
this.SendStatusHelper(studentGroup);
});
}
}
开发者ID:ClassroomPresenter,项目名称:CP3,代码行数:17,代码来源:SubmissionStatusNetworkService.cs
示例5: OnParticipantNameChanged
private void OnParticipantNameChanged(object sender, PropertyEventArgs args)
{
if (args is PropertyChangeEventArgs) {
PropertyChangeEventArgs pcargs = (PropertyChangeEventArgs)args;
this.m_ParticipantName = "Anonymous Instructor";
if (pcargs.NewValue != null)
this.m_ParticipantName = (string)pcargs.NewValue;
}
UpdateMessage();
}
开发者ID:ClassroomPresenter,项目名称:CP3,代码行数:10,代码来源:BroadcastSender.cs
示例6: HandleSlideChanged
private void HandleSlideChanged(object sender, PropertyEventArgs args)
{
using(Synchronizer.Lock(this)) {
SlideModel slide;
using(Synchronizer.Lock(this.m_SlideDisplay.SyncRoot)) {
slide = this.m_SlideDisplay.Slide;
// Release the reader lock immediately, because it is not possible (or at least easy)
// to guarantee consistent locking order between the SlideDisplayModel and the SlideModel.
// Most of the SheetRenderer classes will obtain a lock on the SlideModel *first*
// and the SlideDisplayModel *second* because they react to changes in the slide;
// but that order is not possible here.
}
if(slide == null) {
this.m_Adaptee.InkSheetModel = null;
this.m_Adaptee.RealTimeInkSheetModel = null;
}
else {
using(Synchronizer.Lock(slide.SyncRoot)) {
try {
InkSheetModel inks = null;
RealTimeInkSheetModel rti = null;
// TODO: This code is duplicated in SlideToolBarButtons.ClearInkSheetToolBarButton. Extract to a "ActiveInkAnnotationSheet" property of the SlideModel.
// Find the *top-most* InkSheetModel and RealTimeInkSheetModel in the annotation layer.
foreach(SheetModel sheet in slide.AnnotationSheets) {
// Only consider local sheets.
if((sheet.Disposition & SheetDisposition.Remote) != 0) {
continue;
// RealTimeInkSheetModels get priority.
} else if(sheet is RealTimeInkSheetModel) {
inks = rti = ((RealTimeInkSheetModel) sheet);
// Regular InkSheetModels are our second choice.
} else if(sheet is InkSheetModel) {
inks = ((InkSheetModel) sheet);
rti = null;
// Only consider the *top-most* non-remote sheet (the last one in the collection).
} else {
continue;
}
}
if(inks == null && rti == null) {
// If the slide does not have an ink annotation sheet, create one.
inks = rti = new RealTimeInkSheetModel(Guid.NewGuid(), SheetDisposition.All, Rectangle.Empty);
// Add it to the slide.
slide.AnnotationSheets.Add(rti);
}
// Start collecting ink into the InkSheetModel's Ink object
// (after the sheet is added to the slide, so renderers don't get out of sync).
// Also start sending events to InkSheetModel.RealTimeInk.
this.m_Adaptee.InkSheetModel = rti == null ? inks : rti;
this.m_Adaptee.RealTimeInkSheetModel = rti;
}
catch {
// We were unable to get an Ink annotation sheet, so disable inking.
this.m_Adaptee.InkSheetModel = null;
this.m_Adaptee.RealTimeInkSheetModel = null;
throw;
}
}
}
}
}
开发者ID:ClassroomPresenter,项目名称:CP3,代码行数:71,代码来源:InkSheetAdapter.cs
示例7: OnBroadcastDisabledChanged
private void OnBroadcastDisabledChanged(object sender, PropertyEventArgs args)
{
if (args is PropertyChangeEventArgs) {
PropertyChangeEventArgs pcargs = (PropertyChangeEventArgs)args;
m_BroadcastDisabled = (bool)pcargs.NewValue;
}
}
开发者ID:ClassroomPresenter,项目名称:CP3,代码行数:7,代码来源:BroadcastSender.cs
示例8: OnLightColorChanged
private void OnLightColorChanged(object sender, PropertyEventArgs args)
{
bool lightcolor = false;
using (Synchronizer.Lock(((PresentItBox)(this.Parent)).viewer_.presenter_model_.ViewerState.SyncRoot)) {
lightcolor = ((PresentItBox)(this.Parent)).viewer_.presenter_model_.ViewerState.UseLightColorSet;
}
if (lightcolor == false) {
this.BackColor = Color.White;
this.Parent.BackColor = Color.White;
}
else {
this.BackColor = Color.DarkGray;
this.Parent.BackColor = Color.DarkGray;
}
}
开发者ID:kevinbrink,项目名称:CP3_Enhancement,代码行数:17,代码来源:TextItText.cs
示例9: ResolutionWidthTextbox_TextChanged
private void ResolutionWidthTextbox_TextChanged(Control sender, PropertyEventArgs<string> args)
{
settings.Set("Width", args.NewValue);
optionsScreen.NeedRestart();
}
开发者ID:BlackOrca,项目名称:octoawesome,代码行数:6,代码来源:OptionsOptionControl.cs
示例10: TextOnRoleChange
public void TextOnRoleChange(object sender, PropertyEventArgs args)
{
using (Synchronizer.Lock(this.m_Model.ViewerState)) {
if (this.m_Model.ViewerState.iRole == 0 || //disconnected
this.m_Model.ViewerState.iRole == 2) { //instructor
this.Text = text1;
}
else {
this.Text = text2;
}
}
}
开发者ID:ClassroomPresenter,项目名称:CP3,代码行数:12,代码来源:StartJoinButton2.cs
示例11: HandleSlidePreviewSizeChanged
/// <summary>
/// Event handler for checking the properties the control if the size of preview window changed or not
/// </summary>
/// <param name="sender">the object invoking us</param>
/// <param name="args">the arguments to our event</param>
private void HandleSlidePreviewSizeChanged(object sender, PropertyEventArgs args)
{
Size newsize = new Size(400, 300);
using (Synchronizer.Lock(this.m_Model.ViewerState.SyncRoot))
{
newsize = new Size(this.m_Model.ViewerState.SlidePreviewWidth, this.m_Model.ViewerState.SlidePreviewHeight);
}
this.Size = newsize;
this.OnLinkedControlSizeChanged(sender, args);
}
开发者ID:ClassroomPresenter,项目名称:CP3,代码行数:15,代码来源:SlidePreview.cs
示例12: OnSlot2Changed
protected virtual void OnSlot2Changed(PropertyEventArgs<Control> args)
{
}
开发者ID:punker76,项目名称:monogameui,代码行数:3,代码来源:Splitter.cs
示例13: OnSplitterPositionChanged
protected virtual void OnSplitterPositionChanged(PropertyEventArgs<int> args)
{
}
开发者ID:punker76,项目名称:monogameui,代码行数:3,代码来源:Splitter.cs
示例14: HandleRoleChanged
private void HandleRoleChanged(object sender, PropertyEventArgs args_)
{
using(Synchronizer.Lock(this)) {
if(this.m_Association != null) {
using(Synchronizer.Lock(this.m_Association.SyncRoot)) {
this.Instructor = this.m_Association.Role as InstructorModel;
}
} else {
this.Instructor = null;
}
}
}
开发者ID:ClassroomPresenter,项目名称:CP3,代码行数:12,代码来源:NetworkAssociationService.cs
示例15: HandleCurrentPresentationChanged
private void HandleCurrentPresentationChanged(object sender, PropertyEventArgs args_)
{
using(Synchronizer.Lock(this)) {
if(this.m_Instructor == null) {
this.CurrentPresentation = null;
} else {
using(Synchronizer.Lock(this.m_Instructor.SyncRoot)) {
this.CurrentPresentation = this.m_Instructor.CurrentPresentation;
// Release the lock before proceeding because there is no "natural" parent/child locking order.
}
}
using(this.m_Model.Workspace.Lock()) {
this.m_Model.Workspace.CurrentPresentation.Value = this.CurrentPresentation;
}
}
}
开发者ID:ClassroomPresenter,项目名称:CP3,代码行数:17,代码来源:NetworkAssociationService.cs
示例16: HandleCurrentDeckTraversalChanged
private void HandleCurrentDeckTraversalChanged(object sender, PropertyEventArgs args_)
{
using (Synchronizer.Lock(this)) {
DeckTraversalModel current;
if (this.m_Instructor == null) {
current = null;
}
else {
using (Synchronizer.Lock(this.m_Instructor.SyncRoot)) {
current = this.m_Instructor.CurrentDeckTraversal;
}
}
using (this.m_Model.Workspace.Lock()) {
if (current != null) {
// Check the workspace to see if there exists a linkedDeckTraversal for this ID
foreach (DeckTraversalModel model in this.m_Model.Workspace.DeckTraversals) {
if (model.Id == current.Id) {
current = model;
break;
}
}
}
}
// TODO: Only set the current deck traversal if navigation is unlinked.
bool isInstructor = false;
using (Synchronizer.Lock(this.m_Model.Participant.SyncRoot)) {
if (this.m_Model.Participant.Role is InstructorModel) {
isInstructor = true;
}
}
DeckTraversalModel dtm = null;
if ((current is LinkedDeckTraversalModel) || (isInstructor) || (current == null)) {
dtm = current;
}
else {
dtm = new LinkedDeckTraversalModel(this.m_EventQueue, current.Id, this.m_Model, current);
}
using (this.m_Model.Workspace.Lock()) {
this.m_Model.Workspace.CurrentDeckTraversal.Value = dtm;
}
}
}
开发者ID:ClassroomPresenter,项目名称:CP3,代码行数:46,代码来源:NetworkAssociationService.cs
示例17: HandleAssociationChanged
private void HandleAssociationChanged(object sender, PropertyEventArgs args_)
{
using(Synchronizer.Lock(this)) {
using(Synchronizer.Lock(this.m_Model.Network.SyncRoot)) {
this.Association = this.m_Model.Network.Association;
}
}
}
开发者ID:ClassroomPresenter,项目名称:CP3,代码行数:8,代码来源:NetworkAssociationService.cs
示例18: OnPresentationNameChanged
private void OnPresentationNameChanged(object sender, PropertyEventArgs args)
{
if (args is PropertyChangeEventArgs) {
PropertyChangeEventArgs pcargs = (PropertyChangeEventArgs)args;
this.m_PresentationName = "Untitled Presentation";
if (pcargs.NewValue != null)
this.m_PresentationName = (string)pcargs.NewValue;
}
//Update the broadcast message
UpdateMessage();
}
开发者ID:ClassroomPresenter,项目名称:CP3,代码行数:12,代码来源:BroadcastSender.cs
示例19: OnNetworkStatusChanged
private void OnNetworkStatusChanged(object sender, PropertyEventArgs args)
{
using (Synchronizer.Lock(this.m_NetworkStatusProviders)) {
NetworkStatus newStatus = ((NetworkStatus)((PropertyChangeEventArgs)args).NewValue).Clone();
m_NetworkStatusProviders[sender] = newStatus;
if (m_NetworkStatusProviders.Count != 1) {
newStatus = new NetworkStatus();
}
if (m_NetworkStatus.StatusChanged(newStatus)) {
using (Synchronizer.Lock(this.SyncRoot)) {
this.SetPublishedProperty("NetworkStatus", ref this.m_NetworkStatus, newStatus);
}
}
}
}
开发者ID:ClassroomPresenter,项目名称:CP3,代码行数:15,代码来源:NetworkModel.cs
示例20: OnShowIPChanged
private void OnShowIPChanged(object sender, PropertyEventArgs args)
{
using (Synchronizer.Lock(m_Model.ViewerState.SyncRoot)) {
this.m_showIP = m_Model.ViewerState.ShowIP;
}
UpdateMessage();
}
开发者ID:ClassroomPresenter,项目名称:CP3,代码行数:7,代码来源:BroadcastSender.cs
注:本文中的PropertyEventArgs类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论