Exemplo n.º 1
0
        private async void MenuFlyoutItem_Click(object sender, RoutedEventArgs e)
        {
            MenuFlyoutItem item = e.OriginalSource as MenuFlyoutItem;

            if (item == null)
            {
                return;
            }

            ModeView.ShellListGridViewModeView pData = item.DataContext as ModeView.ShellListGridViewModeView;
            var info = new CPluginCreateInfo();

            info.WebShellInfo = pData.BaseInfo;
            info.Plugin       = (string)item.Tag;
            switch ((string)item.Tag)
            {
            case "FileManager":
            case "RemoteShell":
                this.Frame.Navigate(typeof(ControlPage), info, new DrillInNavigationTransitionInfo());
                break;

            case "Modify":
                await ModifyWebShell(pData.BaseInfo);

                break;

            case "Delete":
                await DeleteWebShell(pData.BaseInfo);

                break;

            default:
                break;
            }
        }
Exemplo n.º 2
0
        private async void OnAddWebShell(object sender, RoutedEventArgs e)
        {
            WebShellConfigDialog dlg = new WebShellConfigDialog();
            var result = await dlg.ShowAsync();

            if (result == ContentDialogResult.Primary)
            {
                //确定
                var webShellInfo = dlg.GetWebShellConfig();
                //设置创建时间
                webShellInfo.CreateTime = DateTime.Now.ToFileTimeUtc();

                await DataBaseManager.AddWebShellAsync(webShellInfo);

                ModeView.ShellListGridViewModeView webShellItem = new ModeView.ShellListGridViewModeView(webShellInfo.Url, webShellInfo.CreateTime, webShellInfo);
                m_pShellListModeView.Add(webShellItem);
            }
        }