예제 #1
0
        private void tsmOpen_Click(object sender, System.EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();

            ofd.Filter           = Properties.Resources.Controlfile_FilterText;
            ofd.InitialDirectory = Application.StartupPath;
            if (ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                _controlInformation = ControlInformation.Load(ofd.FileName);
                UpdateFromControlInformation();
            }
        }
예제 #2
0
        private void LoadControlInformationFile()
        {
            string fileName = SettingsManager.Instance.GetSetting("GenericParser", "ControlFile").GetString();

            if (string.IsNullOrWhiteSpace(fileName))
            {
                return;
            }

            if (!Path.IsPathRooted(fileName))
            {
                fileName = Path.Combine(Utilities.GetWorkingDirectory(), fileName);
            }

            _controlInformation = ControlInformation.Load(fileName);
        }