コード例 #1
0
ファイル: DbSurf.cs プロジェクト: titorus/evemu_control_panel
        //private int posTable = -1;
        private void AfterTableSelect()
        {
            //load xhelp.xml
            rchTextTable.Enabled = true;
            int posTable = TracePositionTable(lsvTables.SelectedItems[0].Text);

            if (posTable > -1)
            {
                rchTextTable.Rtf = RTFCoding(xhelp.tableHelp.RecuperaRiga(posTable)[2]);
            }
            else
            {
                //need xhelp of this field so...generate
                string fields = "";
                string prertf = "{\\rtf1\\ansi\\ansicpg1252\\deff0{\\fonttbl{\\f0\\fnil\\fcharset0 Franklin Gothic Medium;}{\\f1\\fnil\\fcharset0 Microsoft Sans Serif;}}";
                prertf += "{\\colortbl ;\\red0\\green0\\blue160;}";
                string fieldsRtxt = prertf + "\\viewkind4\\uc1\\pard\\cf1\\lang1040\\f0\\fs24" + ((DataTable)dgvTabella.DataSource).Namespace + "\\cf0\\f1\\fs17\\par" + "\\par" + "\\par";
                foreach (DataGridViewColumn colon in dgvTabella.Columns)
                {
                    fields += colon.HeaderText + ",";
                    fieldsRtxt += "\\ul\\b\\i\\fs20 " + colon.HeaderText + " : " + "\\ulnone\\b0\\i0\\fs17" + "\\par" + "\\par";
                }
                rchTextTable.Rtf = fieldsRtxt + "}";
                //rchTextTable.Text = fieldsRtxt;
                fields = fields.Substring(0, fields.Length - 1);
                string[] elemXhelp = new string[3] { ((DataTable)dgvTabella.DataSource).Namespace, fields, Base64Coding(rchTextTable.Rtf) };
                xhelp.tableHelp.RecordTable(elemXhelp);
                xhelp = new xHelp(main.DatabaseName);
            }
            richDesc = rchTextTable.Rtf;
        }
コード例 #2
0
ファイル: DbSurf.cs プロジェクト: titorus/evemu_control_panel
        xHelp xhelp; // = new xHelp();

        #endregion Fields

        #region Constructors

        public DbSurf()
        {
            InitializeComponent();
            PopView();
            xhelp = new xHelp(main.DatabaseName);
        }