public MainChatWindown() { InitializeComponent(); ConversationViews = new ObservableCollection <ConversationsView>(); ContactViews = new ObservableCollection <ContactListItem>(); MenuControl Menupanel = new MenuControl(); Menupanel.HistoryEventHandler += Window_HistoryPannelEventHandle; Menupanel.LogoutEventHandler += Menupanel_LogoutEventHandler; Menupanel.ContactEventHandler += Menupanel_ContactEventHandler; Menupanel.NotifiEventHandler += Menupanel_NotifiEventHandler; Menupanel.SearchEventHandler += Menupanel_SearchEventHandler; Menupanel.CallEventHandler += Menupanel_CallEventHandler; TopLeftPanel.Children.Add(Menupanel); //load contact LoadContact().Wait(); ContactWindown = new ContactListControl(ContactViews); ContactWindown.ContactEvenHandle += ContactItemEventHandler; //load notifi NotifiWindown = new NotifiPanel(ContactViews); //call notifi CallWindown = new CallPanel(); //load conversation panel first LoadConversation().Wait(); Historywindown = new HistoryWindown(ConversationViews); Historywindown.Name = "Historywd"; Historywindown.HistoryEventHandler += HistoryItemEventHandler; BotLeftPanel.Children.Clear(); BotLeftPanel.Children.Add(Historywindown); RightPanel.Children.Add(new WelcomePanel()); //AdminWindown admin = new AdminWindown(); //admin.Show(); }
/// <summary> /// 呼叫/挂断 /// </summary> private void btnCall_Click(object sender, EventArgs e) { if (btnCall.Text == "呼叫") { var callWin = new CallPanel() { OKAction = () => {}, OnCancel = () => { } }; UXMessageMask.ShowForm(ownerContainer, callWin); } else { Action hangupAction = () => { _currentCall?.HangUpCall(); }; UXMessageMask.ShowMessage(ownerContainer, false, "确认要挂断当前通话吗?", MessageBoxButtonsType.OKCancel, MessageBoxIcon.Question , hangupAction); } }
public FloorFactory(CallPanel panel) { Panel = new CallPanel(panel); }
public FloorFactory() { Panel = new CallPanel(); }
public Floor(IFloor floor) { Panel = new CallPanel(floor.Panel); Identifier = floor.Identifier; }
public Floor(int floorNumber, CallPanel panel) { Panel = panel; Identifier = floorNumber; }
internal Stop(int floorNumber) { Floor = floorNumber; CallPanel = Building.Instance.GetCallPanelForFloor(floorNumber); }
// Runs when "Made Call" is clicked private void CallClick(object sender, RoutedEventArgs e) { CallPanel _CallPanel = new CallPanel(CxNameBox.Text.Split(' ')[0], this); ContentBox.Content = _CallPanel; }