コード例 #1
0
        private async void bCalculate_Click(object sender, RoutedEventArgs e)
        {
            prCalculatingProcess.IsActive = true;
            gMain.IsEnabled = false;
            try
            {
                InputSettings  inputSettings  = getInputSettings();
                Communications communications = getCommunications(inputSettings);
                await generateResult(communications, inputSettings.saveLoadInfo);

                showMessageBox(Languages.current.messageTitleFinishCalculating, Languages.current.messageFinishCalculating);
            }
            catch (OperationCanceledException) { }
            catch (Exception ex)
            {
                showMessageBox(Languages.current.error, ex.Message);
            }
            finally
            {
                gMain.IsEnabled = true;
                prCalculatingProcess.IsActive = false;
            }
        }