public DataFlowGUIForm() { InitializeComponent(); this.menu_browse_src.Click += new System.EventHandler(this.OnBtnBrowseSrc_Click); this.menu_browse_dst.Click += new System.EventHandler(this.OnBtnBrowseDst_Click); this.menu_go.Click += new System.EventHandler(this.OnBtnGo_Click); this.menu_exit.Click += new System.EventHandler((o, s) => this.Close()); this.txt_dst.TextChanged += new EventHandler(this.OnDstChanged); if (File.Exists(DATAFLOW_YAML)) { string configYamlStr = File.ReadAllText(DATAFLOW_YAML); IDeserializer deserializer = new DeserializerBuilder().Build(); DataFlowRunnerOption yaml = deserializer.Deserialize <DataFlowRunnerOption>(configYamlStr); _opt = yaml; if (_opt != null) { if (_opt.in_paths != null) { foreach (string inputPath in _opt.in_paths) { SrcItemAdd(inputPath); } } txt_dst.Text = _opt.out_database; } } }
public DetailForm(DataFlowRunnerOption opt) { InitializeComponent(); Opt = opt; this.txt_namespace.Text = opt.@namespace; this.txt_password.Text = opt.password; this.txt_output_code_dir.Text = opt.out_csharp; this.check_datetime_as_ticks.Checked = Opt.datetime_as_ticks; this.txt_namespace.TextChanged += OnNamespaceChanged; this.txt_password.TextChanged += OnPasswordChanged; this.txt_output_code_dir.TextChanged += OnOuputCodeDirChanged; }