lw_common.ui.edit_log_settings_form.load_config C# (CSharp) Method

load_config() public method

public load_config ( string config_file ) : void
config_file string
return void
        public void load_config(string config_file) {
            Debug.Assert(edit_ == edit_type.add);
            var config = parse_config.load_config_file(config_file).ToString();
            settings_ = new log_settings_string(config);
            old_settings_ = new log_settings_string(config);
            load_settings();
        }

Usage Example

コード例 #1
0
ファイル: log_wizard.cs プロジェクト: CaulyKan/logwizard
        private void do_open_log(string initial_settings_str, string config_file) {
            var add = new edit_log_settings_form(initial_settings_str, edit_log_settings_form.edit_type.add);
            if (config_file != "")
                add.load_config(config_file);
            if (add.ShowDialog(this) == DialogResult.OK) {
                log_settings_string settings = new log_settings_string(add.settings);
                if (is_log_in_history(ref settings)) {
                    // we already have this in history
                    create_text_reader(settings);
                    return;
                }
                
                var new_ = new history();
                new_.from_settings(settings);
                history_list_.add_history(new_);
                global_ui.last_log_guid = new_.guid;

                Text = reader_title();
                create_text_reader(new_.write_settings);
                save();
            }            
        }