コード例 #1
0
        /// <summary>
        /// 提交
        /// </summary>
        /// <param name="o"></param>
        private void _submit(object o)
        {
            string value = o as string;

            if (string.IsNullOrEmpty(value))
            {
                NnMessage.ShowMessage("上传数据为空!");
                return;
            }
            Dispatcher.Invoke(() => ((Application.Current.MainWindow) as MainWindow)?.StatusBarState(true, "正在上传..."));

            List <Order> list      = _getOrders(value);
            string       erririnfo = _upload(list);

            if (!string.IsNullOrWhiteSpace(erririnfo))
            {
                WarnWindow.ShowMessage(erririnfo);
            }

            Dispatcher.Invoke(() =>
            {
                ((Application.Current.MainWindow) as MainWindow)?.StatusBarState(false, "标签已上传.");
                NAction?.Invoke("init");
            });
        }
コード例 #2
0
 void Start()
 {
     _instance = this;
 }