Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
 /// <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);
     }
 }
Ejemplo n.º 3
0
 public FloorFactory(CallPanel panel)
 {
     Panel = new CallPanel(panel);
 }
Ejemplo n.º 4
0
 public FloorFactory()
 {
     Panel = new CallPanel();
 }
Ejemplo n.º 5
0
 public Floor(IFloor floor)
 {
     Panel      = new CallPanel(floor.Panel);
     Identifier = floor.Identifier;
 }
Ejemplo n.º 6
0
 public Floor(int floorNumber, CallPanel panel)
 {
     Panel      = panel;
     Identifier = floorNumber;
 }
Ejemplo n.º 7
0
        internal Stop(int floorNumber)
        {
            Floor = floorNumber;

            CallPanel = Building.Instance.GetCallPanelForFloor(floorNumber);
        }
Ejemplo n.º 8
0
        // 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;
        }