Exemplo n.º 1
0
        private void btResetFilter_Click(object sender, EventArgs e)
        {
            Form1 form1 = (Form1)this.FindForm();

            if (form1 == null)
            {
                return;
            }
            ucManageEntities ucManageEntities = form1.FilterControlsOne(c => c is ucManageEntities) as ucManageEntities;

            if (ucManageEntities.lstEntities.SelectedItem != null && form1.lstModels.SelectedItem != null)
            {
                this.DisplayMembers((Identifier)form1.lstModels.SelectedItem, (CustomVersion)form1.lstVersions.SelectedItem, (CustomEntity)ucManageEntities.lstEntities.SelectedItem, "");
                this.txSimLevel.Text   = "0.5 1 0.32";
                this.txSearchTerm.Text = "LIKE";
            }
        }
Exemplo n.º 2
0
 private void RefreshMembersAttributes()
 {
     try
     {
         Form1            form1            = this.FindForm() as Form1;
         ucManageEntities ucManageEntities = form1.FilterControlsOne(c => c is ucManageEntities) as ucManageEntities;
         if (ucManageEntities == null || (form1.lstModels.SelectedItem == null || form1.lstVersions.SelectedItem == null || ucManageEntities.lstEntities.SelectedItem == null))
         {
             return;
         }
         form1.RefreshLstMembersAttributes((Identifier)form1.lstModels.SelectedItem, (CustomEntity)ucManageEntities.lstEntities.SelectedItem, (CustomVersion)form1.lstVersions.SelectedItem);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 3
0
 private void tsmiDeleteCheckedMembers_Click(object sender, EventArgs e)
 {
     try
     {
         Form1 form1 = (Form1)this.FindForm();
         if (form1 == null)
         {
             return;
         }
         ucManageEntities ucManageEntities = form1.FilterControlsOne(c => c is ucManageEntities) as ucManageEntities;
         if (ucManageEntities.lstEntities.SelectedItem != null && form1.lstModels.SelectedItem != null && this.lstMembers.Items.Count > 0 && MessageBox.Show("This operation is irreversible. Are you sure you want to delete all checked members from this entity ?", "Delete all checked entity members from selected entity", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) == DialogResult.Yes)
         {
             this.DeleteCheckedMembersFromSelectedEntity(form1.lstModels.SelectedItem as Identifier, (form1.lstVersions.SelectedItem as CustomVersion).Identifier, (Identifier)(ucManageEntities.lstEntities.SelectedItem as CustomEntity).entityId);
             this.DisplayMembers((Identifier)form1.lstModels.SelectedItem, (CustomVersion)form1.lstVersions.SelectedItem, (CustomEntity)ucManageEntities.lstEntities.SelectedItem, "");
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Exemplo n.º 4
0
        private void btnSearchMembersOK_Click(object sender, EventArgs e)
        {
            string str = this.rbSearchByCode.Checked ? "[Code]" : "[Name]";

            if (!string.IsNullOrEmpty(this.txtMemberFilter.Text.Trim()))
            {
                Form1 form1 = (Form1)this.FindForm();
                if (form1 == null)
                {
                    return;
                }
                ucManageEntities ucManageEntities = form1.FilterControlsOne(c => c is ucManageEntities) as ucManageEntities;
                if (ucManageEntities.lstEntities.SelectedItem != null && form1.lstModels.SelectedItem != null)
                {
                    string searchTerm = string.Format(" {0} " + (!string.IsNullOrEmpty(this.txSearchTerm.Text) ? this.txSearchTerm.Text : "LIKE") + " '{1}' " + (!string.IsNullOrEmpty(this.txSimLevel.Text) ? this.txSimLevel.Text + " " : "0.5 1 0.32 "), (object)str, (object)this.txtMemberFilter.Text);
                    this.DisplayMembers((Identifier)form1.lstModels.SelectedItem, (CustomVersion)form1.lstVersions.SelectedItem, (CustomEntity)ucManageEntities.lstEntities.SelectedItem, searchTerm);
                }
            }
            else
            {
                MessageBox.Show("Filter must not be an empty value");
            }
        }
Exemplo n.º 5
0
 private void InitializeComponent()
 {
     this.components             = new System.ComponentModel.Container();
     this.groupBox2              = new System.Windows.Forms.GroupBox();
     this.cbInitialCatalog       = new System.Windows.Forms.ComboBox();
     this.cbDataSource           = new System.Windows.Forms.ComboBox();
     this.chkDropExistingDB      = new System.Windows.Forms.CheckBox();
     this.label9                 = new System.Windows.Forms.Label();
     this.txtDefaultSchema       = new System.Windows.Forms.TextBox();
     this.label8                 = new System.Windows.Forms.Label();
     this.txtModellingDb         = new System.Windows.Forms.TextBox();
     this.btExportDiagram        = new System.Windows.Forms.Button();
     this.label7                 = new System.Windows.Forms.Label();
     this.label5                 = new System.Windows.Forms.Label();
     this.btDrawTreeView         = new System.Windows.Forms.Button();
     this.treeView1              = new System.Windows.Forms.TreeView();
     this.label2                 = new System.Windows.Forms.Label();
     this.label1                 = new System.Windows.Forms.Label();
     this.cbVersion              = new System.Windows.Forms.ComboBox();
     this.cbModel                = new System.Windows.Forms.ComboBox();
     this.lblError               = new System.Windows.Forms.Label();
     this.label3                 = new System.Windows.Forms.Label();
     this.toolTip1               = new System.Windows.Forms.ToolTip(this.components);
     this.label4                 = new System.Windows.Forms.Label();
     this.txtAttachDbFilename    = new System.Windows.Forms.TextBox();
     this.groupBox1              = new System.Windows.Forms.GroupBox();
     this.groupBox3              = new System.Windows.Forms.GroupBox();
     this.txtSingleConString     = new System.Windows.Forms.ComboBox();
     this.rbUseConStringElements = new System.Windows.Forms.RadioButton();
     this.rbUseSingleConString   = new System.Windows.Forms.RadioButton();
     this.label6                 = new System.Windows.Forms.Label();
     this.txtUser                = new System.Windows.Forms.TextBox();
     this.label10                = new System.Windows.Forms.Label();
     this.txtPass                = new System.Windows.Forms.TextBox();
     this.helpProvider1          = new System.Windows.Forms.HelpProvider();
     this.btHelp                 = new System.Windows.Forms.Button();
     this.ckCreateDb             = new System.Windows.Forms.CheckBox();
     this.ucManageEntities1      = new MDSManager2012.Desktop.ucManageEntities();
     this.groupBox2.SuspendLayout();
     this.groupBox1.SuspendLayout();
     this.groupBox3.SuspendLayout();
     this.SuspendLayout();
     //
     // groupBox2
     //
     this.groupBox2.Controls.Add(this.ckCreateDb);
     this.groupBox2.Controls.Add(this.rbUseSingleConString);
     this.groupBox2.Controls.Add(this.rbUseConStringElements);
     this.groupBox2.Controls.Add(this.groupBox3);
     this.groupBox2.Controls.Add(this.groupBox1);
     this.groupBox2.Controls.Add(this.chkDropExistingDB);
     this.groupBox2.Controls.Add(this.label9);
     this.groupBox2.Controls.Add(this.txtDefaultSchema);
     this.groupBox2.Location = new System.Drawing.Point(4, 60);
     this.groupBox2.Name     = "groupBox2";
     this.groupBox2.Size     = new System.Drawing.Size(276, 299);
     this.groupBox2.TabIndex = 33;
     this.groupBox2.TabStop  = false;
     this.groupBox2.Text     = "Model Diagram";
     //
     // cbInitialCatalog
     //
     this.cbInitialCatalog.FormattingEnabled = true;
     this.cbInitialCatalog.Location          = new System.Drawing.Point(95, 43);
     this.cbInitialCatalog.Name     = "cbInitialCatalog";
     this.cbInitialCatalog.Size     = new System.Drawing.Size(147, 21);
     this.cbInitialCatalog.TabIndex = 28;
     //
     // cbDataSource
     //
     this.cbDataSource.FormattingEnabled = true;
     this.cbDataSource.Location          = new System.Drawing.Point(95, 19);
     this.cbDataSource.Name     = "cbDataSource";
     this.cbDataSource.Size     = new System.Drawing.Size(147, 21);
     this.cbDataSource.TabIndex = 27;
     //
     // chkDropExistingDB
     //
     this.chkDropExistingDB.AutoSize = true;
     this.chkDropExistingDB.Location = new System.Drawing.Point(3, 253);
     this.chkDropExistingDB.Name     = "chkDropExistingDB";
     this.chkDropExistingDB.Size     = new System.Drawing.Size(138, 17);
     this.chkDropExistingDB.TabIndex = 26;
     this.chkDropExistingDB.Text     = "Drop Existing DataBase";
     this.chkDropExistingDB.UseVisualStyleBackColor = true;
     //
     // label9
     //
     this.label9.AutoSize = true;
     this.label9.Location = new System.Drawing.Point(5, 228);
     this.label9.Name     = "label9";
     this.label9.Size     = new System.Drawing.Size(83, 13);
     this.label9.TabIndex = 25;
     this.label9.Text     = "Default Schema";
     //
     // txtDefaultSchema
     //
     this.txtDefaultSchema.Location = new System.Drawing.Point(90, 225);
     this.txtDefaultSchema.Name     = "txtDefaultSchema";
     this.txtDefaultSchema.Size     = new System.Drawing.Size(147, 20);
     this.txtDefaultSchema.TabIndex = 24;
     this.txtDefaultSchema.Text     = "dbo";
     //
     // label8
     //
     this.label8.AutoSize = true;
     this.label8.Location = new System.Drawing.Point(23, 70);
     this.label8.Name     = "label8";
     this.label8.Size     = new System.Drawing.Size(70, 13);
     this.label8.TabIndex = 23;
     this.label8.Text     = "Modelling DB";
     //
     // txtModellingDb
     //
     this.txtModellingDb.Location = new System.Drawing.Point(95, 67);
     this.txtModellingDb.Name     = "txtModellingDb";
     this.txtModellingDb.Size     = new System.Drawing.Size(147, 20);
     this.txtModellingDb.TabIndex = 22;
     this.txtModellingDb.Text     = "MDSmodelling";
     //
     // btExportDiagram
     //
     this.btExportDiagram.BackgroundImage       = global::MDSManager2012.Desktop.Properties.Resources.export_icon;
     this.btExportDiagram.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
     this.btExportDiagram.ImageAlign            = System.Drawing.ContentAlignment.BottomRight;
     this.btExportDiagram.Location = new System.Drawing.Point(286, 314);
     this.btExportDiagram.Name     = "btExportDiagram";
     this.btExportDiagram.Size     = new System.Drawing.Size(20, 20);
     this.btExportDiagram.TabIndex = 21;
     this.toolTip1.SetToolTip(this.btExportDiagram, "Export Diagram");
     this.btExportDiagram.UseVisualStyleBackColor = true;
     this.btExportDiagram.Click += new System.EventHandler(this.btExportDiagram_Click);
     //
     // label7
     //
     this.label7.AutoSize = true;
     this.label7.Location = new System.Drawing.Point(23, 46);
     this.label7.Name     = "label7";
     this.label7.Size     = new System.Drawing.Size(70, 13);
     this.label7.TabIndex = 20;
     this.label7.Text     = "Initial Catalog";
     //
     // label5
     //
     this.label5.AutoSize = true;
     this.label5.Location = new System.Drawing.Point(26, 24);
     this.label5.Name     = "label5";
     this.label5.Size     = new System.Drawing.Size(67, 13);
     this.label5.TabIndex = 18;
     this.label5.Text     = "Data Source";
     //
     // btDrawTreeView
     //
     this.btDrawTreeView.BackgroundImage       = global::MDSManager2012.Desktop.Properties.Resources.validate_icon;
     this.btDrawTreeView.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
     this.btDrawTreeView.Location = new System.Drawing.Point(163, 365);
     this.btDrawTreeView.Name     = "btDrawTreeView";
     this.btDrawTreeView.Size     = new System.Drawing.Size(19, 19);
     this.btDrawTreeView.TabIndex = 37;
     this.toolTip1.SetToolTip(this.btDrawTreeView, "Draw TreeView");
     this.btDrawTreeView.UseVisualStyleBackColor = true;
     this.btDrawTreeView.Click += new System.EventHandler(this.btDrawTreeView_Click);
     //
     // treeView1
     //
     this.treeView1.FullRowSelect = true;
     this.treeView1.Location      = new System.Drawing.Point(12, 390);
     this.treeView1.Name          = "treeView1";
     this.treeView1.Size          = new System.Drawing.Size(558, 117);
     this.treeView1.TabIndex      = 38;
     //
     // label2
     //
     this.label2.AutoSize = true;
     this.label2.Location = new System.Drawing.Point(16, 36);
     this.label2.Name     = "label2";
     this.label2.Size     = new System.Drawing.Size(42, 13);
     this.label2.TabIndex = 42;
     this.label2.Text     = "Version";
     //
     // label1
     //
     this.label1.AutoSize = true;
     this.label1.Location = new System.Drawing.Point(22, 9);
     this.label1.Name     = "label1";
     this.label1.Size     = new System.Drawing.Size(36, 13);
     this.label1.TabIndex = 41;
     this.label1.Text     = "Model";
     //
     // cbVersion
     //
     this.cbVersion.FormattingEnabled = true;
     this.cbVersion.Location          = new System.Drawing.Point(63, 33);
     this.cbVersion.Name     = "cbVersion";
     this.cbVersion.Size     = new System.Drawing.Size(217, 21);
     this.cbVersion.TabIndex = 40;
     //
     // cbModel
     //
     this.cbModel.FormattingEnabled = true;
     this.cbModel.Location          = new System.Drawing.Point(63, 6);
     this.cbModel.Name                  = "cbModel";
     this.cbModel.Size                  = new System.Drawing.Size(217, 21);
     this.cbModel.TabIndex              = 39;
     this.cbModel.SelectedIndexChanged += new System.EventHandler(this.cbModel_SelectedIndexChanged);
     //
     // lblError
     //
     this.lblError.AutoSize  = true;
     this.lblError.ForeColor = System.Drawing.Color.Red;
     this.lblError.Location  = new System.Drawing.Point(17, 446);
     this.lblError.Name      = "lblError";
     this.lblError.Size      = new System.Drawing.Size(0, 13);
     this.lblError.TabIndex  = 43;
     //
     // label3
     //
     this.label3.AutoSize = true;
     this.label3.Location = new System.Drawing.Point(11, 368);
     this.label3.Name     = "label3";
     this.label3.Size     = new System.Drawing.Size(133, 13);
     this.label3.TabIndex = 45;
     this.label3.Text     = "TreeView Generator (Beta)";
     //
     // label4
     //
     this.label4.AutoSize = true;
     this.label4.Location = new System.Drawing.Point(-2, 93);
     this.label4.Name     = "label4";
     this.label4.Size     = new System.Drawing.Size(95, 13);
     this.label4.TabIndex = 30;
     this.label4.Text     = "AttachDB filename";
     //
     // txtAttachDbFilename
     //
     this.txtAttachDbFilename.Location = new System.Drawing.Point(95, 90);
     this.txtAttachDbFilename.Name     = "txtAttachDbFilename";
     this.txtAttachDbFilename.Size     = new System.Drawing.Size(147, 20);
     this.txtAttachDbFilename.TabIndex = 29;
     //
     // groupBox1
     //
     this.groupBox1.Controls.Add(this.label10);
     this.groupBox1.Controls.Add(this.txtPass);
     this.groupBox1.Controls.Add(this.label6);
     this.groupBox1.Controls.Add(this.txtUser);
     this.groupBox1.Controls.Add(this.label5);
     this.groupBox1.Controls.Add(this.label4);
     this.groupBox1.Controls.Add(this.label7);
     this.groupBox1.Controls.Add(this.txtAttachDbFilename);
     this.groupBox1.Controls.Add(this.txtModellingDb);
     this.groupBox1.Controls.Add(this.cbInitialCatalog);
     this.groupBox1.Controls.Add(this.label8);
     this.groupBox1.Controls.Add(this.cbDataSource);
     this.groupBox1.Location = new System.Drawing.Point(4, 15);
     this.groupBox1.Name     = "groupBox1";
     this.groupBox1.Size     = new System.Drawing.Size(266, 162);
     this.groupBox1.TabIndex = 31;
     this.groupBox1.TabStop  = false;
     this.groupBox1.Text     = "Connection string elements";
     //
     // groupBox3
     //
     this.groupBox3.Controls.Add(this.txtSingleConString);
     this.groupBox3.Location = new System.Drawing.Point(4, 183);
     this.groupBox3.Name     = "groupBox3";
     this.groupBox3.Size     = new System.Drawing.Size(266, 37);
     this.groupBox3.TabIndex = 32;
     this.groupBox3.TabStop  = false;
     this.groupBox3.Text     = "Single connection string";
     //
     // txtSingleConString
     //
     this.txtSingleConString.FormattingEnabled = true;
     this.txtSingleConString.Location          = new System.Drawing.Point(6, 14);
     this.txtSingleConString.Name     = "txtSingleConString";
     this.txtSingleConString.Size     = new System.Drawing.Size(254, 21);
     this.txtSingleConString.TabIndex = 28;
     this.txtSingleConString.Text     = "data source=(local);Integrated Security=True;initial catalog=MDS";
     //
     // rbUseConStringElements
     //
     this.rbUseConStringElements.AutoSize = true;
     this.rbUseConStringElements.Location = new System.Drawing.Point(3, 276);
     this.rbUseConStringElements.Name     = "rbUseConStringElements";
     this.rbUseConStringElements.Size     = new System.Drawing.Size(136, 17);
     this.rbUseConStringElements.TabIndex = 33;
     this.rbUseConStringElements.Text     = "use con.string elements";
     this.rbUseConStringElements.UseVisualStyleBackColor = true;
     //
     // rbUseSingleConString
     //
     this.rbUseSingleConString.AutoSize = true;
     this.rbUseSingleConString.Checked  = true;
     this.rbUseSingleConString.Location = new System.Drawing.Point(149, 276);
     this.rbUseSingleConString.Name     = "rbUseSingleConString";
     this.rbUseSingleConString.Size     = new System.Drawing.Size(121, 17);
     this.rbUseSingleConString.TabIndex = 34;
     this.rbUseSingleConString.TabStop  = true;
     this.rbUseSingleConString.Text     = "use single con.string";
     this.rbUseSingleConString.UseVisualStyleBackColor = true;
     //
     // label6
     //
     this.label6.AutoSize = true;
     this.label6.Location = new System.Drawing.Point(62, 119);
     this.label6.Name     = "label6";
     this.label6.Size     = new System.Drawing.Size(27, 13);
     this.label6.TabIndex = 32;
     this.label6.Text     = "user";
     //
     // txtUser
     //
     this.txtUser.Location = new System.Drawing.Point(95, 116);
     this.txtUser.Name     = "txtUser";
     this.txtUser.Size     = new System.Drawing.Size(147, 20);
     this.txtUser.TabIndex = 31;
     //
     // label10
     //
     this.label10.AutoSize = true;
     this.label10.Location = new System.Drawing.Point(36, 145);
     this.label10.Name     = "label10";
     this.label10.Size     = new System.Drawing.Size(53, 13);
     this.label10.TabIndex = 34;
     this.label10.Text     = "Password";
     //
     // txtPass
     //
     this.txtPass.Location = new System.Drawing.Point(95, 142);
     this.txtPass.Name     = "txtPass";
     this.txtPass.Size     = new System.Drawing.Size(147, 20);
     this.txtPass.TabIndex = 33;
     //
     // btHelp
     //
     this.btHelp.Location = new System.Drawing.Point(286, 336);
     this.btHelp.Name     = "btHelp";
     this.btHelp.Size     = new System.Drawing.Size(123, 23);
     this.btHelp.TabIndex = 46;
     this.btHelp.Text     = "Help";
     this.btHelp.UseVisualStyleBackColor = true;
     this.btHelp.Click += new System.EventHandler(this.btHelp_Click);
     //
     // ckCreateDb
     //
     this.ckCreateDb.AutoSize = true;
     this.ckCreateDb.Enabled  = false;
     this.ckCreateDb.Location = new System.Drawing.Point(134, 253);
     this.ckCreateDb.Name     = "ckCreateDb";
     this.ckCreateDb.Size     = new System.Drawing.Size(142, 17);
     this.ckCreateDb.TabIndex = 35;
     this.ckCreateDb.Text     = "Create new modelling db";
     this.ckCreateDb.UseVisualStyleBackColor = true;
     //
     // ucManageEntities1
     //
     this.ucManageEntities1.AutoSize = true;
     this.ucManageEntities1.Location = new System.Drawing.Point(286, 9);
     this.ucManageEntities1.Name     = "ucManageEntities1";
     this.ucManageEntities1.Size     = new System.Drawing.Size(284, 299);
     this.ucManageEntities1.TabIndex = 44;
     //
     // ModelDiagramManager
     //
     this.ClientSize = new System.Drawing.Size(570, 518);
     this.Controls.Add(this.btHelp);
     this.Controls.Add(this.label3);
     this.Controls.Add(this.ucManageEntities1);
     this.Controls.Add(this.lblError);
     this.Controls.Add(this.label2);
     this.Controls.Add(this.label1);
     this.Controls.Add(this.btExportDiagram);
     this.Controls.Add(this.cbVersion);
     this.Controls.Add(this.cbModel);
     this.Controls.Add(this.btDrawTreeView);
     this.Controls.Add(this.treeView1);
     this.Controls.Add(this.groupBox2);
     this.MaximumSize = new System.Drawing.Size(586, 557);
     this.Name        = "ModelDiagramManager";
     this.Text        = "Model Diagram Manager";
     this.Load       += new System.EventHandler(this.ModelDiagramManager_Load);
     this.groupBox2.ResumeLayout(false);
     this.groupBox2.PerformLayout();
     this.groupBox1.ResumeLayout(false);
     this.groupBox1.PerformLayout();
     this.groupBox3.ResumeLayout(false);
     this.ResumeLayout(false);
     this.PerformLayout();
 }