Пример #1
0
        private void ListViewMenuSelectionChanged(object sender, SelectionChangedEventArgs selectionChangedEventArgs)
        {
            switch (((ListViewItem)((ListView)sender).SelectedItem).Name)
            {
            case "ListViewItemBehind":
                Service service = new Service();
                service.InitializeMenu();
                service.Show();
                Close();
                break;

            case "ListViewItemHome":
                HomeClient home = new HomeClient();
                home.InitializeMenu();
                home.Show();
                Close();
                break;

            case "ListViewItemAccountEdit":
                AccountEdition accountEdition = new AccountEdition();
                accountEdition.InitializeMenu();
                accountEdition.Show();
                Close();
                break;

            case "ListViewItemChat":
                ChatList chatList = new ChatList();
                chatList.InitializeMenu();
                chatList.Show();
                Close();
                break;

            case "ListViewItemRequest":
                RequestsMadeList requestsMadeList = new RequestsMadeList();
                requestsMadeList.InitializeMenu();
                requestsMadeList.Show();
                Close();
                break;

            case "ListViewItemServiceRegistration":
                AccountActivate accountActivate = new AccountActivate();
                accountActivate.InitializeMenu();
                accountActivate.Show();
                Close();
                break;

            case "ListViewItemCommentTracing":
                CommentClient commentClient = new CommentClient();
                commentClient.InitializeMenu();
                commentClient.Show();
                Close();
                break;

            default:
                break;
            }
        }
        private void ListViewMenuSelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
        {
            switch (((System.Windows.Controls.ListViewItem)((System.Windows.Controls.ListView)sender).SelectedItem).Name)
            {
            case "ListViewItemAccountEdit":
                AccountEdition accountEdition = new AccountEdition();
                accountEdition.InitializeMenu();
                accountEdition.Show();
                Close();
                break;

            case "ListViewItemChat":
                ChatList chatList = new ChatList();
                chatList.InitializeMenu();
                chatList.Show();
                Close();
                break;

            case "ListViewItemRequest":
                RequestsMadeList requestsMadeList = new RequestsMadeList();
                requestsMadeList.InitializeMenu();
                requestsMadeList.Show();
                Close();
                break;

            case "ListViewItemServiceRegistration":
                AccountActivate accountActivate = new AccountActivate();
                accountActivate.InitializeMenu();
                accountActivate.Show();
                Close();
                break;

            case "ListViewItemCommentTracing":
                CommentClient commentClient = new CommentClient();
                commentClient.InitializeMenu();
                commentClient.Show();
                Close();
                break;

            default:
                break;
            }
        }
Пример #3
0
        private void ListViewMenuSelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            switch (((ListViewItem)((ListView)sender).SelectedItem).Name)
            {
            case "ListViewItemHome":
                if (Login.tokenAccount.memberATEType == Number.NumberValue(NumberValues.ONE))
                {
                    HomeClient home = new HomeClient();
                    home.InitializeMenu();
                    home.Show();
                    Close();
                }
                else
                {
                    HomeEmployee home = new HomeEmployee();
                    home.InitializeMenu();
                    home.Show();
                    Close();
                }
                break;

            case "ListViewItemChat":
                ChatList chatList = new ChatList();
                chatList.InitializeMenu();
                chatList.Show();
                Close();
                break;

            case "ListViewItemRequest":
                if (Login.tokenAccount.memberATEType == Number.NumberValue(NumberValues.ONE))
                {
                    RequestsMadeList requestsMadeList = new RequestsMadeList();
                    requestsMadeList.InitializeMenu();
                    requestsMadeList.Show();
                    Close();
                }
                else
                {
                    RequestsReceivedList requestReceivedList = new RequestsReceivedList();
                    requestReceivedList.InitializeMenu();
                    requestReceivedList.Show();
                    Close();
                }
                break;

            case "ListViewItemServiceRegistration":
                if (Login.tokenAccount.memberATEType == Number.NumberValue(NumberValues.ONE))
                {
                    AccountActivate accountActivate = new AccountActivate();
                    accountActivate.InitializeMenu();
                    accountActivate.Show();
                    Close();
                }
                else
                {
                    ServiceRegistry serviceRegistry = new ServiceRegistry();
                    serviceRegistry.InitializeMenu();
                    serviceRegistry.Show();
                    Close();
                }
                break;

            case "ListViewItemCommentTracing":
                if (Login.tokenAccount.memberATEType == Number.NumberValue(NumberValues.ONE))
                {
                    CommentClient commentClient = new CommentClient();
                    commentClient.InitializeMenu();
                    commentClient.Show();
                    Close();
                }
                else
                {
                    ReportGeneration reportGeneration = new ReportGeneration();
                    reportGeneration.InitializeMenu();
                    reportGeneration.Show();
                    Close();
                }
                break;

            default:
                break;
            }
        }