示例#1
0
文件: XmbForm.cs 项目: djey47/tdumt2
        private void loadBtn_Click(object sender, EventArgs ea)
        {
            try
            {
                if (string.IsNullOrEmpty(fileTxt.Text))
                {
                    throw new Exception("A Xmb file is required.");
                }

                Cursor = Cursors.WaitCursor;

                // File loading
                _CurrentVolumeEntry = new Xmb.VolumeEntry();
                _LoadXmb(fileTxt.Text);

                // Updates info labels
                _UpdateXmbInfo();
                _UpdateInstructions();
            }
            catch (Exception e)
            {
                _Log.Error(FailureHandler.GetStackTrace(e));
                MessageBox.Show(this, e.Message);
            }
            finally
            {
                Cursor = Cursors.Default;
            }
        }
示例#2
0
文件: XmbForm.cs 项目: djey47/tdumt2
        private void sampleSearchBtn_Click(object sender, EventArgs e)
        {
            if (_Data != null)
            {
                try
                {
                    Cursor = Cursors.WaitCursor;

                    _CurrentVolumeEntry = _Data.GetVolumeForSample(sampleComboBox.Text);
                    _UpdateInstructions();
                    _UpdateVolumeInfo();
                }
                catch (Exception ex)
                {
                    MsgBoxHelper.Instance.AdditionalMessageOnError = "This sample is not supported by current Xmb file.";
                    MsgBoxHelper.Instance.Error(this, ex);
                }
                finally
                {
                    Cursor = Cursors.Default;
                }
            }
        }