コード例 #1
0
ファイル: PH9907_MasterImport.cs プロジェクト: fwka1605/next
        private void parentForm_Shown(object sender, EventArgs e)
        {
            pbxIcon.Image = SystemIcons.Question.ToBitmap();

            InitializeApplicationData();

            OutputLogFile = (setting.ExportErrorLog == 1);
            if (OutputLogFile)
            {
                cmbLogFilePath.SelectedIndex = setting.ErrorLogDestination;
            }

            if (!(ParentForm is BasicForm))
            {
                return;
            }

            var buttonName = string.Empty;

            switch (setting.ImportMode)
            {
            case 0: buttonName = "btnF04"; break;

            case 1: buttonName = "btnF06"; break;

            case 2: buttonName = "btnF08"; break;
            }
            var button = ParentForm.GetAll <Button>()
                         .FirstOrDefault(x => x.Name == buttonName);

            button?.Focus();
        }