예제 #1
0
 public Client(ViewApplication view, TextBox box)
 {
     this.box             = box;
     this.view            = view;
     this.User            = new User();
     this.User.Brush      = new SolidColorBrush(Colors.LightCoral);
     tcpclient            = new TcpClient();
     tcpSharing           = new TcpClient();
     User.TextDecorations = null;
 }
예제 #2
0
        //点击审批项目时处理
        private void OnGridRowLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            TimeSpan t = DateTime.Now.TimeOfDay;  //获取当前时间

            if (ArchiveFlowGrid.Tag != null)
            {
                var oldT = (TimeSpan)ArchiveFlowGrid.Tag;
                if ((t - oldT) < TimeSpan.FromMilliseconds(300))   // 延时300ms
                {
                    var flow = ArchiveFlowGrid.SelectedItem as ArchiveWorkflow;
                    if (flow != null)
                    {
                        if (NavigationService != null)
                        {
                            //导航到相对页面
                            NavigationService.Navigate(new Uri("Req/ViewApplication?ID=" + flow.FlowId, UriKind.Relative));
                        }
                        else
                        {
                            BusyIndicator1.IsBusy      = true;
                            BusyIndicator1.BusyContent = "正在读取流程信息...";
                            flowContext.GetArchiveWorkflow(flow.FlowId, obj =>
                            {
                                BusyIndicator1.IsBusy = false;
                                if (Utility.Utility.CheckInvokeOperation(obj))
                                {
                                    var child = new ChildWindow {
                                        Title = "查看归档流程-" + flow.FlowTitle
                                    };
                                    var win = new ViewApplication
                                    {
                                        ArchiveFlow = obj.Value,
                                        Margin      = new Thickness(0, 0, 0, 20)
                                    };
                                    child.Content = win;
                                    child.Show();
                                }
                            }, null);
                        }
                    }
                }
            }
            ArchiveFlowGrid.Tag = t;
        }