コード例 #1
0
        /// <summary>
        /// 添加“关于”
        /// </summary>
        private void ModifySystemMenu(IntPtr hWnd)
        {
            IntPtr hMenu = GetSystemMenu(hWnd);

            /** 系统菜单默认排列
             * 还原
             * 移动
             * 大小
             * 最小化/还原
             * 最大化
             * 关闭
             */
            InsertMenu(hMenu, 1, MF_SEPARATOR, 0, null);  // 添加分割线
            InsertMenu(hMenu, 8, MF_BYPOSITION, IDM_ABOUT, i18NService.GetXmlStringByKey("MenuAbout"));
        }
コード例 #2
0
        public async void Handle(ClientMessageItem message)
        {
            if (FileList.Count == 0)
            {
                return;
            }

            _eventAggregator.Publish(new BusyStateItem(true), nameof(StoreFileListViewModel));

            try
            {
                await _storeSCU.StoreImageAsync(message.ServerIP, message.ServerPort, message.ServerAET, message.LocalAET, FileList);

                string content = string.Format(
                    _i18NService.GetXmlStringByKey("ToastStoreResult"),
                    _i18NService.GetXmlStringByKey("Success"));
                // 这里不使用 await,否则当前线程会阻塞直到toast显示完成
                _ = _notificationService.ShowToastAsync(content, new TimeSpan(0, 0, 3));
            }
            finally
            {
                _eventAggregator.Publish(new BusyStateItem(false), nameof(StoreFileListViewModel));
            }
        }
コード例 #3
0
        public void ShowOptions()
        {
            string configexe = "Config.exe";

            if (!File.Exists(configexe))
            {
                string info = string.Format(i18NService.GetXmlStringByKey("FileNotFound"), configexe);
                _windowManager.ShowMessageBox(info);
                return;
            }

            if (!ProcessHelper.StartProcess(configexe, "1"))
            {
                _logger.Warn("Start process failure. [{0}]", configexe);
            }
        }
コード例 #4
0
 private async Task CheckForUpdate()
 {
     if (Helpers.SystemHelper.IsNetworkConnected)
     {
         await updateService.CheckForUpdate();
     }
     else
     {
         await notificationService.ShowToastAsync(i18NService.GetXmlStringByKey("ToastNetworkOffline"), new TimeSpan(0, 0, 3), Controls.ToastType.Error);
     }
 }