public async Task ShowViewAsync(SpeakerView view) { Log.Logger.Debug( $"【create view】:hwnd={view.m_viewHwnd}, phoneId={view.m_speaker.m_szPhoneId}, viewType={view.m_viewType}"); var viewFrameVisible = ViewFrameList.FirstOrDefault(viewFrame => viewFrame.Hwnd == view.m_viewHwnd); if (viewFrameVisible != null) { // LOG return a handle which can not be found in handle list. viewFrameVisible.IsOpened = true; viewFrameVisible.Visibility = Visibility.Visible; viewFrameVisible.PhoneId = view.m_speaker.m_szPhoneId; var attendee = _attendees.FirstOrDefault(userInfo => userInfo.GetNube() == view.m_speaker.m_szPhoneId); string displayName = string.Empty; if (!string.IsNullOrEmpty(attendee?.Name)) { displayName = attendee.Name; } viewFrameVisible.ViewName = view.m_viewType == 1 ? displayName : $"(共享){displayName}"; viewFrameVisible.ViewType = view.m_viewType; viewFrameVisible.ViewOrder = ViewFrameList.Max(viewFrame => viewFrame.ViewOrder) + 1; } await LaunchLayout(); }
//private void MakeNonCreatorViewsInvisible() //{ // ViewFrameList.ForEach(viewFrame => // { // if (viewFrame.PhoneId != _sdkService.TeacherPhoneId) // viewFrame.Visibility = Visibility.Collapsed; // }); //} private void ResetFullScreenView(SpeakerView toBeClosedView) { if ((FullScreenView != null) && (FullScreenView.PhoneId == toBeClosedView.m_speaker.m_szPhoneId) && (FullScreenView.ViewType == toBeClosedView.m_viewType)) { FullScreenView = null; } }
private void ExecuteEditCommand(SpeakerViewModel speaker) { var speakerPage = new SpeakerView { BindingContext = speaker }; var navigation = GalaSoft.MvvmLight.Ioc.SimpleIoc.Default.GetInstance <INavigation>(); navigation.PushAsync(speakerPage, true); }
public async Task HideViewAsync(SpeakerView view) { Log.Logger.Debug( $"【close view】:hwnd={view.m_viewHwnd}, phoneId={view.m_speaker.m_szPhoneId}, viewType={view.m_viewType}"); ResetFullScreenView(view); var viewFrameInvisible = ViewFrameList.FirstOrDefault(viewFrame => viewFrame.Hwnd == view.m_viewHwnd); if (viewFrameInvisible != null) { // LOG return a handle which can not be found in handle list. viewFrameInvisible.IsOpened = false; viewFrameInvisible.Visibility = Visibility.Collapsed; } await LaunchLayout(); }
public SessionSpeakersMasterDetail(int speakerID) { speakerId = speakerID; navBar = new UINavigationBar(new RectangleF(0, 0, 768, 44)); navBar.SetItems(new UINavigationItem[] { new UINavigationItem("Session & Speaker Info") }, false); View.BackgroundColor = UIColor.LightGray; View.Frame = new RectangleF(0, 0, 768, 768); sessionView = new SessionView(this); sessionView.Frame = new RectangleF(0, 44, colWidth1, 728); sessionView.AutoresizingMask = UIViewAutoresizing.FlexibleHeight; speakerView = new SpeakerView(-1); speakerView.Frame = new RectangleF(colWidth1 + 1, 44, colWidth2, 728); speakerView.AutoresizingMask = UIViewAutoresizing.FlexibleHeight | UIViewAutoresizing.FlexibleWidth; View.AddSubview(speakerView); View.AddSubview(sessionView); View.AddSubview(navBar); }
public SpeakerSessionMasterDetail(int speakerID) //, UIViewController speakerView) { speakerId = speakerID; navBar = new UINavigationBar(new CGRect(0, 0, 768, 44)); navBar.SetItems(new UINavigationItem[] { new UINavigationItem("Speaker & Session Info") }, false); View.BackgroundColor = UIColor.LightGray; View.Frame = new CGRect(0, 0, 768, 768); speakerView = new SpeakerView(-1); speakerView.Frame = new CGRect(0, 44, colWidth1, 728); speakerView.AutoresizingMask = UIViewAutoresizing.FlexibleHeight; sessionView = new SessionView(false); sessionView.Frame = new CGRect(colWidth1 + 1, 44, colWidth2, 728); sessionView.AutoresizingMask = UIViewAutoresizing.FlexibleHeight | UIViewAutoresizing.FlexibleWidth; View.AddSubview(speakerView); View.AddSubview(sessionView); View.AddSubview(navBar); // if (_speakerID > 1) // { // var speaker = BL.Managers.SpeakerManager.GetSpeaker (_speakerID); // var _sessions = BL.Managers.SessionManager.GetSessions (); // if (_sessions != null) // { // _session = (from session in _sessions // where session.SpeakerNames.IndexOf(speaker.Name) >= 0 // select session).FirstOrDefault(); // } // // _sessionView = new SessionView(_session); // _ssv.Frame = new CGRect(colWidth1+1,0,colWidth2,728); // // this.View.AddSubview (_ssv); // } }
private async void ViewCreateEventHandler(SpeakerView speakerView) { await _viewLayoutService.ShowViewAsync(speakerView); }
private async void ViewCloseEventHandler(SpeakerView speakerView) { await _viewLayoutService.HideViewAsync(speakerView); }
public App() { InitializeComponent(); MainPage = new SpeakerView(); }