public void ColumnHeaderCollection_IndexOfKey_Invoke_ReturnsExpected(string key, int expected) { var listView = new ListView(); var collection = new ListView.ColumnHeaderCollection(listView); var header1 = new ColumnHeader(); var header2 = new ColumnHeader { Name = "text" }; collection.Add(header1); collection.Add(header2); Assert.Equal(expected, collection.IndexOfKey(key)); // Call again to validate caching behaviour. Assert.Equal(expected, collection.IndexOfKey(key)); Assert.Equal(-1, collection.IndexOfKey("noSuchKey")); }
public void ColumnHeaderCollection_AddRange_ColumnHeaderArrayWithDisplayIndex_Success() { using var listView = new ListView(); var collection = new ListView.ColumnHeaderCollection(listView); using var header1 = new ColumnHeader("text1") { DisplayIndex = 1 }; using var header2 = new ColumnHeader("text2") { DisplayIndex = 0 }; using var header3 = new ColumnHeader("text3") { DisplayIndex = 2 }; using var header4 = new ColumnHeader("text4") { DisplayIndex = 2 }; using var header5 = new ColumnHeader("text5") { DisplayIndex = 10 }; var items = new ColumnHeader[] { header1, header2, header3, header4, header5 }; collection.AddRange(items); Assert.Equal(5, collection.Count); Assert.Same(header1, collection[0]); Assert.Same(header2, collection[1]); Assert.Same(header3, collection[2]); Assert.Same(header4, collection[3]); Assert.Same(header5, collection[4]); Assert.Equal(0, header1.DisplayIndex); Assert.Equal(1, header2.DisplayIndex); Assert.Equal(2, header3.DisplayIndex); Assert.Equal(3, header4.DisplayIndex); Assert.Equal(4, header5.DisplayIndex); }
/// <summary> /// USE FOR DEBUGGING PURPOSES ONLY. If returnNegativeOneIfMissing is `true`, this will return an /// invalid index, which will then cause any non-robust code to throw (thereby allowing you to /// find why the first column of a given ListView is being set to the incorrect value). /// </summary> /// <param name="columns"></param> /// <param name="name"></param> /// <param name="returnNegativeOneIfMissing">If true, this method will return -1 for a missing name</param> /// <returns></returns> public int ColumnNameFind(ListView.ColumnHeaderCollection columns, string name, bool returnNegativeOneIfMissing) { int x = 0; foreach (ColumnHeader col in columns) { if (string.Compare(col.Text, name, true) == 0) { return(x); } x++; } if (returnNegativeOneIfMissing) { return(-1); } return(0); }
// 修改全部列的视觉 public void RefreshColumnDisplay(ListView.ColumnHeaderCollection columns) { #if DEBUG DisplayColumnsText(columns); #endif Column column = null; for (int i = 0; i < this.Count; i++) { column = this[i]; ColumnHeader header = columns[column.No]; SetHeaderText(header, i, column); } #if DEBUG DisplayColumnsText(columns); #endif }
/// <summary> /// Edit a given value /// </summary> /// <param name="context"></param> /// <param name="provider"></param> /// <param name="value"></param> /// <returns></returns> public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { // Figure out which ObjectListView we are working on. This should be the Instance of the context. ObjectListView olv = null; if (context != null) { olv = context.Instance as ObjectListView; } if (olv == null) { //THINK: Can this ever happen? System.Diagnostics.Debug.WriteLine("context.Instance was NOT an ObjectListView"); // Hack to figure out which ObjectListView we are working on ListView.ColumnHeaderCollection cols = (ListView.ColumnHeaderCollection)value; if (cols.Count == 0) { cols.Add(new OLVColumn()); olv = (ObjectListView)cols[0].ListView; cols.Clear(); olv.AllColumns.Clear(); } else { olv = (ObjectListView)cols[0].ListView; } } // Edit all the columns, not just the ones that are visible base.EditValue(context, provider, olv.AllColumns); // Calculate just the visible columns List <OLVColumn> newColumns = olv.GetFilteredColumns(View.Details); olv.Columns.Clear(); olv.Columns.AddRange(newColumns.ToArray()); return(olv.Columns); }
private void RefreshGames() { lvGames.Items.Clear(); // Grab the teams with a query from the open session IQuery q = m_session.CreateQuery("FROM Game"); m_games = q.List <Game>(); bool colorizer = false; foreach (Game game in m_games) { ListViewItem lvi = new ListViewItem(game.Title); lvi.SubItems.Add(game.Developer); lvi.SubItems.Add(game.ReleaseDate.ToString("dd/MM/yyyy")); lvi.SubItems.Add(game.Genre); lvi.Tag = game; if (colorizer == false) { lvi.BackColor = Color.Orange; } else { lvi.BackColor = Color.Moccasin; } colorizer = !colorizer; lvGames.Items.Add(lvi); } ListView.ColumnHeaderCollection lch = lvGames.Columns; for (int i = 0; i < lch.Count; i++) { lch[i].Width = -1; int dataSize = lch[i].Width; lch[i].Width = -2; int colSize = lch[i].Width; lch[i].Width = dataSize > colSize ? -1 : -2; } }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.TemplateList = new ListView(); this.NameHdr = new ColumnHeader(); this.TypeHdr = new ColumnHeader(); this.InfoLbl = new Label(); base.SuspendLayout(); this.TemplateList.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; this.TemplateList.CheckBoxes = true; ListView.ColumnHeaderCollection columns = this.TemplateList.Columns; ColumnHeader[] nameHdr = new ColumnHeader[] { this.NameHdr, this.TypeHdr }; columns.AddRange(nameHdr); this.TemplateList.FullRowSelect = true; this.TemplateList.HeaderStyle = ColumnHeaderStyle.Nonclickable; this.TemplateList.HideSelection = false; this.TemplateList.Location = new Point(3, 43); this.TemplateList.MultiSelect = false; this.TemplateList.Name = "TemplateList"; this.TemplateList.Size = new System.Drawing.Size(287, 188); this.TemplateList.TabIndex = 5; this.TemplateList.UseCompatibleStateImageBehavior = false; this.TemplateList.View = View.Details; this.TemplateList.DoubleClick += new EventHandler(this.TemplateList_DoubleClick); this.NameHdr.Text = "Template"; this.NameHdr.Width = 150; this.TypeHdr.Text = "Role"; this.TypeHdr.Width = 100; this.InfoLbl.Dock = DockStyle.Top; this.InfoLbl.Location = new Point(0, 0); this.InfoLbl.Name = "InfoLbl"; this.InfoLbl.Size = new System.Drawing.Size(293, 40); this.InfoLbl.TabIndex = 3; this.InfoLbl.Text = "Select any templates you would like to apply to the new creature."; base.AutoScaleDimensions = new SizeF(6f, 13f); base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; base.Controls.Add(this.TemplateList); base.Controls.Add(this.InfoLbl); base.Name = "VariantTemplatesPage"; base.Size = new System.Drawing.Size(293, 234); base.ResumeLayout(false); }
private void TranslateListViewColumns(ListView.ColumnHeaderCollection items) { for (int i = 0; i < items.Count; i++) { ColumnHeader item = items[i]; if (!ShouldTranslateObject(item)) { continue; } string name = item.Name; if ((name == "") && (item.Tag is string)) { name = (string)item.Tag; } resourceManager.ApplyResources(item, name); } }
public void ColumnHeaderCollection_IListRemove_ColumnHeader_Success() { var listView = new ListView(); IList collection = new ListView.ColumnHeaderCollection(listView); var header = new ColumnHeader(); collection.Add(header); collection.Remove(header); Assert.Empty(collection); Assert.Null(header.ListView); Assert.Equal(-1, header.Index); Assert.Equal(-1, header.DisplayIndex); // Remove again. collection.Remove(header); Assert.Empty(collection); Assert.Null(header.ListView); Assert.Equal(-1, header.Index); Assert.Equal(-1, header.DisplayIndex); }
public void ColumnHeaderCollection_Clear_Invoke_Success() { var listView = new ListView(); var collection = new ListView.ColumnHeaderCollection(listView); var header = new ColumnHeader(); collection.Add(header); collection.Clear(); Assert.Empty(collection); Assert.Null(header.ListView); Assert.Equal(-1, header.Index); Assert.Equal(0, header.DisplayIndex); // Clear again. collection.Clear(); Assert.Empty(collection); Assert.Null(header.ListView); Assert.Equal(-1, header.Index); Assert.Equal(0, header.DisplayIndex); }
private void RefreshLeagues() { lvLeagues.Items.Clear(); m_leagues = m_session.CreateQuery("FROM League").List <League>(); // Iterate and add data from the leagues bool colorizer = false; foreach (League league in m_leagues) { ListViewItem lvi = new ListViewItem(league.Name); lvi.SubItems.Add(league.StartDate.ToString("dd/MM/yyyy")); lvi.SubItems.Add(league.EndDate.ToString("dd/MM/yyyy")); lvi.SubItems.Add(league.Budget.ToString()); lvi.Tag = league; if (colorizer == false) { lvi.BackColor = Color.Orange; } else { lvi.BackColor = Color.Moccasin; } colorizer = !colorizer; lvLeagues.Items.Add(lvi); } // Adjust initial column widths ListView.ColumnHeaderCollection lch = lvLeagues.Columns; for (int i = 0; i < lch.Count; i++) { lch[i].Width = -1; int dataSize = lch[i].Width; lch[i].Width = -2; int colSize = lch[i].Width; lch[i].Width = dataSize > colSize ? -1 : -2; } }
private void InitializeComponent() { this.components = new System.ComponentModel.Container(); ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(HelpTaskNovelInfo)); this.listView_0 = new ListView(); this.columnHeader_0 = new ColumnHeader(); this.columnHeader_1 = new ColumnHeader(); this.columnHeader_2 = new ColumnHeader(); this.timer_0 = new Timer(this.components); base.SuspendLayout(); ListView.ColumnHeaderCollection columns = this.listView_0.Columns; ColumnHeader[] columnHeader0 = new ColumnHeader[] { this.columnHeader_0, this.columnHeader_1, this.columnHeader_2 }; columns.AddRange(columnHeader0); this.listView_0.Dock = DockStyle.Fill; this.listView_0.FullRowSelect = true; this.listView_0.Location = new Point(0, 0); this.listView_0.Name = "listView_0"; this.listView_0.Size = new System.Drawing.Size(452, 169); this.listView_0.TabIndex = 0; this.listView_0.UseCompatibleStateImageBehavior = false; this.listView_0.View = View.Details; this.columnHeader_0.Text = Localization.Get("子窗口ID"); this.columnHeader_0.Width = 200; this.columnHeader_1.Text = Localization.Get("小说编号"); this.columnHeader_2.Text = Localization.Get("小说名称"); this.columnHeader_2.Width = 150; this.timer_0.Interval = 1000; this.timer_0.Tick += new EventHandler(this.timer_0_Tick); base.ClientSize = new System.Drawing.Size(452, 169); base.Controls.Add(this.listView_0); this.Font = new System.Drawing.Font(Localization.Font, 9f, FontStyle.Regular, GraphicsUnit.Point, 134); base.Icon = (System.Drawing.Icon)componentResourceManager.GetObject("$this.Icon"); base.Name = "HelpTaskNovelInfo"; base.ShowInTaskbar = false; this.Text = Localization.Get("子窗口冲突监控"); base.Load += new EventHandler(this.HelpTaskNovelInfo_Load); base.FormClosing += new FormClosingEventHandler(this.HelpTaskNovelInfo_FormClosing); base.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.InfoLbl = new Label(); this.SlotList = new ListView(); this.SlotHdr = new ColumnHeader(); this.CardHdr = new ColumnHeader(); base.SuspendLayout(); this.InfoLbl.Dock = DockStyle.Top; this.InfoLbl.Location = new Point(0, 0); this.InfoLbl.Name = "InfoLbl"; this.InfoLbl.Size = new System.Drawing.Size(372, 40); this.InfoLbl.TabIndex = 1; this.InfoLbl.Text = "Double-click on each of the empty slots in the list below to select creatures to fill them."; ListView.ColumnHeaderCollection columns = this.SlotList.Columns; ColumnHeader[] slotHdr = new ColumnHeader[] { this.SlotHdr, this.CardHdr }; columns.AddRange(slotHdr); this.SlotList.Dock = DockStyle.Fill; this.SlotList.FullRowSelect = true; this.SlotList.HeaderStyle = ColumnHeaderStyle.Nonclickable; this.SlotList.HideSelection = false; this.SlotList.Location = new Point(0, 40); this.SlotList.Name = "SlotList"; this.SlotList.Size = new System.Drawing.Size(372, 206); this.SlotList.TabIndex = 2; this.SlotList.UseCompatibleStateImageBehavior = false; this.SlotList.View = View.Details; this.SlotList.DoubleClick += new EventHandler(this.SlotList_DoubleClick); this.SlotHdr.Text = "Slot"; this.SlotHdr.Width = 160; this.CardHdr.Text = "Selected Creature"; this.CardHdr.Width = 160; base.AutoScaleDimensions = new SizeF(6f, 13f); base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; base.Controls.Add(this.SlotList); base.Controls.Add(this.InfoLbl); base.Name = "EncounterSelectionPage"; base.Size = new System.Drawing.Size(372, 246); base.ResumeLayout(false); }
public void ColumnHeaderCollection_Clear_InvokeWithHandle_Success() { using var listView = new ListView(); var collection = new ListView.ColumnHeaderCollection(listView); using var header = new ColumnHeader(); collection.Add(header); Assert.NotEqual(IntPtr.Zero, listView.Handle); collection.Clear(); Assert.Empty(collection); Assert.Null(header.ListView); Assert.Equal(-1, header.Index); Assert.Equal(0, header.DisplayIndex); // Clear again. collection.Clear(); Assert.Empty(collection); Assert.Null(header.ListView); Assert.Equal(-1, header.Index); Assert.Equal(0, header.DisplayIndex); }
public void ColumnHeaderCollection_RemoveByKey_Invoke_Success(string key, int expectedCount) { var listView = new ListView(); var collection = new ListView.ColumnHeaderCollection(listView); var header = new ColumnHeader { Name = "text" }; collection.Add(header); collection.RemoveByKey(key); Assert.Equal(expectedCount, collection.Count); if (expectedCount == 0) { Assert.Null(header.ListView); } else { Assert.Same(listView, header.ListView); } }
public void GetListItemTypeTest() { List <int> list = new List <int> (); DateTime [] date_list = new DateTime [0]; StringCollection string_coll = new StringCollection(); Assert.AreEqual(typeof(int), ListBindingHelper.GetListItemType(list), "#A1"); Assert.AreEqual(typeof(DateTime), ListBindingHelper.GetListItemType(date_list), "#A2"); Assert.AreEqual(typeof(string), ListBindingHelper.GetListItemType(string_coll), "#A4"); // Returns the type of the first item if could enumerate ArrayList arraylist = new ArrayList(); arraylist.Add("hellou"); arraylist.Add(3.1416); Assert.AreEqual(typeof(string), ListBindingHelper.GetListItemType(arraylist), "#B1"); // Returns the type of the public Item property, not the explicit one ListView.ColumnHeaderCollection col_collection = new ListView.ColumnHeaderCollection(null); Assert.AreEqual(typeof(ColumnHeader), ListBindingHelper.GetListItemType(col_collection), "#C1"); ListContainer list_container = new ListContainer(); String str = "A"; Assert.AreEqual(typeof(IList), ListBindingHelper.GetListItemType(list_container, "List"), "#D1"); Assert.AreEqual(typeof(int), ListBindingHelper.GetListItemType(str, "Length"), "#D2"); // Property doesn't exist - fallback to object type Assert.AreEqual(typeof(object), ListBindingHelper.GetListItemType(str, "DoesntExist"), "#D3"); // finally, objects that are not array nor list Assert.AreEqual(typeof(double), ListBindingHelper.GetListItemType(3.1416), "#E1"); Assert.AreEqual(null, ListBindingHelper.GetListItemType(null), "#E2"); // bug #507120 - an IEnumerator instance with a Current value returning null, // falling back to IList.this detection, if possible Assert.AreEqual(typeof(string), ListBindingHelper.GetListItemType(new NullEnumerable(), null), "#F1"); }
public void ColumnHeaderCollection_RemoveAt_HasHandleWithTile_Success() { var listView = new ListView { View = View.Tile }; var collection = new ListView.ColumnHeaderCollection(listView); var header = new ColumnHeader(); collection.Add(header); collection.Add(new ColumnHeader()); collection.Add(new ColumnHeader()); collection.Add(new ColumnHeader()); Assert.NotEqual(IntPtr.Zero, listView.Handle); // Remove from start. collection.RemoveAt(0); Assert.Equal(3, collection.Count); Assert.Equal(0, collection[0].DisplayIndex); Assert.Equal(1, collection[1].DisplayIndex); Assert.Equal(2, collection[2].DisplayIndex); // Remove from middle. collection.RemoveAt(1); Assert.Equal(2, collection.Count); Assert.Equal(0, collection[0].DisplayIndex); Assert.Equal(1, collection[1].DisplayIndex); // Remove from end. collection.RemoveAt(1); Assert.Single(collection); Assert.Equal(0, collection[0].DisplayIndex); // Remove only. collection.RemoveAt(0); Assert.Empty(collection); Assert.Null(header.ListView); }
private void lvWI_ColumnClick(object sender, ColumnClickEventArgs e) { ListView.ColumnHeaderCollection columns = this.lvWI.Columns; ColumnHeader column = columns[e.Column]; object sd = column.Tag; SortOrder sortOrder; if (sd == null) { sortOrder = SortOrder.Ascending; } else { sortOrder = (SortOrder)Convert.ToInt32(sd as string); if (sortOrder == SortOrder.Ascending) { sortOrder = SortOrder.Descending; } else { sortOrder = SortOrder.Ascending; } } if (this.sortInfo.Index > -1) { columns[this.sortInfo.Index].ImageIndex = -1; } column.Tag = Convert.ToInt32(sortOrder).ToString(); column.ImageIndex = sortOrder == SortOrder.Ascending ? 0 : 1; this.sortInfo.Index = e.Column; this.sortInfo.Order = sortOrder; SortListData(); PopulateWI(false); }
public void Export() { SaveFileDialog SFD = new SaveFileDialog(); SFD.Filter = "Text Documents(*.txt)|*.txt|All Files(*.*)|*.*"; if (SFD.ShowDialog() == System.Windows.Forms.DialogResult.OK) { try { StreamWriter sw = new StreamWriter(SFD.FileName); ListView.ColumnHeaderCollection columns = Columns; foreach (ColumnHeader col in columns) { sw.Write(col.Text + "\t"); } sw.Write("\r\n"); foreach (ListViewItem item in Items) { for (int i = 0; i < columns.Count; i++) { try { sw.Write(item.SubItems[i].Text + "\t"); } catch (Exception ex) { } } sw.Write("\r\n"); } sw.Close(); } catch (Exception ex) { } } }
private void lvUsers_ColumnClick(object sender, ColumnClickEventArgs e) { ListView.ColumnHeaderCollection columns = this.lvUsers.Columns; ColumnHeader column = columns[e.Column]; object sd = column.Tag; SortOrder sortOrder; if (sd == null) { sortOrder = SortOrder.Ascending; } else { sortOrder = (SortOrder)sd; if (sortOrder == SortOrder.Ascending) { sortOrder = SortOrder.Descending; } else { sortOrder = SortOrder.Ascending; } } if (this.sortInfo.Index > -1) { columns[this.sortInfo.Index].ImageIndex = -1; } column.Tag = sortOrder; column.ImageIndex = sortOrder == SortOrder.Ascending ? 0 : 1; this.sortInfo.Index = e.Column; this.sortInfo.Order = sortOrder; SortListData(); PopulateUsers(false, false); }
private void RefreshSponsors() { lvSponsors.Items.Clear(); IQuery q = m_session.CreateQuery("FROM Sponsor"); m_sponsors = q.List <Sponsor>(); bool colorizer = false; foreach (Sponsor sponsor in m_sponsors) { ListViewItem lvi = new ListViewItem(sponsor.Name); lvi.SubItems.Add(sponsor.Slogan); lvi.Tag = sponsor; if (colorizer == false) { lvi.BackColor = Color.Orange; } else { lvi.BackColor = Color.Moccasin; } colorizer = !colorizer; lvSponsors.Items.Add(lvi); } ListView.ColumnHeaderCollection lch = lvSponsors.Columns; for (int i = 0; i < lch.Count; i++) { lch[i].Width = -1; int dataSize = lch[i].Width; lch[i].Width = -2; int colSize = lch[i].Width; lch[i].Width = dataSize > colSize ? -1 : -2; } }
public ConnectionsView(Controller controller) { Controller = controller; listView = new ListViewDoubleBuffered() { Dock = DockStyle.Fill, View = View.Details, FullRowSelect = true, ShowItemToolTips = true, BorderStyle = BorderStyle.None }; this.Controls.Add(listView); ListView.ColumnHeaderCollection col = listView.Columns; col.Add("#", 50); col.Add("Time", 40); col.Add("Creator", 70); col.Add("Dest", 150); col.Add("Speed", 60); col.Add("Handler", 70); col.Add("Handler Stream", 220); col.Add("Sniffer", 60); MenuItem menuCloseConnections; listView.ContextMenu = new ContextMenu(new MenuItem[] { menuCloseConnections = new MenuItem("Close selected connections", (s, e) => { foreach (ListViewItem vItem in listView.SelectedItems) { var item = vItem.Tag as Item; item.conn.Stop(); } }) }); listView.ContextMenu.Popup += (s, e) => { menuCloseConnections.Visible = listView.SelectedItems.Count > 0; }; }
// Next method works with OpenXML public static void OLD_ExportToExcel(string ReportName, string feuille, string output, ObjectListView List) { FileInfo newFile = new FileInfo(output); ListView.ColumnHeaderCollection properties = null; int CurrentRow = 1; int CurrentCol = 1; if (List != null && List.Items.Count >= 1) { properties = (List.Columns); } using (XLWorkbook excelToExport = new XLWorkbook(newFile.FullName)) { // Delete the worksheet we are going to create excelToExport.Worksheets.Delete(feuille); // Create worksheet IXLWorksheet worksheet = excelToExport.Worksheets.Add(feuille); // Set Style for Report Title using (var titleRange = worksheet.Range(CurrentRow, 1, CurrentRow, properties.Count)) { titleRange.Merge(); var rangeStyle = titleRange.Style; rangeStyle.Font.FontName = "Britannic Bold"; rangeStyle.Font.FontSize = 22; rangeStyle.Font.Italic = true; rangeStyle.Font.FontColor = XLColor.White; rangeStyle.Alignment.Horizontal = XLAlignmentHorizontalValues.CenterContinuous; rangeStyle.Fill.PatternType = XLFillPatternValues.Solid; rangeStyle.Fill.BackgroundColor = XLColor.FromArgb(23, 55, 93); } // Set Report Title worksheet.Cell(CurrentRow, 1).Value = ReportName; // Fill next row = Header CurrentRow++; // Set Style for Report Header row using (var headerRange = worksheet.Range(CurrentRow, 1, CurrentRow, properties.Count)) { var rangeStyle = headerRange.Style; rangeStyle.Font.Bold = true; rangeStyle.Font.FontColor = XLColor.White; rangeStyle.Fill.PatternType = XLFillPatternValues.Solid; rangeStyle.Fill.BackgroundColor = XLColor.DarkBlue; } // Set Column titles foreach (OLVColumn p in properties) { worksheet.Cell(CurrentRow, CurrentCol).Value = p.Text; CurrentCol++; } // Fill data rows CurrentRow++; foreach (ListViewItem o in List.Items) { CurrentCol = 1; foreach (OLVColumn p in properties) { worksheet.Cell(CurrentRow, CurrentCol).Value = o.SubItems[CurrentCol - 1].Text; CurrentCol++; } CurrentRow++; } // Resize columns to fit contents worksheet.Columns(1, properties.Count).AdjustToContents(2); // Save Workbook excelToExport.Save(); } }
public static void ExportToExcel(string ReportName, string feuille, string output, ObjectListView List, ObjectListView FooterList = null, double fontSize = 22, bool UseBackColor = false) { ListView.ColumnHeaderCollection properties = null; int CurrentRow = 1; int CurrentCol = 1; if (List != null && List.Items.Count >= 1) { properties = (List.Columns); } var workbook = new XLWorkbook(); var worksheet = workbook.Worksheets.Add(feuille); using (workbook) { // Set Style for Report Title using (var titleRange = worksheet.Range(CurrentRow, 1, CurrentRow, properties.Count)) { titleRange.Merge(); var rangeStyle = titleRange.Style; rangeStyle.Font.FontName = "Britannic Bold"; rangeStyle.Font.FontSize = fontSize; rangeStyle.Font.Italic = true; rangeStyle.Font.FontColor = XLColor.White; rangeStyle.Alignment.Horizontal = XLAlignmentHorizontalValues.CenterContinuous; rangeStyle.Alignment.Vertical = XLAlignmentVerticalValues.Center; rangeStyle.Alignment.WrapText = true; rangeStyle.Fill.PatternType = XLFillPatternValues.Solid; rangeStyle.Fill.BackgroundColor = XLColor.FromArgb(23, 55, 93); } // Set Report Title worksheet.Cell(CurrentRow, 1).Value = ReportName; worksheet.Rows(CurrentRow, 1).Height = 75; // Fill next row = Header CurrentRow++; // Set Style for Report Header row using (var headerRange = worksheet.Range(CurrentRow, 1, CurrentRow, properties.Count)) { var rangeStyle = headerRange.Style; rangeStyle.Font.Bold = true; rangeStyle.Font.FontColor = XLColor.White; rangeStyle.Fill.PatternType = XLFillPatternValues.Solid; rangeStyle.Fill.BackgroundColor = XLColor.DarkBlue; } // Set Column titles foreach (OLVColumn p in properties) { worksheet.Cell(CurrentRow, CurrentCol).Value = p.Text; CurrentCol++; } // Fill data rows CurrentRow++; foreach (ListViewItem o in List.Items) { CurrentCol = 1; foreach (OLVColumn p in properties) { worksheet.Cell(CurrentRow, CurrentCol).Value = o.SubItems[CurrentCol - 1].Text; if (UseBackColor) { worksheet.Cell(CurrentRow, CurrentCol).AsRange().Style.Fill.BackgroundColor = XLColor.FromColor(o.SubItems[CurrentCol - 1].BackColor); } CurrentCol++; } CurrentRow++; } if (FooterList != null) { // Fill footer data rows CurrentRow++; foreach (ListViewItem o in FooterList.Items) { CurrentCol = 1; foreach (OLVColumn p in properties) { worksheet.Cell(CurrentRow, CurrentCol).Value = o.SubItems[CurrentCol - 1].Text; CurrentCol++; } CurrentRow++; } } // Resize columns to fit contents worksheet.Columns(1, properties.Count).AdjustToContents(2); // Save Workbook workbook.SaveAs(output); } }
private void InitializeComponent() { this.CloseBtn = new Button(); this.CombatantList = new ListView(); this.CombatantHdr = new ColumnHeader(); this.InitHdr = new ColumnHeader(); this.HPPanel = new Panel(); this.FullHealBtn = new Button(); this.HeroNameLbl = new Label(); this.MaxHPBox = new NumericUpDown(); this.MaxHPLbl = new Label(); this.HPGauge = new HitPointGauge(); this.TempHPBox = new NumericUpDown(); this.TempHPLbl = new Label(); this.CurrentHPBox = new NumericUpDown(); this.CurrentHPLbl = new Label(); this.HPPanel.SuspendLayout(); ((ISupportInitialize)this.MaxHPBox).BeginInit(); ((ISupportInitialize)this.TempHPBox).BeginInit(); ((ISupportInitialize)this.CurrentHPBox).BeginInit(); base.SuspendLayout(); this.CloseBtn.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; this.CloseBtn.DialogResult = System.Windows.Forms.DialogResult.OK; this.CloseBtn.Location = new Point(378, 220); this.CloseBtn.Name = "CloseBtn"; this.CloseBtn.Size = new System.Drawing.Size(75, 23); this.CloseBtn.TabIndex = 2; this.CloseBtn.Text = "OK"; this.CloseBtn.UseVisualStyleBackColor = true; this.CombatantList.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; ListView.ColumnHeaderCollection columns = this.CombatantList.Columns; ColumnHeader[] combatantHdr = new ColumnHeader[] { this.CombatantHdr, this.InitHdr }; columns.AddRange(combatantHdr); this.CombatantList.FullRowSelect = true; this.CombatantList.HideSelection = false; this.CombatantList.Location = new Point(12, 12); this.CombatantList.MultiSelect = false; this.CombatantList.Name = "CombatantList"; this.CombatantList.Size = new System.Drawing.Size(238, 202); this.CombatantList.TabIndex = 1; this.CombatantList.UseCompatibleStateImageBehavior = false; this.CombatantList.View = View.Details; this.CombatantList.SelectedIndexChanged += new EventHandler(this.CombatantList_SelectedIndexChanged); this.CombatantList.DoubleClick += new EventHandler(this.CombatantList_DoubleClick); this.CombatantHdr.Text = "PC"; this.CombatantHdr.Width = 131; this.InitHdr.Text = "Hit Points"; this.InitHdr.TextAlign = HorizontalAlignment.Right; this.InitHdr.Width = 76; this.HPPanel.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right; this.HPPanel.BorderStyle = BorderStyle.FixedSingle; this.HPPanel.Controls.Add(this.FullHealBtn); this.HPPanel.Controls.Add(this.HeroNameLbl); this.HPPanel.Controls.Add(this.MaxHPBox); this.HPPanel.Controls.Add(this.MaxHPLbl); this.HPPanel.Controls.Add(this.HPGauge); this.HPPanel.Controls.Add(this.TempHPBox); this.HPPanel.Controls.Add(this.TempHPLbl); this.HPPanel.Controls.Add(this.CurrentHPBox); this.HPPanel.Controls.Add(this.CurrentHPLbl); this.HPPanel.Location = new Point(256, 12); this.HPPanel.Name = "HPPanel"; this.HPPanel.Size = new System.Drawing.Size(197, 202); this.HPPanel.TabIndex = 3; this.FullHealBtn.Location = new Point(6, 135); this.FullHealBtn.Name = "FullHealBtn"; this.FullHealBtn.Size = new System.Drawing.Size(148, 23); this.FullHealBtn.TabIndex = 16; this.FullHealBtn.Text = "Full Heal"; this.FullHealBtn.UseVisualStyleBackColor = true; this.FullHealBtn.Click += new EventHandler(this.FullHealBtn_Click); this.HeroNameLbl.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25f, FontStyle.Bold, GraphicsUnit.Point, 0); this.HeroNameLbl.Location = new Point(3, 3); this.HeroNameLbl.Name = "HeroNameLbl"; this.HeroNameLbl.Size = new System.Drawing.Size(151, 40); this.HeroNameLbl.TabIndex = 15; this.HeroNameLbl.Text = "[hero]"; this.HeroNameLbl.TextAlign = ContentAlignment.MiddleCenter; this.MaxHPBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; this.MaxHPBox.Location = new Point(76, 57); NumericUpDown maxHPBox = this.MaxHPBox; int[] numArray = new int[] { 1000, 0, 0, 0 }; maxHPBox.Maximum = new decimal(numArray); NumericUpDown num = this.MaxHPBox; int[] numArray1 = new int[] { 1, 0, 0, 0 }; num.Minimum = new decimal(numArray1); this.MaxHPBox.Name = "MaxHPBox"; this.MaxHPBox.Size = new System.Drawing.Size(78, 20); this.MaxHPBox.TabIndex = 9; NumericUpDown numericUpDown = this.MaxHPBox; int[] numArray2 = new int[] { 1, 0, 0, 0 }; numericUpDown.Value = new decimal(numArray2); this.MaxHPBox.ValueChanged += new EventHandler(this.MaxHPBox_ValueChanged); this.MaxHPLbl.AutoSize = true; this.MaxHPLbl.Location = new Point(3, 59); this.MaxHPLbl.Name = "MaxHPLbl"; this.MaxHPLbl.Size = new System.Drawing.Size(48, 13); this.MaxHPLbl.TabIndex = 8; this.MaxHPLbl.Text = "Max HP:"; this.HPGauge.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right; this.HPGauge.Damage = 0; this.HPGauge.FullHP = 0; this.HPGauge.Location = new Point(160, 3); this.HPGauge.Name = "HPGauge"; this.HPGauge.Size = new System.Drawing.Size(32, 194); this.HPGauge.TabIndex = 14; this.HPGauge.TempHP = 0; this.TempHPBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; this.TempHPBox.Location = new Point(76, 109); NumericUpDown tempHPBox = this.TempHPBox; int[] numArray3 = new int[] { 1000, 0, 0, 0 }; tempHPBox.Maximum = new decimal(numArray3); this.TempHPBox.Name = "TempHPBox"; this.TempHPBox.Size = new System.Drawing.Size(78, 20); this.TempHPBox.TabIndex = 13; this.TempHPBox.ValueChanged += new EventHandler(this.TempHPBox_ValueChanged); this.TempHPLbl.AutoSize = true; this.TempHPLbl.Location = new Point(3, 111); this.TempHPLbl.Name = "TempHPLbl"; this.TempHPLbl.Size = new System.Drawing.Size(55, 13); this.TempHPLbl.TabIndex = 12; this.TempHPLbl.Text = "Temp HP:"; this.CurrentHPBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; this.CurrentHPBox.Location = new Point(76, 83); NumericUpDown currentHPBox = this.CurrentHPBox; int[] numArray4 = new int[] { 1000, 0, 0, 0 }; currentHPBox.Maximum = new decimal(numArray4); NumericUpDown currentHPBox1 = this.CurrentHPBox; int[] numArray5 = new int[] { 1000, 0, 0, -2147483648 }; currentHPBox1.Minimum = new decimal(numArray5); this.CurrentHPBox.Name = "CurrentHPBox"; this.CurrentHPBox.Size = new System.Drawing.Size(78, 20); this.CurrentHPBox.TabIndex = 11; this.CurrentHPBox.ValueChanged += new EventHandler(this.CurrentHPBox_ValueChanged); this.CurrentHPLbl.AutoSize = true; this.CurrentHPLbl.Location = new Point(3, 85); this.CurrentHPLbl.Name = "CurrentHPLbl"; this.CurrentHPLbl.Size = new System.Drawing.Size(62, 13); this.CurrentHPLbl.TabIndex = 10; this.CurrentHPLbl.Text = "Current HP:"; base.AcceptButton = this.CloseBtn; base.AutoScaleDimensions = new SizeF(6f, 13f); base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; base.ClientSize = new System.Drawing.Size(465, 255); base.Controls.Add(this.HPPanel); base.Controls.Add(this.CombatantList); base.Controls.Add(this.CloseBtn); base.MaximizeBox = false; base.MinimizeBox = false; base.Name = "GroupHealthForm"; base.ShowIcon = false; base.ShowInTaskbar = false; base.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; base.StartPosition = FormStartPosition.CenterParent; this.Text = "PC Hit Points"; this.HPPanel.ResumeLayout(false); this.HPPanel.PerformLayout(); ((ISupportInitialize)this.MaxHPBox).EndInit(); ((ISupportInitialize)this.TempHPBox).EndInit(); ((ISupportInitialize)this.CurrentHPBox).EndInit(); base.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { //components = new System.ComponentModel.Container(); //this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Toolbar = new ToolStrip(); this.EditBtn = new ToolStripButton(); this.RunBtn = new ToolStripButton(); this.toolStripSeparator2 = new ToolStripSeparator(); this.XPLbl = new ToolStripLabel(); this.DiffLbl = new ToolStripLabel(); this.ItemList = new ListView(); this.CreatureHdr = new ColumnHeader(); this.CountHdr = new ColumnHeader(); this.RoleHdr = new ColumnHeader(); this.XPHdr = new ColumnHeader(); this.Toolbar.SuspendLayout(); base.SuspendLayout(); ToolStripItemCollection items = this.Toolbar.Items; ToolStripItem[] editBtn = new ToolStripItem[] { this.EditBtn, this.RunBtn, this.toolStripSeparator2, this.XPLbl, this.DiffLbl }; items.AddRange(editBtn); this.Toolbar.Location = new Point(0, 0); this.Toolbar.Name = "Toolbar"; this.Toolbar.Size = new System.Drawing.Size(435, 25); this.Toolbar.TabIndex = 0; this.Toolbar.Text = "toolStrip1"; this.EditBtn.DisplayStyle = ToolStripItemDisplayStyle.Text; this.EditBtn.ImageTransparentColor = Color.Magenta; this.EditBtn.Name = "EditBtn"; this.EditBtn.Size = new System.Drawing.Size(105, 22); this.EditBtn.Text = "Encounter Builder"; this.EditBtn.Click += new EventHandler(this.EditBtn_Click); this.RunBtn.DisplayStyle = ToolStripItemDisplayStyle.Text; this.RunBtn.ImageTransparentColor = Color.Magenta; this.RunBtn.Name = "RunBtn"; this.RunBtn.Size = new System.Drawing.Size(89, 22); this.RunBtn.Text = "Run Encounter"; this.RunBtn.Click += new EventHandler(this.RunBtn_Click); this.toolStripSeparator2.Name = "toolStripSeparator2"; this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25); this.XPLbl.Name = "XPLbl"; this.XPLbl.Size = new System.Drawing.Size(78, 22); this.XPLbl.Text = "[N XP (CL N)]"; this.DiffLbl.Name = "DiffLbl"; this.DiffLbl.Size = new System.Drawing.Size(62, 22); this.DiffLbl.Text = "[difficulty]"; ListView.ColumnHeaderCollection columns = this.ItemList.Columns; ColumnHeader[] creatureHdr = new ColumnHeader[] { this.CreatureHdr, this.RoleHdr, this.CountHdr, this.XPHdr }; columns.AddRange(creatureHdr); this.ItemList.Dock = DockStyle.Fill; this.ItemList.FullRowSelect = true; this.ItemList.HeaderStyle = ColumnHeaderStyle.Nonclickable; this.ItemList.HideSelection = false; this.ItemList.Location = new Point(0, 25); this.ItemList.MultiSelect = false; this.ItemList.Name = "ItemList"; this.ItemList.Size = new System.Drawing.Size(435, 181); this.ItemList.TabIndex = 1; this.ItemList.UseCompatibleStateImageBehavior = false; this.ItemList.View = View.Details; this.ItemList.DoubleClick += new EventHandler(this.CreatureList_DoubleClick); this.CreatureHdr.Text = "Creature"; this.CreatureHdr.Width = 150; this.CountHdr.Text = "Count"; this.CountHdr.TextAlign = HorizontalAlignment.Right; this.RoleHdr.Text = "Role"; this.RoleHdr.Width = 150; this.XPHdr.Text = "XP"; this.XPHdr.TextAlign = HorizontalAlignment.Right; base.AutoScaleDimensions = new SizeF(6f, 13f); base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; base.Controls.Add(this.ItemList); base.Controls.Add(this.Toolbar); base.Name = "EncounterPanel"; base.Size = new System.Drawing.Size(435, 206); this.Toolbar.ResumeLayout(false); this.Toolbar.PerformLayout(); base.ResumeLayout(false); base.PerformLayout(); }
private void InitializeComponent() { ListViewGroup listViewGroup = new ListViewGroup("Ended effects", HorizontalAlignment.Left); ListViewGroup listViewGroup1 = new ListViewGroup("These effects will not be ended this turn", HorizontalAlignment.Left); ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(EndedEffectsForm)); this.OKBtn = new Button(); this.label1 = new Label(); this.EffectPanel = new Panel(); this.EffectList = new ListView(); this.CreatureHdr = new ColumnHeader(); this.EffectHdr = new ColumnHeader(); this.Toolbar = new ToolStrip(); this.ExtendBtn = new ToolStripButton(); this.CancelBtn = new Button(); this.EffectPanel.SuspendLayout(); this.Toolbar.SuspendLayout(); base.SuspendLayout(); this.OKBtn.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; this.OKBtn.DialogResult = System.Windows.Forms.DialogResult.OK; this.OKBtn.Location = new Point(360, 261); this.OKBtn.Name = "OKBtn"; this.OKBtn.Size = new System.Drawing.Size(75, 23); this.OKBtn.TabIndex = 8; this.OKBtn.Text = "OK"; this.OKBtn.UseVisualStyleBackColor = true; this.OKBtn.Click += new EventHandler(this.OKBtn_Click); this.label1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; this.label1.Location = new Point(12, 9); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(504, 33); this.label1.TabIndex = 9; this.label1.Text = "The following ongoing effects are due to end now. If you want to extend one for another turn, select it and press the Extend button."; this.EffectPanel.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; this.EffectPanel.Controls.Add(this.EffectList); this.EffectPanel.Controls.Add(this.Toolbar); this.EffectPanel.Location = new Point(12, 45); this.EffectPanel.Name = "EffectPanel"; this.EffectPanel.Size = new System.Drawing.Size(504, 210); this.EffectPanel.TabIndex = 10; ListView.ColumnHeaderCollection columns = this.EffectList.Columns; ColumnHeader[] creatureHdr = new ColumnHeader[] { this.CreatureHdr, this.EffectHdr }; columns.AddRange(creatureHdr); this.EffectList.Dock = DockStyle.Fill; this.EffectList.FullRowSelect = true; listViewGroup.Header = "Ended effects"; listViewGroup.Name = "listViewGroup1"; listViewGroup1.Header = "These effects will not be ended this turn"; listViewGroup1.Name = "listViewGroup2"; this.EffectList.Groups.AddRange(new ListViewGroup[] { listViewGroup, listViewGroup1 }); this.EffectList.HeaderStyle = ColumnHeaderStyle.Nonclickable; this.EffectList.HideSelection = false; this.EffectList.Location = new Point(0, 25); this.EffectList.MultiSelect = false; this.EffectList.Name = "EffectList"; this.EffectList.Size = new System.Drawing.Size(504, 185); this.EffectList.TabIndex = 1; this.EffectList.UseCompatibleStateImageBehavior = false; this.EffectList.View = View.Details; this.CreatureHdr.Text = "Affected Creature"; this.CreatureHdr.Width = 150; this.EffectHdr.Text = "Effect"; this.EffectHdr.Width = 323; this.Toolbar.Items.AddRange(new ToolStripItem[] { this.ExtendBtn }); this.Toolbar.Location = new Point(0, 0); this.Toolbar.Name = "Toolbar"; this.Toolbar.Size = new System.Drawing.Size(504, 25); this.Toolbar.TabIndex = 0; this.Toolbar.Text = "toolStrip1"; this.ExtendBtn.DisplayStyle = ToolStripItemDisplayStyle.Text; this.ExtendBtn.Image = (Image)componentResourceManager.GetObject("ExtendBtn.Image"); this.ExtendBtn.ImageTransparentColor = Color.Magenta; this.ExtendBtn.Name = "ExtendBtn"; this.ExtendBtn.Size = new System.Drawing.Size(101, 22); this.ExtendBtn.Text = "Extend this effect"; this.ExtendBtn.Click += new EventHandler(this.ExtendBtn_Click); this.CancelBtn.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; this.CancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.CancelBtn.Location = new Point(441, 261); this.CancelBtn.Name = "CancelBtn"; this.CancelBtn.Size = new System.Drawing.Size(75, 23); this.CancelBtn.TabIndex = 11; this.CancelBtn.Text = "Cancel"; this.CancelBtn.UseVisualStyleBackColor = true; base.AcceptButton = this.OKBtn; base.AutoScaleDimensions = new SizeF(6f, 13f); base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; base.CancelButton = this.CancelBtn; base.ClientSize = new System.Drawing.Size(528, 296); base.Controls.Add(this.CancelBtn); base.Controls.Add(this.EffectPanel); base.Controls.Add(this.label1); base.Controls.Add(this.OKBtn); base.MaximizeBox = false; base.MinimizeBox = false; base.Name = "EndedEffectsForm"; base.ShowIcon = false; base.ShowInTaskbar = false; base.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; base.StartPosition = FormStartPosition.CenterParent; this.Text = "Ended Effects"; this.EffectPanel.ResumeLayout(false); this.EffectPanel.PerformLayout(); this.Toolbar.ResumeLayout(false); this.Toolbar.PerformLayout(); base.ResumeLayout(false); }
private void InitializeComponent() { ListViewGroup listViewGroup = new ListViewGroup("Initiative", HorizontalAlignment.Left); ListViewGroup listViewGroup1 = new ListViewGroup("Attack Bonus", HorizontalAlignment.Left); this.CancelBtn = new Button(); this.OKBtn = new Button(); this.ActionLbl = new Label(); this.ActionBox = new ComboBox(); this.RangeLbl = new Label(); this.RangeBox = new TextBox(); this.TargetLbl = new Label(); this.TargetBox = new TextBox(); this.InitBox = new NumericUpDown(); this.AttackLbl = new Label(); this.AttackBtn = new Button(); this.Pages = new TabControl(); this.StatsPage = new TabPage(); this.InitBtn = new CheckBox(); this.TriggerPage = new TabPage(); this.TriggerBox = new TextBox(); this.HitPage = new TabPage(); this.HitBox = new TextBox(); this.MissPage = new TabPage(); this.MissBox = new TextBox(); this.EffectPage = new TabPage(); this.EffectBox = new TextBox(); this.AdvicePage = new TabPage(); this.AdviceList = new ListView(); this.AdviceHdr = new ColumnHeader(); this.InfoHdr = new ColumnHeader(); ((ISupportInitialize)this.InitBox).BeginInit(); this.Pages.SuspendLayout(); this.StatsPage.SuspendLayout(); this.TriggerPage.SuspendLayout(); this.HitPage.SuspendLayout(); this.MissPage.SuspendLayout(); this.EffectPage.SuspendLayout(); this.AdvicePage.SuspendLayout(); base.SuspendLayout(); this.CancelBtn.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; this.CancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.CancelBtn.Location = new Point(254, 185); this.CancelBtn.Name = "CancelBtn"; this.CancelBtn.Size = new System.Drawing.Size(75, 23); this.CancelBtn.TabIndex = 14; this.CancelBtn.Text = "Cancel"; this.CancelBtn.UseVisualStyleBackColor = true; this.OKBtn.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; this.OKBtn.DialogResult = System.Windows.Forms.DialogResult.OK; this.OKBtn.Location = new Point(173, 185); this.OKBtn.Name = "OKBtn"; this.OKBtn.Size = new System.Drawing.Size(75, 23); this.OKBtn.TabIndex = 13; this.OKBtn.Text = "OK"; this.OKBtn.UseVisualStyleBackColor = true; this.OKBtn.Click += new EventHandler(this.OKBtn_Click); this.ActionLbl.AutoSize = true; this.ActionLbl.Location = new Point(6, 9); this.ActionLbl.Name = "ActionLbl"; this.ActionLbl.Size = new System.Drawing.Size(40, 13); this.ActionLbl.TabIndex = 2; this.ActionLbl.Text = "Action:"; this.ActionBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; this.ActionBox.DropDownStyle = ComboBoxStyle.DropDownList; this.ActionBox.FormattingEnabled = true; this.ActionBox.Location = new Point(80, 6); this.ActionBox.Name = "ActionBox"; this.ActionBox.Size = new System.Drawing.Size(223, 21); this.ActionBox.TabIndex = 3; this.RangeLbl.AutoSize = true; this.RangeLbl.Location = new Point(6, 36); this.RangeLbl.Name = "RangeLbl"; this.RangeLbl.Size = new System.Drawing.Size(42, 13); this.RangeLbl.TabIndex = 4; this.RangeLbl.Text = "Range:"; this.RangeBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; this.RangeBox.Location = new Point(80, 33); this.RangeBox.Name = "RangeBox"; this.RangeBox.Size = new System.Drawing.Size(223, 20); this.RangeBox.TabIndex = 5; this.TargetLbl.AutoSize = true; this.TargetLbl.Location = new Point(6, 62); this.TargetLbl.Name = "TargetLbl"; this.TargetLbl.Size = new System.Drawing.Size(41, 13); this.TargetLbl.TabIndex = 6; this.TargetLbl.Text = "Target:"; this.TargetBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; this.TargetBox.Location = new Point(80, 59); this.TargetBox.Name = "TargetBox"; this.TargetBox.Size = new System.Drawing.Size(223, 20); this.TargetBox.TabIndex = 7; this.InitBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; this.InitBox.Location = new Point(80, 85); this.InitBox.Name = "InitBox"; this.InitBox.Size = new System.Drawing.Size(223, 20); this.InitBox.TabIndex = 9; this.AttackLbl.AutoSize = true; this.AttackLbl.Location = new Point(6, 116); this.AttackLbl.Name = "AttackLbl"; this.AttackLbl.Size = new System.Drawing.Size(41, 13); this.AttackLbl.TabIndex = 10; this.AttackLbl.Text = "Attack:"; this.AttackBtn.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; this.AttackBtn.Location = new Point(80, 111); this.AttackBtn.Name = "AttackBtn"; this.AttackBtn.Size = new System.Drawing.Size(223, 23); this.AttackBtn.TabIndex = 11; this.AttackBtn.Text = "[attack]"; this.AttackBtn.UseVisualStyleBackColor = true; this.AttackBtn.Click += new EventHandler(this.AttackBtn_Click); this.Pages.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; this.Pages.Controls.Add(this.StatsPage); this.Pages.Controls.Add(this.TriggerPage); this.Pages.Controls.Add(this.HitPage); this.Pages.Controls.Add(this.MissPage); this.Pages.Controls.Add(this.EffectPage); this.Pages.Controls.Add(this.AdvicePage); this.Pages.Location = new Point(12, 12); this.Pages.Name = "Pages"; this.Pages.SelectedIndex = 0; this.Pages.Size = new System.Drawing.Size(317, 167); this.Pages.TabIndex = 12; this.StatsPage.Controls.Add(this.ActionBox); this.StatsPage.Controls.Add(this.AttackBtn); this.StatsPage.Controls.Add(this.ActionLbl); this.StatsPage.Controls.Add(this.AttackLbl); this.StatsPage.Controls.Add(this.RangeLbl); this.StatsPage.Controls.Add(this.InitBox); this.StatsPage.Controls.Add(this.RangeBox); this.StatsPage.Controls.Add(this.InitBtn); this.StatsPage.Controls.Add(this.TargetLbl); this.StatsPage.Controls.Add(this.TargetBox); this.StatsPage.Location = new Point(4, 22); this.StatsPage.Name = "StatsPage"; this.StatsPage.Padding = new System.Windows.Forms.Padding(3); this.StatsPage.Size = new System.Drawing.Size(309, 141); this.StatsPage.TabIndex = 4; this.StatsPage.Text = "Statistics"; this.StatsPage.UseVisualStyleBackColor = true; this.InitBtn.AutoSize = true; this.InitBtn.Location = new Point(6, 86); this.InitBtn.Name = "InitBtn"; this.InitBtn.Size = new System.Drawing.Size(68, 17); this.InitBtn.TabIndex = 8; this.InitBtn.Text = "Initiative:"; this.InitBtn.UseVisualStyleBackColor = true; this.TriggerPage.Controls.Add(this.TriggerBox); this.TriggerPage.Location = new Point(4, 22); this.TriggerPage.Name = "TriggerPage"; this.TriggerPage.Padding = new System.Windows.Forms.Padding(3); this.TriggerPage.Size = new System.Drawing.Size(309, 141); this.TriggerPage.TabIndex = 2; this.TriggerPage.Text = "Trigger"; this.TriggerPage.UseVisualStyleBackColor = true; this.TriggerBox.AcceptsReturn = true; this.TriggerBox.AcceptsTab = true; this.TriggerBox.Dock = DockStyle.Fill; this.TriggerBox.Location = new Point(3, 3); this.TriggerBox.Multiline = true; this.TriggerBox.Name = "TriggerBox"; this.TriggerBox.ScrollBars = ScrollBars.Vertical; this.TriggerBox.Size = new System.Drawing.Size(303, 135); this.TriggerBox.TabIndex = 0; this.HitPage.Controls.Add(this.HitBox); this.HitPage.Location = new Point(4, 22); this.HitPage.Name = "HitPage"; this.HitPage.Padding = new System.Windows.Forms.Padding(3); this.HitPage.Size = new System.Drawing.Size(309, 141); this.HitPage.TabIndex = 0; this.HitPage.Text = "On Hit"; this.HitPage.UseVisualStyleBackColor = true; this.HitBox.AcceptsReturn = true; this.HitBox.AcceptsTab = true; this.HitBox.Dock = DockStyle.Fill; this.HitBox.Location = new Point(3, 3); this.HitBox.Multiline = true; this.HitBox.Name = "HitBox"; this.HitBox.ScrollBars = ScrollBars.Vertical; this.HitBox.Size = new System.Drawing.Size(303, 135); this.HitBox.TabIndex = 0; this.MissPage.Controls.Add(this.MissBox); this.MissPage.Location = new Point(4, 22); this.MissPage.Name = "MissPage"; this.MissPage.Padding = new System.Windows.Forms.Padding(3); this.MissPage.Size = new System.Drawing.Size(309, 141); this.MissPage.TabIndex = 1; this.MissPage.Text = "On Miss"; this.MissPage.UseVisualStyleBackColor = true; this.MissBox.AcceptsReturn = true; this.MissBox.AcceptsTab = true; this.MissBox.Dock = DockStyle.Fill; this.MissBox.Location = new Point(3, 3); this.MissBox.Multiline = true; this.MissBox.Name = "MissBox"; this.MissBox.ScrollBars = ScrollBars.Vertical; this.MissBox.Size = new System.Drawing.Size(303, 135); this.MissBox.TabIndex = 1; this.EffectPage.Controls.Add(this.EffectBox); this.EffectPage.Location = new Point(4, 22); this.EffectPage.Name = "EffectPage"; this.EffectPage.Padding = new System.Windows.Forms.Padding(3); this.EffectPage.Size = new System.Drawing.Size(309, 141); this.EffectPage.TabIndex = 3; this.EffectPage.Text = "Effect"; this.EffectPage.UseVisualStyleBackColor = true; this.EffectBox.AcceptsReturn = true; this.EffectBox.AcceptsTab = true; this.EffectBox.Dock = DockStyle.Fill; this.EffectBox.Location = new Point(3, 3); this.EffectBox.Multiline = true; this.EffectBox.Name = "EffectBox"; this.EffectBox.ScrollBars = ScrollBars.Vertical; this.EffectBox.Size = new System.Drawing.Size(303, 135); this.EffectBox.TabIndex = 2; this.AdvicePage.Controls.Add(this.AdviceList); this.AdvicePage.Location = new Point(4, 22); this.AdvicePage.Name = "AdvicePage"; this.AdvicePage.Padding = new System.Windows.Forms.Padding(3); this.AdvicePage.Size = new System.Drawing.Size(309, 141); this.AdvicePage.TabIndex = 5; this.AdvicePage.Text = "Advice"; this.AdvicePage.UseVisualStyleBackColor = true; ListView.ColumnHeaderCollection columns = this.AdviceList.Columns; ColumnHeader[] adviceHdr = new ColumnHeader[] { this.AdviceHdr, this.InfoHdr }; columns.AddRange(adviceHdr); this.AdviceList.Dock = DockStyle.Fill; this.AdviceList.FullRowSelect = true; listViewGroup.Header = "Initiative"; listViewGroup.Name = "listViewGroup1"; listViewGroup1.Header = "Attack Bonus"; listViewGroup1.Name = "listViewGroup2"; this.AdviceList.Groups.AddRange(new ListViewGroup[] { listViewGroup, listViewGroup1 }); this.AdviceList.HeaderStyle = ColumnHeaderStyle.None; this.AdviceList.HideSelection = false; this.AdviceList.Location = new Point(3, 3); this.AdviceList.MultiSelect = false; this.AdviceList.Name = "AdviceList"; this.AdviceList.Size = new System.Drawing.Size(303, 135); this.AdviceList.TabIndex = 1; this.AdviceList.UseCompatibleStateImageBehavior = false; this.AdviceList.View = View.Details; this.AdviceHdr.Text = "Advice"; this.AdviceHdr.Width = 150; this.InfoHdr.Text = "Information"; this.InfoHdr.Width = 100; base.AcceptButton = this.OKBtn; base.AutoScaleDimensions = new SizeF(6f, 13f); base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; base.CancelButton = this.CancelBtn; base.ClientSize = new System.Drawing.Size(341, 220); base.Controls.Add(this.Pages); base.Controls.Add(this.CancelBtn); base.Controls.Add(this.OKBtn); base.MaximizeBox = false; base.MinimizeBox = false; base.Name = "TrapAttackForm"; base.ShowIcon = false; base.ShowInTaskbar = false; base.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; base.StartPosition = FormStartPosition.CenterParent; this.Text = "Trap Attack"; ((ISupportInitialize)this.InitBox).EndInit(); this.Pages.ResumeLayout(false); this.StatsPage.ResumeLayout(false); this.StatsPage.PerformLayout(); this.TriggerPage.ResumeLayout(false); this.TriggerPage.PerformLayout(); this.HitPage.ResumeLayout(false); this.HitPage.PerformLayout(); this.MissPage.ResumeLayout(false); this.MissPage.PerformLayout(); this.EffectPage.ResumeLayout(false); this.EffectPage.PerformLayout(); this.AdvicePage.ResumeLayout(false); base.ResumeLayout(false); }
private void InitializeComponent() { ListViewGroup listViewGroup = new ListViewGroup("Ongoing Damage", HorizontalAlignment.Left); ListViewGroup listViewGroup1 = new ListViewGroup("Total Damage", HorizontalAlignment.Left); this.CancelBtn = new Button(); this.OKBtn = new Button(); this.ListPanel = new Panel(); this.DamageList = new ListView(); this.DamageHdr = new ColumnHeader(); this.ValueHdr = new ColumnHeader(); this.TakenHdr = new ColumnHeader(); this.InfoLbl = new Label(); this.ListPanel.SuspendLayout(); base.SuspendLayout(); this.CancelBtn.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; this.CancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.CancelBtn.Location = new Point(361, 242); this.CancelBtn.Name = "CancelBtn"; this.CancelBtn.Size = new System.Drawing.Size(75, 23); this.CancelBtn.TabIndex = 3; this.CancelBtn.Text = "Cancel"; this.CancelBtn.UseVisualStyleBackColor = true; this.OKBtn.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; this.OKBtn.DialogResult = System.Windows.Forms.DialogResult.OK; this.OKBtn.Location = new Point(280, 242); this.OKBtn.Name = "OKBtn"; this.OKBtn.Size = new System.Drawing.Size(75, 23); this.OKBtn.TabIndex = 2; this.OKBtn.Text = "OK"; this.OKBtn.UseVisualStyleBackColor = true; this.OKBtn.Click += new EventHandler(this.OKBtn_Click); this.ListPanel.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; this.ListPanel.Controls.Add(this.DamageList); this.ListPanel.Location = new Point(12, 38); this.ListPanel.Name = "ListPanel"; this.ListPanel.Size = new System.Drawing.Size(424, 198); this.ListPanel.TabIndex = 9; ListView.ColumnHeaderCollection columns = this.DamageList.Columns; ColumnHeader[] damageHdr = new ColumnHeader[] { this.DamageHdr, this.ValueHdr, this.TakenHdr }; columns.AddRange(damageHdr); this.DamageList.Dock = DockStyle.Fill; this.DamageList.FullRowSelect = true; listViewGroup.Header = "Ongoing Damage"; listViewGroup.Name = "DamageGrp"; listViewGroup1.Header = "Total Damage"; listViewGroup1.Name = "TotalGrp"; this.DamageList.Groups.AddRange(new ListViewGroup[] { listViewGroup, listViewGroup1 }); this.DamageList.HeaderStyle = ColumnHeaderStyle.Nonclickable; this.DamageList.HideSelection = false; this.DamageList.Location = new Point(0, 0); this.DamageList.MultiSelect = false; this.DamageList.Name = "DamageList"; this.DamageList.Size = new System.Drawing.Size(424, 198); this.DamageList.TabIndex = 1; this.DamageList.UseCompatibleStateImageBehavior = false; this.DamageList.View = View.Details; this.DamageHdr.Text = "Damage"; this.DamageHdr.Width = 229; this.ValueHdr.Text = "Modifier"; this.ValueHdr.Width = 100; this.TakenHdr.Text = "Taken"; this.TakenHdr.TextAlign = HorizontalAlignment.Right; this.InfoLbl.AutoSize = true; this.InfoLbl.Location = new Point(12, 9); this.InfoLbl.Name = "InfoLbl"; this.InfoLbl.Size = new System.Drawing.Size(319, 13); this.InfoLbl.TabIndex = 10; this.InfoLbl.Text = "The following ongoing damage will be applied when you press OK."; base.AcceptButton = this.OKBtn; base.AutoScaleDimensions = new SizeF(6f, 13f); base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; base.CancelButton = this.CancelBtn; base.ClientSize = new System.Drawing.Size(448, 277); base.Controls.Add(this.InfoLbl); base.Controls.Add(this.ListPanel); base.Controls.Add(this.CancelBtn); base.Controls.Add(this.OKBtn); base.MaximizeBox = false; base.MinimizeBox = false; base.Name = "OngoingDamageForm"; base.ShowIcon = false; base.ShowInTaskbar = false; base.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; base.StartPosition = FormStartPosition.CenterParent; this.Text = "Ongoing Damage"; this.ListPanel.ResumeLayout(false); base.ResumeLayout(false); base.PerformLayout(); }
private void InitializeComponent() { ListViewGroup listViewGroup = new ListViewGroup("Attack Advice", HorizontalAlignment.Left); ListViewGroup listViewGroup1 = new ListViewGroup("Damage Advice", HorizontalAlignment.Left); this.OKBtn = new Button(); this.CancelBtn = new Button(); this.NameLbl = new Label(); this.NameBox = new TextBox(); this.KeywordLbl = new Label(); this.KeywordBox = new TextBox(); this.ActionLbl = new Label(); this.ActionBtn = new Button(); this.ActionClearLbl = new LinkLabel(); this.AttackLbl = new Label(); this.AttackBtn = new Button(); this.AttackClearLbl = new LinkLabel(); this.RangeLbl = new Label(); this.RangeBox = new ComboBox(); this.Pages = new TabControl(); this.DetailsPage = new TabPage(); this.DetailsBox = new TextBox(); this.AdvicePage = new TabPage(); this.AdviceList = new ListView(); this.AdviceHdr = new ColumnHeader(); this.InfoHdr = new ColumnHeader(); this.ConditionBox = new TextBox(); this.ConditionLbl = new Label(); this.DescPage = new TabPage(); this.DescBox = new TextBox(); this.Pages.SuspendLayout(); this.DetailsPage.SuspendLayout(); this.AdvicePage.SuspendLayout(); this.DescPage.SuspendLayout(); base.SuspendLayout(); this.OKBtn.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; this.OKBtn.DialogResult = System.Windows.Forms.DialogResult.OK; this.OKBtn.Location = new Point(192, 326); this.OKBtn.Name = "OKBtn"; this.OKBtn.Size = new System.Drawing.Size(75, 23); this.OKBtn.TabIndex = 15; this.OKBtn.Text = "OK"; this.OKBtn.UseVisualStyleBackColor = true; this.OKBtn.Click += new EventHandler(this.OKBtn_Click); this.CancelBtn.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; this.CancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.CancelBtn.Location = new Point(273, 326); this.CancelBtn.Name = "CancelBtn"; this.CancelBtn.Size = new System.Drawing.Size(75, 23); this.CancelBtn.TabIndex = 16; this.CancelBtn.Text = "Cancel"; this.CancelBtn.UseVisualStyleBackColor = true; this.NameLbl.AutoSize = true; this.NameLbl.Location = new Point(12, 15); this.NameLbl.Name = "NameLbl"; this.NameLbl.Size = new System.Drawing.Size(38, 13); this.NameLbl.TabIndex = 0; this.NameLbl.Text = "Name:"; this.NameBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; this.NameBox.Location = new Point(94, 12); this.NameBox.Name = "NameBox"; this.NameBox.Size = new System.Drawing.Size(254, 20); this.NameBox.TabIndex = 1; this.KeywordLbl.AutoSize = true; this.KeywordLbl.Location = new Point(12, 41); this.KeywordLbl.Name = "KeywordLbl"; this.KeywordLbl.Size = new System.Drawing.Size(56, 13); this.KeywordLbl.TabIndex = 2; this.KeywordLbl.Text = "Keywords:"; this.KeywordBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; this.KeywordBox.Location = new Point(94, 38); this.KeywordBox.Name = "KeywordBox"; this.KeywordBox.Size = new System.Drawing.Size(254, 20); this.KeywordBox.TabIndex = 3; this.ActionLbl.AutoSize = true; this.ActionLbl.Location = new Point(12, 95); this.ActionLbl.Name = "ActionLbl"; this.ActionLbl.Size = new System.Drawing.Size(40, 13); this.ActionLbl.TabIndex = 6; this.ActionLbl.Text = "Action:"; this.ActionBtn.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; this.ActionBtn.Location = new Point(94, 90); this.ActionBtn.Name = "ActionBtn"; this.ActionBtn.Size = new System.Drawing.Size(217, 23); this.ActionBtn.TabIndex = 7; this.ActionBtn.Text = "[action]"; this.ActionBtn.UseVisualStyleBackColor = true; this.ActionBtn.Click += new EventHandler(this.ActionBtn_Click); this.ActionClearLbl.Anchor = AnchorStyles.Top | AnchorStyles.Right; this.ActionClearLbl.AutoSize = true; this.ActionClearLbl.Location = new Point(317, 95); this.ActionClearLbl.Name = "ActionClearLbl"; this.ActionClearLbl.Size = new System.Drawing.Size(31, 13); this.ActionClearLbl.TabIndex = 8; this.ActionClearLbl.TabStop = true; this.ActionClearLbl.Text = "Clear"; this.ActionClearLbl.LinkClicked += new LinkLabelLinkClickedEventHandler(this.ActionClearLbl_LinkClicked); this.AttackLbl.AutoSize = true; this.AttackLbl.Location = new Point(12, 124); this.AttackLbl.Name = "AttackLbl"; this.AttackLbl.Size = new System.Drawing.Size(41, 13); this.AttackLbl.TabIndex = 9; this.AttackLbl.Text = "Attack:"; this.AttackBtn.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; this.AttackBtn.Location = new Point(94, 119); this.AttackBtn.Name = "AttackBtn"; this.AttackBtn.Size = new System.Drawing.Size(217, 23); this.AttackBtn.TabIndex = 10; this.AttackBtn.Text = "[attack]"; this.AttackBtn.UseVisualStyleBackColor = true; this.AttackBtn.Click += new EventHandler(this.AttackBtn_Click); this.AttackClearLbl.Anchor = AnchorStyles.Top | AnchorStyles.Right; this.AttackClearLbl.AutoSize = true; this.AttackClearLbl.Location = new Point(317, 124); this.AttackClearLbl.Name = "AttackClearLbl"; this.AttackClearLbl.Size = new System.Drawing.Size(31, 13); this.AttackClearLbl.TabIndex = 11; this.AttackClearLbl.TabStop = true; this.AttackClearLbl.Text = "Clear"; this.AttackClearLbl.LinkClicked += new LinkLabelLinkClickedEventHandler(this.AttackClearLbl_LinkClicked); this.RangeLbl.AutoSize = true; this.RangeLbl.Location = new Point(12, 151); this.RangeLbl.Name = "RangeLbl"; this.RangeLbl.Size = new System.Drawing.Size(42, 13); this.RangeLbl.TabIndex = 12; this.RangeLbl.Text = "Range:"; this.RangeBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; this.RangeBox.AutoCompleteMode = AutoCompleteMode.Append; this.RangeBox.AutoCompleteSource = AutoCompleteSource.ListItems; this.RangeBox.FormattingEnabled = true; this.RangeBox.Location = new Point(94, 148); this.RangeBox.Name = "RangeBox"; this.RangeBox.Size = new System.Drawing.Size(254, 21); this.RangeBox.Sorted = true; this.RangeBox.TabIndex = 13; this.Pages.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; this.Pages.Controls.Add(this.DetailsPage); this.Pages.Controls.Add(this.DescPage); this.Pages.Controls.Add(this.AdvicePage); this.Pages.Location = new Point(12, 175); this.Pages.Name = "Pages"; this.Pages.SelectedIndex = 0; this.Pages.Size = new System.Drawing.Size(336, 145); this.Pages.TabIndex = 14; this.DetailsPage.Controls.Add(this.DetailsBox); this.DetailsPage.Location = new Point(4, 22); this.DetailsPage.Name = "DetailsPage"; this.DetailsPage.Padding = new System.Windows.Forms.Padding(3); this.DetailsPage.Size = new System.Drawing.Size(328, 119); this.DetailsPage.TabIndex = 0; this.DetailsPage.Text = "Details"; this.DetailsPage.UseVisualStyleBackColor = true; this.DetailsBox.AcceptsReturn = true; this.DetailsBox.Dock = DockStyle.Fill; this.DetailsBox.Location = new Point(3, 3); this.DetailsBox.Multiline = true; this.DetailsBox.Name = "DetailsBox"; this.DetailsBox.ScrollBars = ScrollBars.Vertical; this.DetailsBox.Size = new System.Drawing.Size(322, 113); this.DetailsBox.TabIndex = 0; this.AdvicePage.Controls.Add(this.AdviceList); this.AdvicePage.Location = new Point(4, 22); this.AdvicePage.Name = "AdvicePage"; this.AdvicePage.Padding = new System.Windows.Forms.Padding(3); this.AdvicePage.Size = new System.Drawing.Size(328, 119); this.AdvicePage.TabIndex = 1; this.AdvicePage.Text = "Advice"; this.AdvicePage.UseVisualStyleBackColor = true; ListView.ColumnHeaderCollection columns = this.AdviceList.Columns; ColumnHeader[] adviceHdr = new ColumnHeader[] { this.AdviceHdr, this.InfoHdr }; columns.AddRange(adviceHdr); this.AdviceList.Dock = DockStyle.Fill; this.AdviceList.FullRowSelect = true; listViewGroup.Header = "Attack Advice"; listViewGroup.Name = "AtkGrp"; listViewGroup1.Header = "Damage Advice"; listViewGroup1.Name = "DmgGrp"; this.AdviceList.Groups.AddRange(new ListViewGroup[] { listViewGroup, listViewGroup1 }); this.AdviceList.HeaderStyle = ColumnHeaderStyle.None; this.AdviceList.HideSelection = false; this.AdviceList.Location = new Point(3, 3); this.AdviceList.MultiSelect = false; this.AdviceList.Name = "AdviceList"; this.AdviceList.Size = new System.Drawing.Size(322, 113); this.AdviceList.TabIndex = 0; this.AdviceList.UseCompatibleStateImageBehavior = false; this.AdviceList.View = View.Details; this.AdviceHdr.Text = "Advice"; this.AdviceHdr.Width = 150; this.InfoHdr.Text = "Information"; this.InfoHdr.Width = 100; this.ConditionBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; this.ConditionBox.Location = new Point(94, 64); this.ConditionBox.Name = "ConditionBox"; this.ConditionBox.Size = new System.Drawing.Size(254, 20); this.ConditionBox.TabIndex = 5; this.ConditionLbl.AutoSize = true; this.ConditionLbl.Location = new Point(12, 67); this.ConditionLbl.Name = "ConditionLbl"; this.ConditionLbl.Size = new System.Drawing.Size(59, 13); this.ConditionLbl.TabIndex = 4; this.ConditionLbl.Text = "Conditions:"; this.DescPage.Controls.Add(this.DescBox); this.DescPage.Location = new Point(4, 22); this.DescPage.Name = "DescPage"; this.DescPage.Padding = new System.Windows.Forms.Padding(3); this.DescPage.Size = new System.Drawing.Size(328, 119); this.DescPage.TabIndex = 2; this.DescPage.Text = "Description"; this.DescPage.UseVisualStyleBackColor = true; this.DescBox.AcceptsReturn = true; this.DescBox.Dock = DockStyle.Fill; this.DescBox.Location = new Point(3, 3); this.DescBox.Multiline = true; this.DescBox.Name = "DescBox"; this.DescBox.ScrollBars = ScrollBars.Vertical; this.DescBox.Size = new System.Drawing.Size(322, 113); this.DescBox.TabIndex = 1; base.AcceptButton = this.OKBtn; base.AutoScaleDimensions = new SizeF(6f, 13f); base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; base.CancelButton = this.CancelBtn; base.ClientSize = new System.Drawing.Size(360, 361); base.Controls.Add(this.ConditionBox); base.Controls.Add(this.ConditionLbl); base.Controls.Add(this.Pages); base.Controls.Add(this.RangeBox); base.Controls.Add(this.RangeLbl); base.Controls.Add(this.AttackClearLbl); base.Controls.Add(this.AttackBtn); base.Controls.Add(this.AttackLbl); base.Controls.Add(this.ActionClearLbl); base.Controls.Add(this.ActionBtn); base.Controls.Add(this.ActionLbl); base.Controls.Add(this.KeywordBox); base.Controls.Add(this.KeywordLbl); base.Controls.Add(this.NameBox); base.Controls.Add(this.NameLbl); base.Controls.Add(this.CancelBtn); base.Controls.Add(this.OKBtn); base.MaximizeBox = false; base.MinimizeBox = false; base.Name = "PowerForm"; base.ShowIcon = false; base.ShowInTaskbar = false; base.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; base.StartPosition = FormStartPosition.CenterParent; this.Text = "Power"; this.Pages.ResumeLayout(false); this.DetailsPage.ResumeLayout(false); this.DetailsPage.PerformLayout(); this.AdvicePage.ResumeLayout(false); this.DescPage.ResumeLayout(false); this.DescPage.PerformLayout(); base.ResumeLayout(false); base.PerformLayout(); }