private void DlgDecoder_Shown(object sender, EventArgs e)
        {
            if (null == this.rbMapping)
            {
                this.initDlgStructs();
            }
            this.oldEncoding = appController.curEncoding ?? Encoding.Default;

            this.rbMapping[this.radioButton15.Name] = this.oldEncoding;
            this.radioButton15.Text = Utils.Utils.GetShortEncodingName(this.oldEncoding);

            this.Text = (this.appController.isFileChanged) ?
                        Constants.STR_PREVIEWTITLE_DLG : Constants.STR_ENCODETITLE_DLG;
            this.btnAuto.Enabled = !this.appController.isFileChanged;

            if (this.appController.sharedData.fileType == TypeFileFormat.ESimpleText)
            {
                if (this.appController.isFileChanged) // Preview mode
                {
                    this.textReserve = this.appController.sharedData.basicInfo.container;
                    this.doEncoding  = () =>
                    {
                        this.appController.sharedData.basicInfo.container = this.textReserve;
                        this.appController.processOperation(TypeAction.EPreview);
                    };
                    // Force rise up Encode action in the Preview dialog mode.
                    if (this.radioButton15.Checked == false)
                    {
                        this.radioButton15.Checked = true;
                    }
                    else
                    {
                        radioButton15_CheckedChanged((object)this.radioButton15, null);
                    }
                }
                else
                {
                    this.doEncoding            = () => { };
                    this.radioButton15.Checked = true;

                    if (this.appController.sharedData.basicInfo.binary) // Check for Dump mode.
                    {
                        this.doEncoding = () => appController.processOperation(TypeAction.EDumpUpdate);
                    }
                    else
                    {
                        this.doEncoding = () => appController.processOperation(TypeAction.EEncode);
                    }
                }
            }
            else
            {
                this.doEncoding            = () => { }; // Encode nothing in non text mode.
                this.radioButton15.Checked = true;
            }
            this.button2.Enabled = false;
        }
 private void button3_Click(object sender, EventArgs e)
 {
     if (this.appController.isFileChanged)
     {
         this.doEncoding = () => { };
         this.appController.sharedData.basicInfo.container = this.textReserve;
         this.appController.processOperation(TypeAction.ELastAction);
     }
     this.radioButton15.Checked = true;
     this.Close();
 }
        public DlgDecoder(AppController aController)
        {
            InitializeComponent();

            this.dlgComboBoxItem = staticDlgComboBoxItem;
            this.dlgManualItem   = staticDlgManualItem;

            this.appController = aController;
            this.doEncoding    = () => { };
            this.label1.Text   = Constants.STR_NOTDEFINED_MSG;
        }