Пример #1
0
        private void OnClickedCheck(object sender, RoutedEventArgs e)
        {
            Tool.XControl.XButton Btn = sender as Tool.XControl.XButton;
            string net_id             = Btn.Tag.ToString();

            Int32 retval = -1;

            Proto.ProtoProcessDetail list = new Proto.ProtoProcessDetail();

            this.WaitEvent(() =>
            {
                unsafe
                {
                    void *r_data = null;
                    int r_len    = 0;
                    retval       = NetInterface.NetPostSyncPackage(Convert.ToInt32(net_id), (int)NetInterface.PKTTYPE.kAgvShellProto_ProcessDetail, null, 0, &r_data, &r_len);
                    if (retval < 0 || null == r_data)
                    {
                        return;
                    }

                    byte[] ack_msg = null;

                    ack_msg = new byte[r_len];
                    using (UnmanagedMemoryStream ms = new UnmanagedMemoryStream((byte *)r_data, r_len))
                    {
                        ms.Read(ack_msg, 0, ack_msg.Length);
                    }

                    Tool.Proto.Unpackage <Proto.ProtoProcessDetail> info = new Proto.Unpackage <Proto.ProtoProcessDetail>(ack_msg);
                    if (info.build())
                    {
                        list = info.ob;
                    }
                    NetInterface.FreeDetail(r_data);
                }
            }, true, true);

            WinProcessDetail.Show(this, list, net_id);
        }
Пример #2
0
 public static void Show(this FrameworkElement Owner, Proto.ProtoProcessDetail list, string net_id)
 {
     WinProcessDetail.Show(Owner, list, net_id);
 }