예제 #1
0
        private void SqlForm_Load(object sender, EventArgs e)
        {
            this.Text = CommonString.MainFormTitle;
            this.Icon = Properties.Resources.Film;

            this.cbindex.Checked        = true;
            this.cbid.Checked           = false;
            this.cbname.Checked         = true;
            this.cbpath.Checked         = true;
            this.cbsize.Checked         = true;
            this.cbcreate_t.Checked     = true;
            this.cbto_delete.Checked    = true;
            this.cbto_delete_ex.Checked = true;
            this.cbs_w_t.Checked        = true;
            this.cbto_watch.Checked     = true;
            this.cbto_watch_ex.Checked  = true;
            this.cbis_folder.Checked    = true;
            this.cbmodify_t.Checked     = true;
            this.cbdisk_desc.Checked    = true;
            this.cbmax_cid.Checked      = false;
            this.cbpid.Checked          = false;
            this.cbcontent.Checked      = false;
            this.cbs_d_t.Checked        = true;

            cbs = new CheckBox[]
            {
                this.cbindex,
                this.cbid,
                this.cbname,
                this.cbpath,
                this.cbsize,
                this.cbcreate_t,
                this.cbto_delete,
                this.cbto_delete_ex,
                this.cbs_w_t,
                this.cbto_watch,
                this.cbto_watch_ex,
                this.cbis_folder,
                this.cbmodify_t,
                this.cbdisk_desc,
                this.cbmax_cid,
                this.cbpid,
                this.cbcontent,
                this.cbs_d_t,
            };

            this.outputSet = new HashSet <string>();

            foreach (CheckBox cb in cbs)
            {
                if (cb.Checked)
                {
                    this.outputSet.Add(cb.Text);
                }

                cb.CheckedChanged += this.output_CheckedChanged;
            }

            this.cbOutputCtl.Checked         = true;
            this.cbOutputCtl.CheckedChanged += this.outputCtl_CheckedChanged;

            this.richTextBoxInfo.Text = "mysql> desc film_info" + Environment.NewLine;

            String descFilmInfo = CommonDataTable.DataTableFormatToString(
                sqlData.GetDescriptionOfFilmInfo(), null);

            UpdateRichTextBox(descFilmInfo);
        }