/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DatabaseDlg)); this.tabControl_main = new System.Windows.Forms.TabControl(); this.tabPage_name = new System.Windows.Forms.TabPage(); this.textBox_databaseType = new System.Windows.Forms.TextBox(); this.label6 = new System.Windows.Forms.Label(); this.textBox_sqlConnectionString = new System.Windows.Forms.TextBox(); this.label3 = new System.Windows.Forms.Label(); this.textBox_sqlDbName = new System.Windows.Forms.TextBox(); this.label2 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.listView_logicName = new System.Windows.Forms.ListView(); this.columnHeader_lang = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.columnHeader_value = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.tabPage_keysDef = new System.Windows.Forms.TabPage(); this.button_formatKeysXml = new System.Windows.Forms.Button(); this.textBox_keysDef = new System.Windows.Forms.TextBox(); this.label4 = new System.Windows.Forms.Label(); this.tabPage_browseDef = new System.Windows.Forms.TabPage(); this.button_formatBrowseXml = new System.Windows.Forms.Button(); this.textBox_browseDef = new System.Windows.Forms.TextBox(); this.label5 = new System.Windows.Forms.Label(); this.tabPage_objects = new System.Windows.Forms.TabPage(); this.panel_objectMain = new System.Windows.Forms.Panel(); this.listView_usersRights = new System.Windows.Forms.ListView(); this.columnHeader_userName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.columnHeader_rights = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.splitter_objectMain = new System.Windows.Forms.Splitter(); this.button_create = new System.Windows.Forms.Button(); this.button_Cancel = new System.Windows.Forms.Button(); this.button_save = new System.Windows.Forms.Button(); this.button_delete = new System.Windows.Forms.Button(); this.treeView_objects = new DigitalPlatform.rms.Client.DatabaseObjectTree(); this.tabControl_main.SuspendLayout(); this.tabPage_name.SuspendLayout(); this.tabPage_keysDef.SuspendLayout(); this.tabPage_browseDef.SuspendLayout(); this.tabPage_objects.SuspendLayout(); this.panel_objectMain.SuspendLayout(); this.SuspendLayout(); // // tabControl_main // this.tabControl_main.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.tabControl_main.Controls.Add(this.tabPage_name); this.tabControl_main.Controls.Add(this.tabPage_keysDef); this.tabControl_main.Controls.Add(this.tabPage_browseDef); this.tabControl_main.Controls.Add(this.tabPage_objects); this.tabControl_main.Location = new System.Drawing.Point(12, 12); this.tabControl_main.Name = "tabControl_main"; this.tabControl_main.SelectedIndex = 0; this.tabControl_main.Size = new System.Drawing.Size(546, 346); this.tabControl_main.TabIndex = 0; // // tabPage_name // this.tabPage_name.Controls.Add(this.textBox_databaseType); this.tabPage_name.Controls.Add(this.label6); this.tabPage_name.Controls.Add(this.textBox_sqlConnectionString); this.tabPage_name.Controls.Add(this.label3); this.tabPage_name.Controls.Add(this.textBox_sqlDbName); this.tabPage_name.Controls.Add(this.label2); this.tabPage_name.Controls.Add(this.label1); this.tabPage_name.Controls.Add(this.listView_logicName); this.tabPage_name.Location = new System.Drawing.Point(4, 22); this.tabPage_name.Name = "tabPage_name"; this.tabPage_name.Size = new System.Drawing.Size(538, 320); this.tabPage_name.TabIndex = 0; this.tabPage_name.Text = "数据库名"; this.tabPage_name.UseVisualStyleBackColor = true; // // textBox_databaseType // this.textBox_databaseType.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.textBox_databaseType.ImeMode = System.Windows.Forms.ImeMode.Off; this.textBox_databaseType.Location = new System.Drawing.Point(144, 230); this.textBox_databaseType.Name = "textBox_databaseType"; this.textBox_databaseType.Size = new System.Drawing.Size(267, 21); this.textBox_databaseType.TabIndex = 7; this.textBox_databaseType.TextChanged += new System.EventHandler(this.textBox_databaseType_TextChanged); // // label6 // this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.label6.AutoSize = true; this.label6.Location = new System.Drawing.Point(6, 233); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(89, 12); this.label6.TabIndex = 6; this.label6.Text = "数据库类型(&T):"; // // textBox_sqlConnectionString // this.textBox_sqlConnectionString.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.textBox_sqlConnectionString.Enabled = false; this.textBox_sqlConnectionString.ImeMode = System.Windows.Forms.ImeMode.Off; this.textBox_sqlConnectionString.Location = new System.Drawing.Point(144, 262); this.textBox_sqlConnectionString.Name = "textBox_sqlConnectionString"; this.textBox_sqlConnectionString.Size = new System.Drawing.Size(370, 21); this.textBox_sqlConnectionString.TabIndex = 5; this.textBox_sqlConnectionString.TextChanged += new System.EventHandler(this.textBox_sqlConnectionString_TextChanged); // // label3 // this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.label3.AutoSize = true; this.label3.Location = new System.Drawing.Point(6, 265); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(113, 12); this.label3.TabIndex = 4; this.label3.Text = "SQL Server连接(&C):"; // // textBox_sqlDbName // this.textBox_sqlDbName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.textBox_sqlDbName.ImeMode = System.Windows.Forms.ImeMode.Off; this.textBox_sqlDbName.Location = new System.Drawing.Point(144, 286); this.textBox_sqlDbName.Name = "textBox_sqlDbName"; this.textBox_sqlDbName.Size = new System.Drawing.Size(267, 21); this.textBox_sqlDbName.TabIndex = 3; this.textBox_sqlDbName.TextChanged += new System.EventHandler(this.textBox_sqlDbName_TextChanged); // // label2 // this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.label2.AutoSize = true; this.label2.Location = new System.Drawing.Point(6, 289); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(71, 12); this.label2.TabIndex = 2; this.label2.Text = "SQL库名(&S):"; // // label1 // this.label1.AutoSize = true; this.label1.Location = new System.Drawing.Point(6, 14); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(77, 12); this.label1.TabIndex = 1; this.label1.Text = "逻辑库名(&L):"; // // listView_logicName // this.listView_logicName.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.listView_logicName.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.columnHeader_lang, this.columnHeader_value}); this.listView_logicName.FullRowSelect = true; this.listView_logicName.HideSelection = false; this.listView_logicName.Location = new System.Drawing.Point(8, 29); this.listView_logicName.Name = "listView_logicName"; this.listView_logicName.Size = new System.Drawing.Size(520, 197); this.listView_logicName.TabIndex = 0; this.listView_logicName.UseCompatibleStateImageBehavior = false; this.listView_logicName.View = System.Windows.Forms.View.Details; this.listView_logicName.SelectedIndexChanged += new System.EventHandler(this.listView_logicName_SelectedIndexChanged); this.listView_logicName.MouseUp += new System.Windows.Forms.MouseEventHandler(this.listView_logicName_MouseUp); // // columnHeader_lang // this.columnHeader_lang.Text = "语言代码"; this.columnHeader_lang.Width = 78; // // columnHeader_value // this.columnHeader_value.Text = "值"; this.columnHeader_value.Width = 174; // // tabPage_keysDef // this.tabPage_keysDef.Controls.Add(this.button_formatKeysXml); this.tabPage_keysDef.Controls.Add(this.textBox_keysDef); this.tabPage_keysDef.Controls.Add(this.label4); this.tabPage_keysDef.Location = new System.Drawing.Point(4, 22); this.tabPage_keysDef.Name = "tabPage_keysDef"; this.tabPage_keysDef.Size = new System.Drawing.Size(538, 320); this.tabPage_keysDef.TabIndex = 1; this.tabPage_keysDef.Text = "检索点定义 -- keys"; this.tabPage_keysDef.UseVisualStyleBackColor = true; // // button_formatKeysXml // this.button_formatKeysXml.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.button_formatKeysXml.Location = new System.Drawing.Point(8, 294); this.button_formatKeysXml.Name = "button_formatKeysXml"; this.button_formatKeysXml.Size = new System.Drawing.Size(121, 23); this.button_formatKeysXml.TabIndex = 2; this.button_formatKeysXml.Text = "整理XML(&F)"; this.button_formatKeysXml.UseVisualStyleBackColor = true; this.button_formatKeysXml.Click += new System.EventHandler(this.button_formatKeysXml_Click); // // textBox_keysDef // this.textBox_keysDef.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.textBox_keysDef.HideSelection = false; this.textBox_keysDef.ImeMode = System.Windows.Forms.ImeMode.Off; this.textBox_keysDef.Location = new System.Drawing.Point(8, 32); this.textBox_keysDef.Multiline = true; this.textBox_keysDef.Name = "textBox_keysDef"; this.textBox_keysDef.ScrollBars = System.Windows.Forms.ScrollBars.Both; this.textBox_keysDef.Size = new System.Drawing.Size(527, 258); this.textBox_keysDef.TabIndex = 1; this.textBox_keysDef.TextChanged += new System.EventHandler(this.textBox_keysDef_TextChanged); // // label4 // this.label4.AutoSize = true; this.label4.Location = new System.Drawing.Point(6, 17); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(155, 12); this.label4.TabIndex = 0; this.label4.Text = "检索点配置文件(keys)内容:"; // // tabPage_browseDef // this.tabPage_browseDef.Controls.Add(this.button_formatBrowseXml); this.tabPage_browseDef.Controls.Add(this.textBox_browseDef); this.tabPage_browseDef.Controls.Add(this.label5); this.tabPage_browseDef.Location = new System.Drawing.Point(4, 22); this.tabPage_browseDef.Name = "tabPage_browseDef"; this.tabPage_browseDef.Size = new System.Drawing.Size(538, 320); this.tabPage_browseDef.TabIndex = 2; this.tabPage_browseDef.Text = "浏览格式定义 -- browse"; this.tabPage_browseDef.UseVisualStyleBackColor = true; // // button_formatBrowseXml // this.button_formatBrowseXml.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.button_formatBrowseXml.Location = new System.Drawing.Point(10, 294); this.button_formatBrowseXml.Name = "button_formatBrowseXml"; this.button_formatBrowseXml.Size = new System.Drawing.Size(121, 23); this.button_formatBrowseXml.TabIndex = 4; this.button_formatBrowseXml.Text = "整理XML(&F)"; this.button_formatBrowseXml.UseVisualStyleBackColor = true; this.button_formatBrowseXml.Click += new System.EventHandler(this.button_formatBrowseXml_Click); // // textBox_browseDef // this.textBox_browseDef.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.textBox_browseDef.HideSelection = false; this.textBox_browseDef.ImeMode = System.Windows.Forms.ImeMode.Off; this.textBox_browseDef.Location = new System.Drawing.Point(10, 32); this.textBox_browseDef.Multiline = true; this.textBox_browseDef.Name = "textBox_browseDef"; this.textBox_browseDef.ScrollBars = System.Windows.Forms.ScrollBars.Both; this.textBox_browseDef.Size = new System.Drawing.Size(525, 258); this.textBox_browseDef.TabIndex = 3; this.textBox_browseDef.TextChanged += new System.EventHandler(this.textBox_browseDef_TextChanged); // // label5 // this.label5.AutoSize = true; this.label5.Location = new System.Drawing.Point(8, 17); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(179, 12); this.label5.TabIndex = 2; this.label5.Text = "浏览格式配置文件(browse)内容:"; // // tabPage_objects // this.tabPage_objects.Controls.Add(this.panel_objectMain); this.tabPage_objects.Location = new System.Drawing.Point(4, 22); this.tabPage_objects.Name = "tabPage_objects"; this.tabPage_objects.Size = new System.Drawing.Size(538, 320); this.tabPage_objects.TabIndex = 3; this.tabPage_objects.Text = "对象"; this.tabPage_objects.UseVisualStyleBackColor = true; // // panel_objectMain // this.panel_objectMain.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.panel_objectMain.Controls.Add(this.listView_usersRights); this.panel_objectMain.Controls.Add(this.splitter_objectMain); this.panel_objectMain.Controls.Add(this.treeView_objects); this.panel_objectMain.Location = new System.Drawing.Point(8, 8); this.panel_objectMain.Name = "panel_objectMain"; this.panel_objectMain.Size = new System.Drawing.Size(622, 286); this.panel_objectMain.TabIndex = 1; // // listView_usersRights // this.listView_usersRights.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.columnHeader_userName, this.columnHeader_rights}); this.listView_usersRights.Dock = System.Windows.Forms.DockStyle.Fill; this.listView_usersRights.FullRowSelect = true; this.listView_usersRights.HideSelection = false; this.listView_usersRights.Location = new System.Drawing.Point(224, 0); this.listView_usersRights.Name = "listView_usersRights"; this.listView_usersRights.Size = new System.Drawing.Size(398, 286); this.listView_usersRights.TabIndex = 2; this.listView_usersRights.UseCompatibleStateImageBehavior = false; this.listView_usersRights.View = System.Windows.Forms.View.Details; this.listView_usersRights.DoubleClick += new System.EventHandler(this.listView_usersRights_DoubleClick); this.listView_usersRights.MouseUp += new System.Windows.Forms.MouseEventHandler(this.listView_usersRights_MouseUp); // // columnHeader_userName // this.columnHeader_userName.Text = "用户名"; this.columnHeader_userName.Width = 97; // // columnHeader_rights // this.columnHeader_rights.Text = "权限"; this.columnHeader_rights.Width = 300; // // splitter_objectMain // this.splitter_objectMain.Location = new System.Drawing.Point(216, 0); this.splitter_objectMain.Name = "splitter_objectMain"; this.splitter_objectMain.Size = new System.Drawing.Size(8, 286); this.splitter_objectMain.TabIndex = 1; this.splitter_objectMain.TabStop = false; // // button_create // this.button_create.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.button_create.Location = new System.Drawing.Point(12, 364); this.button_create.Name = "button_create"; this.button_create.Size = new System.Drawing.Size(75, 24); this.button_create.TabIndex = 1; this.button_create.Text = "创建(&C)"; this.button_create.Click += new System.EventHandler(this.button_create_Click); // // button_Cancel // this.button_Cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.button_Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.button_Cancel.Location = new System.Drawing.Point(484, 364); this.button_Cancel.Name = "button_Cancel"; this.button_Cancel.Size = new System.Drawing.Size(74, 24); this.button_Cancel.TabIndex = 2; this.button_Cancel.Text = "退出"; this.button_Cancel.Click += new System.EventHandler(this.button_Cancel_Click); // // button_save // this.button_save.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.button_save.Location = new System.Drawing.Point(403, 364); this.button_save.Name = "button_save"; this.button_save.Size = new System.Drawing.Size(75, 24); this.button_save.TabIndex = 3; this.button_save.Text = "保存(&S)"; this.button_save.Click += new System.EventHandler(this.button_save_Click); // // button_delete // this.button_delete.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.button_delete.Location = new System.Drawing.Point(93, 364); this.button_delete.Name = "button_delete"; this.button_delete.Size = new System.Drawing.Size(76, 24); this.button_delete.TabIndex = 4; this.button_delete.Text = "删除(&D)"; this.button_delete.Click += new System.EventHandler(this.button_delete_Click); // // treeView_objects // this.treeView_objects.DbName = ""; this.treeView_objects.Dock = System.Windows.Forms.DockStyle.Left; this.treeView_objects.HideSelection = false; this.treeView_objects.ImageIndex = 0; this.treeView_objects.Location = new System.Drawing.Point(0, 0); this.treeView_objects.Name = "treeView_objects"; this.treeView_objects.SelectedImageIndex = 0; this.treeView_objects.Size = new System.Drawing.Size(216, 286); this.treeView_objects.TabIndex = 0; this.treeView_objects.OnSetMenu += new DigitalPlatform.GUI.GuiAppendMenuEventHandle(this.treeView_objects_OnSetMenu); this.treeView_objects.OnObjectDeleted += new DigitalPlatform.rms.Client.OnObjectDeletedEventHandle(this.treeView_objects_OnObjectDeleted); this.treeView_objects.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView_objects_AfterSelect); // // DatabaseDlg // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.CancelButton = this.button_Cancel; this.ClientSize = new System.Drawing.Size(570, 400); this.Controls.Add(this.button_delete); this.Controls.Add(this.button_save); this.Controls.Add(this.button_Cancel); this.Controls.Add(this.button_create); this.Controls.Add(this.tabControl_main); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Name = "DatabaseDlg"; this.ShowInTaskbar = false; this.Text = "数据库管理"; this.Closing += new System.ComponentModel.CancelEventHandler(this.DatabaseDlg_Closing); this.Closed += new System.EventHandler(this.DatabaseDlg_Closed); this.Load += new System.EventHandler(this.DatabaseDlg_Load); this.tabControl_main.ResumeLayout(false); this.tabPage_name.ResumeLayout(false); this.tabPage_name.PerformLayout(); this.tabPage_keysDef.ResumeLayout(false); this.tabPage_keysDef.PerformLayout(); this.tabPage_browseDef.ResumeLayout(false); this.tabPage_browseDef.PerformLayout(); this.tabPage_objects.ResumeLayout(false); this.panel_objectMain.ResumeLayout(false); this.ResumeLayout(false); }
int BuildTemplates(out TemplateCollection templates, out string strError) { strError = ""; templates = new TemplateCollection(); for (int i = 0; i < this.listView_objects.Items.Count; i++) { ListViewItem item = this.listView_objects.Items[i]; if (item.Checked == false) continue; if (item.ImageIndex == ResTree.RESTYPE_FOLDER || item.ImageIndex == ResTree.RESTYPE_FILE) { continue; } string strDbName = item.Text; string strUrl = item.SubItems[1].Text; DatabaseObjectTree tree = new DatabaseObjectTree(); tree.Initial(MainForm.Servers, MainForm.Channels, MainForm.stopManager, strUrl, strDbName); // RmsChannel channel = MainForm.Channels.GetChannel(strUrl); if (channel == null) goto ERROR1; List<string[]> logicNames = null; string strType; string strSqlDbName; string strKeysDef; string strBrowseDef; long nRet = channel.DoGetDBInfo( strDbName, "all", out logicNames, out strType, out strSqlDbName, out strKeysDef, out strBrowseDef, out strError); if (nRet == -1) goto ERROR1; Template template = new Template(); template.LogicNames = logicNames; template.Type = strType; template.SqlDbName = strSqlDbName; template.KeysDef = strKeysDef; template.BrowseDef = strBrowseDef; template.Object = tree.Root; templates.Add(template); } return 0; ERROR1: return -1; }