public void leftButtonBarCommand(string param)
        {
            main.Dispatcher.Invoke(() => {
                try
                {
                    switch (param)
                    {
                    case "taskCreate":
                        TestPage.GetData();
                        if (PageCommon.Dict.Count <= 0)
                        {
                            System.Windows.MessageBox.Show("没有流程,请先创建流程!");
                            return;
                        }
                        DownloadVoiceDialog dlg = new DownloadVoiceDialog
                        {
                            IsTaskCreatUse = true,
                            ShowText       = "如果已经下载流程语音请选择流程后关闭窗口。"
                        };
                        dlg.ShowDialog();
                        if (dlg.IsCancel)
                        {
                            System.Windows.MessageBox.Show("任务创建取消!");
                            return;
                        }
                        String wId = dlg.SelectWorkflowID;
                        var ret    = mCookieManager.SetCookieAsync("https://" + Domain, new Cookie()
                        {
                            Domain = Domain, Name = "flow_id", Value = wId, Expires = DateTime.MaxValue
                        });
                        break;

                    case "testPage":
                        TestPage.GetData();
                        break;

                    default:
                        break;
                    }

                    PageInfo.CurrentCommand = param;
                    if (PageInfo.CurrentPage.Page != null)
                    {
                        PageInfo.CurrentPage.Page.Width  = main.frame.ActualWidth;
                        PageInfo.CurrentPage.Page.Height = main.frame.ActualHeight;
                    }
                    SetPage(PageInfo.CurrentPage);
                    //if(PageInfo.CurrentPage.PageUri != null && PageInfo.CurrentPage.Page == null)
                    //{
                    //    if(Browser.Address != PageInfo.CurrentPage.PageUri)
                    //        Browser.Address = PageInfo.CurrentPage.PageUri;
                    //}
                }
                catch (Exception e)
                {
                    String Messsage = e.Message;
                }
            });
        }
示例#2
0
        private void DownloadButton_Click(object sender, RoutedEventArgs e)
        {
            DownloadVoiceDialog dlg = new DownloadVoiceDialog();

            dlg.ShowDialog();
        }