private void AddSelectedItemsToGroup(MPListView sourceListView) { if (_channelGroup == null) { return; } TvBusinessLayer layer = new TvBusinessLayer(); foreach (ListViewItem sourceItem in sourceListView.SelectedItems) { Channel channel = null; if (sourceItem.Tag is Channel) { channel = (Channel)sourceItem.Tag; } else if (sourceItem.Tag is GroupMap) { channel = layer.GetChannel(((GroupMap)sourceItem.Tag).IdChannel); } else { continue; } GroupMap groupMap = null; layer.AddChannelToGroup(channel, _channelGroup); //get the new group map and set the listitem tag SqlBuilder sb = new SqlBuilder(StatementType.Select, typeof(GroupMap)); sb.AddConstraint(Operator.Equals, "idChannel", channel.IdChannel); sb.AddConstraint(Operator.Equals, "idGroup", _channelGroup.IdGroup); SqlStatement stmt = sb.GetStatement(true); groupMap = ObjectFactory.GetInstance <GroupMap>(stmt.Execute()); foreach (ListViewItem item in listView1.Items) { if ((item.Tag as Channel) == channel) { item.Tag = groupMap; break; } } } }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.cancelButton = new MediaPortal.UserInterface.Controls.MPButton(); this.okButton = new MediaPortal.UserInterface.Controls.MPButton(); this.parametersListView = new MediaPortal.UserInterface.Controls.MPListView(); this.columnHeader1 = new System.Windows.Forms.ColumnHeader(); this.columnHeader2 = new System.Windows.Forms.ColumnHeader(); this.SuspendLayout(); // // cancelButton // this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles) ((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.cancelButton.Location = new System.Drawing.Point(286, 144); this.cancelButton.Name = "cancelButton"; this.cancelButton.TabIndex = 2; this.cancelButton.Text = "Cancel"; this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click); // // okButton // this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles) ((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.okButton.Enabled = false; this.okButton.Location = new System.Drawing.Point(206, 144); this.okButton.Name = "okButton"; this.okButton.TabIndex = 1; this.okButton.Text = "OK"; this.okButton.Click += new System.EventHandler(this.okButton_Click); // // parametersListView // this.parametersListView.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.parametersListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.columnHeader1, this.columnHeader2 }); this.parametersListView.FullRowSelect = true; this.parametersListView.Location = new System.Drawing.Point(8, 8); this.parametersListView.Name = "parametersListView"; this.parametersListView.Size = new System.Drawing.Size(352, 128); this.parametersListView.TabIndex = 0; this.parametersListView.View = System.Windows.Forms.View.Details; this.parametersListView.DoubleClick += new System.EventHandler(this.parametersListView_DoubleClick); this.parametersListView.SelectedIndexChanged += new System.EventHandler(this.parametersListView_SelectedIndexChanged); // // columnHeader1 // this.columnHeader1.Text = "Parameter"; this.columnHeader1.Width = 77; // // columnHeader2 // this.columnHeader2.Text = "Description"; this.columnHeader2.Width = 271; // // ParameterForm // this.AcceptButton = this.okButton; this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.CancelButton = this.cancelButton; this.ClientSize = new System.Drawing.Size(370, 176); this.Controls.Add(this.parametersListView); this.Controls.Add(this.okButton); this.Controls.Add(this.cancelButton); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow; this.Name = "ParameterForm"; this.ShowInTaskbar = false; this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Parameter"; this.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.groupBox1 = new MediaPortal.UserInterface.Controls.MPGroupBox(); this.checkBoxSwitchRemovableDrive = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.checkBoxAddOpticalDiskDrives = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.checkBoxRemember = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.deleteButton = new MediaPortal.UserInterface.Controls.MPButton(); this.editButton = new MediaPortal.UserInterface.Controls.MPButton(); this.addButton = new MediaPortal.UserInterface.Controls.MPButton(); this.sharesListView = new MediaPortal.UserInterface.Controls.MPListView(); this.columnHeader1 = new System.Windows.Forms.ColumnHeader(); this.columnHeader3 = new System.Windows.Forms.ColumnHeader(); this.columnHeader2 = new System.Windows.Forms.ColumnHeader(); this.groupBox1.SuspendLayout(); this.SuspendLayout(); // // groupBox1 // this.groupBox1.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.groupBox1.Controls.Add(this.checkBoxSwitchRemovableDrive); this.groupBox1.Controls.Add(this.checkBoxAddOpticalDiskDrives); this.groupBox1.Controls.Add(this.checkBoxRemember); this.groupBox1.Controls.Add(this.deleteButton); this.groupBox1.Controls.Add(this.editButton); this.groupBox1.Controls.Add(this.addButton); this.groupBox1.Controls.Add(this.sharesListView); this.groupBox1.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.groupBox1.Location = new System.Drawing.Point(6, 0); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(462, 408); this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; // // checkBoxSwitchRemovableDrive // this.checkBoxSwitchRemovableDrive.Anchor = ((System.Windows.Forms.AnchorStyles) ((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.checkBoxSwitchRemovableDrive.AutoSize = true; this.checkBoxSwitchRemovableDrive.Checked = true; this.checkBoxSwitchRemovableDrive.CheckState = System.Windows.Forms.CheckState.Checked; this.checkBoxSwitchRemovableDrive.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.checkBoxSwitchRemovableDrive.Location = new System.Drawing.Point(16, 380); this.checkBoxSwitchRemovableDrive.Name = "checkBoxSwitchRemovableDrive"; this.checkBoxSwitchRemovableDrive.Size = new System.Drawing.Size(254, 17); this.checkBoxSwitchRemovableDrive.TabIndex = 6; this.checkBoxSwitchRemovableDrive.Text = "Automatically switch to inserted removable drives"; this.checkBoxSwitchRemovableDrive.UseVisualStyleBackColor = true; // // checkBoxAddOpticalDiskDrives // this.checkBoxAddOpticalDiskDrives.Anchor = ((System.Windows.Forms.AnchorStyles) ((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.checkBoxAddOpticalDiskDrives.AutoSize = true; this.checkBoxAddOpticalDiskDrives.Checked = true; this.checkBoxAddOpticalDiskDrives.CheckState = System.Windows.Forms.CheckState.Checked; this.checkBoxAddOpticalDiskDrives.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.checkBoxAddOpticalDiskDrives.Location = new System.Drawing.Point(16, 357); this.checkBoxAddOpticalDiskDrives.Name = "checkBoxAddOpticalDiskDrives"; this.checkBoxAddOpticalDiskDrives.Size = new System.Drawing.Size(194, 17); this.checkBoxAddOpticalDiskDrives.TabIndex = 5; this.checkBoxAddOpticalDiskDrives.Text = "Automatically add optical disk drives"; this.checkBoxAddOpticalDiskDrives.UseVisualStyleBackColor = true; // // checkBoxRemember // this.checkBoxRemember.Anchor = ((System.Windows.Forms.AnchorStyles) ((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.checkBoxRemember.AutoSize = true; this.checkBoxRemember.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.checkBoxRemember.Location = new System.Drawing.Point(16, 334); this.checkBoxRemember.Name = "checkBoxRemember"; this.checkBoxRemember.Size = new System.Drawing.Size(149, 17); this.checkBoxRemember.TabIndex = 1; this.checkBoxRemember.Text = "Remember last used folder"; this.checkBoxRemember.UseVisualStyleBackColor = true; // // deleteButton // this.deleteButton.Anchor = ((System.Windows.Forms.AnchorStyles) ((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.deleteButton.Enabled = false; this.deleteButton.Location = new System.Drawing.Point(374, 331); this.deleteButton.Name = "deleteButton"; this.deleteButton.Size = new System.Drawing.Size(72, 22); this.deleteButton.TabIndex = 4; this.deleteButton.Text = "Delete"; this.deleteButton.UseVisualStyleBackColor = true; this.deleteButton.Click += new System.EventHandler(this.deleteButton_Click); // // editButton // this.editButton.Anchor = ((System.Windows.Forms.AnchorStyles) ((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.editButton.Enabled = false; this.editButton.Location = new System.Drawing.Point(294, 331); this.editButton.Name = "editButton"; this.editButton.Size = new System.Drawing.Size(72, 22); this.editButton.TabIndex = 3; this.editButton.Text = "Edit"; this.editButton.UseVisualStyleBackColor = true; this.editButton.Click += new System.EventHandler(this.editButton_Click); // // addButton // this.addButton.Anchor = ((System.Windows.Forms.AnchorStyles) ((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.addButton.Location = new System.Drawing.Point(214, 331); this.addButton.Name = "addButton"; this.addButton.Size = new System.Drawing.Size(72, 22); this.addButton.TabIndex = 2; this.addButton.Text = "Add"; this.addButton.UseVisualStyleBackColor = true; this.addButton.Click += new System.EventHandler(this.addButton_Click); // // sharesListView // this.sharesListView.AllowDrop = true; this.sharesListView.AllowRowReorder = true; this.sharesListView.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.sharesListView.CheckBoxes = true; this.sharesListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.columnHeader1, this.columnHeader3, this.columnHeader2 }); this.sharesListView.FullRowSelect = true; this.sharesListView.Location = new System.Drawing.Point(16, 24); this.sharesListView.Name = "sharesListView"; this.sharesListView.Size = new System.Drawing.Size(430, 301); this.sharesListView.TabIndex = 0; this.sharesListView.UseCompatibleStateImageBehavior = false; this.sharesListView.View = System.Windows.Forms.View.Details; this.sharesListView.SelectedIndexChanged += new System.EventHandler(this.sharesListView_SelectedIndexChanged); this.sharesListView.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.sharesListView_ItemCheck); // // columnHeader1 // this.columnHeader1.Text = "Name"; this.columnHeader1.Width = 106; // // columnHeader3 // this.columnHeader3.Text = "Pin"; this.columnHeader3.Width = 57; // // columnHeader2 // this.columnHeader2.Text = "Folder"; this.columnHeader2.Width = 273; // // BaseShares // this.Controls.Add(this.groupBox1); this.Name = "BaseShares"; this.Size = new System.Drawing.Size(472, 408); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); this.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.groupBox1 = new MediaPortal.UserInterface.Controls.MPGroupBox(); this.intervalTextBox = new MediaPortal.UserInterface.Controls.MPTextBox(); this.label3 = new MediaPortal.UserInterface.Controls.MPLabel(); this.windSpeedComboBox = new MediaPortal.UserInterface.Controls.MPComboBox(); this.label2 = new MediaPortal.UserInterface.Controls.MPLabel(); this.temperatureComboBox = new MediaPortal.UserInterface.Controls.MPComboBox(); this.label1 = new MediaPortal.UserInterface.Controls.MPLabel(); this.mpGroupBox1 = new MediaPortal.UserInterface.Controls.MPGroupBox(); this.editButton = new MediaPortal.UserInterface.Controls.MPButton(); this.searchButton = new MediaPortal.UserInterface.Controls.MPButton(); this.removeButton = new MediaPortal.UserInterface.Controls.MPButton(); this.citiesListView = new MediaPortal.UserInterface.Controls.MPListView(); this.columnHeader1 = new System.Windows.Forms.ColumnHeader(); this.columnHeader2 = new System.Windows.Forms.ColumnHeader(); this.columnHeader3 = new System.Windows.Forms.ColumnHeader(); this.columnHeader4 = new System.Windows.Forms.ColumnHeader(); this.columnHeader5 = new System.Windows.Forms.ColumnHeader(); this.columnHeader6 = new System.Windows.Forms.ColumnHeader(); this.columnHeader7 = new System.Windows.Forms.ColumnHeader(); this.columnHeader8 = new System.Windows.Forms.ColumnHeader(); this.groupBox1.SuspendLayout(); this.mpGroupBox1.SuspendLayout(); this.SuspendLayout(); // // groupBox1 // this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles) (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.groupBox1.Controls.Add(this.intervalTextBox); this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.windSpeedComboBox); this.groupBox1.Controls.Add(this.label2); this.groupBox1.Controls.Add(this.temperatureComboBox); this.groupBox1.Controls.Add(this.label1); this.groupBox1.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.groupBox1.Location = new System.Drawing.Point(6, 0); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(462, 104); this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; this.groupBox1.Text = "Settings"; // // intervalTextBox // this.intervalTextBox.Anchor = ((System.Windows.Forms.AnchorStyles) (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.intervalTextBox.BorderColor = System.Drawing.Color.Empty; this.intervalTextBox.Location = new System.Drawing.Point(168, 68); this.intervalTextBox.Name = "intervalTextBox"; this.intervalTextBox.Size = new System.Drawing.Size(278, 20); this.intervalTextBox.TabIndex = 5; // // label3 // this.label3.Location = new System.Drawing.Point(16, 72); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(150, 16); this.label3.TabIndex = 4; this.label3.Text = "Refresh interval (minutes):"; // // windSpeedComboBox // this.windSpeedComboBox.Anchor = ((System.Windows.Forms.AnchorStyles) (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.windSpeedComboBox.BorderColor = System.Drawing.Color.Empty; this.windSpeedComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.windSpeedComboBox.Location = new System.Drawing.Point(168, 44); this.windSpeedComboBox.Name = "windSpeedComboBox"; this.windSpeedComboBox.Size = new System.Drawing.Size(278, 21); this.windSpeedComboBox.TabIndex = 3; // // label2 // this.label2.Location = new System.Drawing.Point(16, 48); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(120, 16); this.label2.TabIndex = 2; this.label2.Text = "Wind speed shown as:"; // // temperatureComboBox // this.temperatureComboBox.Anchor = ((System.Windows.Forms.AnchorStyles) (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.temperatureComboBox.BorderColor = System.Drawing.Color.Empty; this.temperatureComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.temperatureComboBox.Location = new System.Drawing.Point(168, 20); this.temperatureComboBox.Name = "temperatureComboBox"; this.temperatureComboBox.Size = new System.Drawing.Size(278, 21); this.temperatureComboBox.TabIndex = 1; // // label1 // this.label1.Location = new System.Drawing.Point(16, 24); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(120, 16); this.label1.TabIndex = 0; this.label1.Text = "Temperature shown in:"; // // mpGroupBox1 // this.mpGroupBox1.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.mpGroupBox1.Controls.Add(this.editButton); this.mpGroupBox1.Controls.Add(this.searchButton); this.mpGroupBox1.Controls.Add(this.removeButton); this.mpGroupBox1.Controls.Add(this.citiesListView); this.mpGroupBox1.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.mpGroupBox1.Location = new System.Drawing.Point(6, 112); this.mpGroupBox1.Name = "mpGroupBox1"; this.mpGroupBox1.Size = new System.Drawing.Size(462, 240); this.mpGroupBox1.TabIndex = 1; this.mpGroupBox1.TabStop = false; this.mpGroupBox1.Text = "Cities"; // // editButton // this.editButton.Anchor = ((System.Windows.Forms.AnchorStyles) ((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.editButton.Enabled = false; this.editButton.Location = new System.Drawing.Point(374, 208); this.editButton.Name = "editButton"; this.editButton.Size = new System.Drawing.Size(72, 22); this.editButton.TabIndex = 3; this.editButton.Text = "Edit"; this.editButton.UseVisualStyleBackColor = true; this.editButton.Click += new System.EventHandler(this.editButton_Click); // // searchButton // this.searchButton.Anchor = ((System.Windows.Forms.AnchorStyles) ((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.searchButton.Location = new System.Drawing.Point(214, 208); this.searchButton.Name = "searchButton"; this.searchButton.Size = new System.Drawing.Size(72, 22); this.searchButton.TabIndex = 1; this.searchButton.Text = "Add"; this.searchButton.UseVisualStyleBackColor = true; this.searchButton.Click += new System.EventHandler(this.searchButton_Click); // // removeButton // this.removeButton.Anchor = ((System.Windows.Forms.AnchorStyles) ((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.removeButton.Enabled = false; this.removeButton.Location = new System.Drawing.Point(294, 208); this.removeButton.Name = "removeButton"; this.removeButton.Size = new System.Drawing.Size(72, 22); this.removeButton.TabIndex = 2; this.removeButton.Text = "Remove"; this.removeButton.UseVisualStyleBackColor = true; this.removeButton.Click += new System.EventHandler(this.removeButton_Click); // // citiesListView // this.citiesListView.AllowDrop = true; this.citiesListView.AllowRowReorder = true; this.citiesListView.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.citiesListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.columnHeader1, this.columnHeader2, this.columnHeader3, this.columnHeader4, this.columnHeader5, this.columnHeader6, this.columnHeader7, this.columnHeader8 }); this.citiesListView.FullRowSelect = true; this.citiesListView.Location = new System.Drawing.Point(16, 24); this.citiesListView.Name = "citiesListView"; this.citiesListView.Size = new System.Drawing.Size(430, 176); this.citiesListView.TabIndex = 0; this.citiesListView.UseCompatibleStateImageBehavior = false; this.citiesListView.View = System.Windows.Forms.View.Details; this.citiesListView.SelectedIndexChanged += new System.EventHandler(this.citiesListView_SelectedIndexChanged); // // columnHeader1 // this.columnHeader1.Text = "City"; this.columnHeader1.Width = 125; // // columnHeader2 // this.columnHeader2.Text = "Code"; this.columnHeader2.Width = 78; // // columnHeader3 // this.columnHeader3.Text = "Satellite image"; this.columnHeader3.Width = 181; // // columnHeader4 // this.columnHeader4.Text = "Temperature image"; this.columnHeader4.Width = 201; // // columnHeader5 // this.columnHeader5.Text = "UV Index image"; this.columnHeader5.Width = 201; // // columnHeader6 // this.columnHeader6.Text = "Winds Image"; this.columnHeader6.Width = 201; // // columnHeader7 // this.columnHeader7.Text = "Humidity image"; this.columnHeader7.Width = 201; // // columnHeader8 // this.columnHeader8.Text = "Precipitation image"; this.columnHeader8.Width = 101; // // Weather // this.Controls.Add(this.mpGroupBox1); this.Controls.Add(this.groupBox1); this.Name = "Weather"; this.Size = new System.Drawing.Size(472, 408); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); this.mpGroupBox1.ResumeLayout(false); this.ResumeLayout(false); }