예제 #1
0
        private void DownloadBtn_Click(object sender, RoutedEventArgs e)
        {
            log.Debug("TubeRecipePage:DownloadBtn_Click");
            //download recipe data from DB or File to PLC
            var openFileDialog = new Microsoft.Win32.OpenFileDialog()
            {
                Filter = "Recipe Data Files (*.rcd)|*.rcd"
            };

            openFileDialog.Title = "Open a Recipe Data File";
            var result = openFileDialog.ShowDialog();

            if (result == true)
            {
                bool startDownload = mController.DownloadRecipe(openFileDialog.FileName, mSelectedTube, OnDownRecipeComplete, OnDownloadStepComplete);
                if (startDownload)
                {
                    mProgressDlg.ProgressModel.MaxValue = 64;
                    mProgressDlg.ProgressModel.Progress = 0;
                    mProgressDlg.ShowDialog();
                }
            }
        }