/// <summary> /// Adds new tab page to the control and adds it before specified page. /// </summary> private static TabPageAdv AddTab( this TabControlAdv tabControl, string caption, Bitmap icon, TabPageAdv insertBefore) { var tab = new TabPageAdv(caption) { Image = icon, ImageSize = new Size(24, 24), Location = new Point(123, 1), ShowCloseButton = true, ThemesEnabled = false }; // insert panel with autoscrolling, which will serve as a container for controls var panel = new Panel { AutoScroll = true, Dock = DockStyle.Fill, Location = new Point(0, 0), Padding = new Padding(20, 10, 20, 25), Size = new Size(425, 387), }; tab.Controls.Add(panel); int index = tabControl.TabPages.IndexOf(insertBefore); // insert before the help page tabControl.TabPages.Insert(index, tab); return(tab); }
private void ShowOptions(DatasourceDriver driver, GdalDriverMetadata metadata, StronglyTypedGrid <DriverOption> grid, TabPageAdv tabPage) { string options = driver.get_Metadata(metadata); bool hasOptions = !string.IsNullOrWhiteSpace(options); if (hasOptions) { var list = DriverMetadata.ParseOptionList(options).OrderBy(o => o.Name).ToList(); hasOptions = list.Any(); grid.DataSource = list; var cmn = grid.Adapter.GetColumn(item => item.UserDescription); if (cmn != null) { cmn.Width = 0; // to make it shrink } grid.AdjustColumnWidths(); if (cmn != null && cmn.Width > DescriptionColumnWidth) { cmn.Width = DescriptionColumnWidth; } grid.AdjustRowHeights(); } tabPage.TabVisible = hasOptions; }
protected override void OnMouseDown(MouseEventArgs e) { predraggedTab = getPointedTab(e.Location); dragStartPoint = e.Location; base.OnMouseDown(e); }
private void PrintBarcode(int repid) { try { PageReport rpt = new PageReport(); rpt.Load(new FileInfo("reg\\doc\\barcode.rdlx")); rpt.Report.DataSources[0].ConnectionProperties.ConnectString = KontoGlobals.sqlConnectionString.ConnectionString; GrapeCity.ActiveReports.Document.PageDocument doc = new GrapeCity.ActiveReports.Document.PageDocument(rpt); doc.Parameters["reportid"].CurrentValue = repid; var frm = new KontoRepViewer(doc); frm.Text = "Print"; var _tab = this.Parent.Parent as TabControlAdv; if (_tab == null) { return; } var pg1 = new TabPageAdv(); pg1.Text = "Barcode Print"; _tab.TabPages.Add(pg1); _tab.SelectedTab = pg1; frm.TopLevel = false; frm.Parent = pg1; frm.Location = new System.Drawing.Point(pg1.Location.X + pg1.Width / 2 - frm.Width / 2, pg1.Location.Y + pg1.Height / 2 - frm.Height / 2); frm.Show();// = true; } catch (Exception ex) { MessageBox.Show(ex.ToString()); Log.Error(ex, "print barcode"); } }
public override void Initialize() { if (GdalTool.SupportDriverCreationOptions) { _tabDriver = tabControlAdv1.AddTab("Driver", Resources.img_driver24); } base.Initialize(); }
public ListView AddControlsToTabPage(string controlName, ref TabPageAdv tabPageControl, ref ContextMenuStrip contextmenuControl, EventHandler DoubleClickEventHandler) { ListView listviewNew = new ListView(); listviewNew.Name = controlName; listviewNew.View = View.Tile; listviewNew.Dock = DockStyle.Fill; listviewNew.ContextMenuStrip = contextmenuControl; listviewNew.DoubleClick += new System.EventHandler(DoubleClickEventHandler); tabPageControl.Controls.Add(listviewNew); return(listviewNew); }
private void AddExternalUserControlSettings() { foreach (IAnalogyDataProviderSettings settings in FactoriesManager.Instance.GetProvidersSettings()) { TabPageAdv tab = new TabPageAdv(); tab.Text = settings.Title; UserControl uc = settings.DataProviderSettings; tab.Controls.Add(uc); tab.Image = settings.Icon; tab.ImageSize = new Size(32, 32); uc.Dock = DockStyle.Fill; tabControlAdv1.TabPages.Add(tab); } }
public Form1() { InitializeComponent(); tabbedFormControl = new SfTabbedFormControl(); tabbedFormControl.TabPrimitiveMode = TabPrimitiveMode.DropDown | TabPrimitiveMode.FirstTab | TabPrimitiveMode.LastTab | TabPrimitiveMode.NextPage | TabPrimitiveMode.NextTab | TabPrimitiveMode.PreviousPage | TabPrimitiveMode.PreviousTab; var tabPage1 = new TabPageAdv() { Text = "DataGrid" }; tabbedFormControl.Tabs.Add(tabPage1); for (int i = 2; i <= 15; i++) { tabbedFormControl.Tabs.Add(new TabPageAdv() { Text = "Tab" + i }); } SfDataGrid dataGrid = new SfDataGrid(); dataGrid.Dock = DockStyle.Fill; dataGrid.AutoSizeColumnsMode = Syncfusion.WinForms.DataGrid.Enums.AutoSizeColumnsMode.Fill; var orderInfo = new OrderInfoCollection(); dataGrid.DataSource = orderInfo.OrdersListDetails; tabPage1.Controls.Add(dataGrid); this.Controls.Add(tabbedFormControl); this.TabbedFormControl = tabbedFormControl; this.BackColor = this.Style.TitleBar.BackColor; #region Context Menu Customization ContextMenuStrip tabContextMenu = new ContextMenuStrip(); tabContextMenu.Items.Add("Close", null, OnCloseMenuClicked); tabContextMenu.Items.Add("Close all but this", null, OnCloseAllMenuClicked); tabContextMenu.Items.Add("Close tabs to the right", null, OnCloseTabsToRightMenuClicked); tabbedFormControl.TabContextMenu = tabContextMenu; tabbedFormControl.ContextMenuOpening += TabbedFormControl_ContextMenuOpening; tabbedFormControl.AllowDraggingTabs = true; #endregion }
public void CreateCompanyControlsAndLoadUsers(CSMessengerContext dbContext, byte companyID, short userID, ref TabControlAdv tabUsers, ref ContextMenuStrip contextmenuControl, EventHandler DoubleClickEventHandler) { foreach (UserCompany UserCompanyCurrent in dbContext.UserCompany.Where(uc => uc.CompanyID == companyID && uc.UserID == userID).OrderBy(uc => uc.CompanyGranted.Name)) { // Add a new Tab Page to the Tab control TabPageAdv tabpageNew = new TabPageAdv(UserCompanyCurrent.CompanyGranted.Name); tabUsers.TabPages.Add(tabpageNew); // Add a ListView to the TabPage ListView ListViewNew = AddControlsToTabPage(Constants.ListView_Company_Prefix + UserCompanyCurrent.CompanyID, ref tabpageNew, ref contextmenuControl, DoubleClickEventHandler); // Load Users LoadUsersOfCompany(dbContext, companyID, userID, UserCompanyCurrent.AccessCompanyID, ref ListViewNew); } }
public Form1() { InitializeComponent(); SfTabbedFormControl tabbedFormControl = new SfTabbedFormControl(); var tabPage1 = new TabPageAdv() { Text = "DataGrid" }; var tabPage2 = new TabPageAdv() { Text = "Tab2" }; var tabPage3 = new TabPageAdv() { Text = "Tab3" }; var tabPage4 = new TabPageAdv() { Text = "Tab4" }; var tabPage5 = new TabPageAdv() { Text = "Tab5" }; tabbedFormControl.Tabs.Add(tabPage1); tabbedFormControl.Tabs.Add(tabPage2); tabbedFormControl.Tabs.Add(tabPage3); tabbedFormControl.Tabs.Add(tabPage4); tabbedFormControl.Tabs.Add(tabPage5); SfDataGrid dataGrid = new SfDataGrid(); dataGrid.Dock = DockStyle.Fill; dataGrid.AutoSizeColumnsMode = Syncfusion.WinForms.DataGrid.Enums.AutoSizeColumnsMode.Fill; var orderInfo = new OrderInfoCollection(); dataGrid.DataSource = orderInfo.OrdersListDetails; tabPage1.Controls.Add(dataGrid); this.Controls.Add(tabbedFormControl); this.TabbedFormControl = tabbedFormControl; this.BackColor = this.Style.TitleBar.BackColor; }
public override void Print() { base.Print(); if (this.customGridView1.FocusedRowHandle < 0) { return; } if (KontoView.Columns.ColumnByFieldName("ReportId") != null) { string accname = Convert.ToString(this.customGridView1.GetRowCellValue(customGridView1.FocusedRowHandle, "AccName")); int reportid = Convert.ToInt32(this.customGridView1.GetRowCellValue(customGridView1.FocusedRowHandle, "ReportId")); if (KontoView.Columns.ColumnByFieldName("IsDeleted") != null) { if (Convert.ToBoolean(this.KontoView.GetRowCellValue(this.KontoView.FocusedRowHandle, "IsDeleted"))) { return; } } PageReport rpt = new PageReport(); rpt.Load(new FileInfo("reg\\doc\\Outwardbarcode.rdlx")); rpt.Report.DataSources[0].ConnectionProperties.ConnectString = KontoGlobals.sqlConnectionString.ConnectionString; GrapeCity.ActiveReports.Document.PageDocument doc = new GrapeCity.ActiveReports.Document.PageDocument(rpt); doc.Parameters["Party"].CurrentValue = accname; doc.Parameters["ReportId"].CurrentValue = reportid; doc.Parameters["BarcodeNo"].CurrentValue = "0"; var frm = new KontoRepViewer(doc); frm.Text = "Barcode"; var _tab = this.ParentForm.Parent.Parent as TabControlAdv; if (_tab == null) { return; } var pg1 = new TabPageAdv(); pg1.Text = "Barcode Print"; _tab.TabPages.Add(pg1); _tab.SelectedTab = pg1; frm.TopLevel = false; frm.Parent = pg1; frm.Location = new System.Drawing.Point(pg1.Location.X + pg1.Width / 2 - frm.Width / 2, pg1.Location.Y + pg1.Height / 2 - frm.Height / 2); frm.Show();// = true; } }
/// <summary> /// Generates control for creation options exposed by selected GDAL driver. /// </summary> private void GenerateDriverOptions(DatasourceDriver driver, TabPageAdv tab) { var panel = tab.GetPanel(); panel.Controls.Clear(); _driverOptions = driver.GenerateCreationOptions().ToList(); driver.RestoreConfig(DriverParameters); GenerateDriverControls(panel, driver); tab.TabVisible = panel.Controls.Count > 0; superToolTip1.AddTooltips(_driverOptions); }
protected override void OnDragOver(DragEventArgs drgevent) { TabPageAdv draggedTab = (TabPageAdv)drgevent.Data.GetData(typeof(TabPageAdv)); TabPageAdv pointedTab = getPointedTab(this.PointToClient(new Point(drgevent.X, drgevent.Y))); if (draggedTab == predraggedTab && draggedTab != null && pointedTab != null) { drgevent.Effect = DragDropEffects.Move; if (pointedTab != draggedTab) { swapTabPages(draggedTab, pointedTab); } } base.OnDragOver(drgevent); }
private void LoadAuditHeaderPropertyGrids() { foreach (var file in Globals.AttachedFiles) { var pg = new PropertyGrid(); var tab = new TabPageAdv(); pg.SelectedObject = file.AuditFile.ToHeaderPt(); pg.Dock = DockStyle.Fill; pg.HelpVisible = false; pg.ToolbarVisible = false; tab.Text = $"{System.IO.Path.GetFileName(file.FilePath)}".ToUpper(); tab.ImageIndex = 0; tab.Controls.Add(pg); tabControlAdv3.TabPages.Add(tab); } }
private void Initialize(List <AlignmentMethod> alignmentMethods) { pipelineTestMainTablePanel.Dock = DockStyle.None; pipelineTestControlsPanel.Dock = DockStyle.None; MainLayoutPanel.SetRow(pipelineTestMainTablePanel, 0); MainLayoutPanel.SetRow(pipelineTestControlsPanel, 1); pipelineTestMainTablePanel.Dock = DockStyle.Fill; pipelineTestControlsPanel.Dock = DockStyle.Fill; pipelineTestSettingsTablePanel.RowCount = alignmentMethods.Count == 1 ? alignmentMethods.Count + 1 : alignmentMethods.Count; pipelineTestSettingsTablePanel.RowStyles.Clear(); for (int i = 0; i < pipelineTestSettingsTablePanel.RowCount; i++) { if (i == pipelineTestSettingsTablePanel.RowCount - 1 && alignmentMethods.Count == 1) { pipelineTestSettingsTablePanel.RowStyles.Add(new RowStyle(SizeType.Percent, 100)); } else { pipelineTestSettingsTablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 50)); AlignmentMethod alignmentMethod = alignmentMethods[i]; TabPageAdv methodTabPage = CreateAlignmentMethodTabPage(alignmentMethod); alignmentPipelineTabControl.TabPages.Add(methodTabPage); methodTabPage.Dock = DockStyle.Fill; PipelineTestMethodSettingControl pipelineTestMethodSettingControl = new PipelineTestMethodSettingControl(alignmentMethod.MethodName, alignmentMethod.PipelineIndex); pipelineTestMethodSettingControl.OnEnabledChangedEvent += (int pipelineIndex, bool isEnabled) => { if (!isEnabled) { ommittedAlignmetMethodIndeces.Add(pipelineIndex); } else { ommittedAlignmetMethodIndeces.Remove(pipelineIndex); } }; pipelineTestSettingsTablePanel.Controls.Add(pipelineTestMethodSettingControl, 0, i); pipelineTestMethodSettingControl.Dock = DockStyle.Top; } } }
private void swapTabPages(TabPageAdv src, TabPageAdv dst) { int srci = this.TabPages.IndexOf(src); int dsti = this.TabPages.IndexOf(dst); this.TabPages[dsti] = src; this.TabPages[srci] = dst; if (this.SelectedIndex == srci) { this.SelectedIndex = dsti; } else if (this.SelectedIndex == dsti) { this.SelectedIndex = srci; } this.Refresh(); }
/// <summary> /// Occurs when context menu on the tab is opening. /// </summary> private void TabbedFormControl_ContextMenuOpening(object sender, ContextMenuOpeningEventArgs e) { clickedTab = e.Tab; var tabs = tabbedFormControl.Tabs.OfType <TabPageAdv>(); var tabsExistsInRight = tabs.Any(tab => tab.TabIndex > e.Tab.TabIndex); if (tabs.Count() == 1) { e.ContextMenu.Items[1].Enabled = false; e.ContextMenu.Items[2].Enabled = false; } else if (!tabsExistsInRight) { e.ContextMenu.Items[2].Enabled = false; } else { e.ContextMenu.Items[0].Enabled = true; e.ContextMenu.Items[1].Enabled = true; e.ContextMenu.Items[2].Enabled = true; } }
protected override void OnMouseUp(MouseEventArgs e) { predraggedTab = null; TabPageAdv pointedTab = getPointedTab(e.Location); if (this.AllowClose && pointedTab != null) { if (e.Button == MouseButtons.Right) { contextmenuTab = pointedTab; tabCtxm.Show(this, e.Location); } if (e.Button == MouseButtons.Middle) { contextmenuTab = pointedTab; closeTab(this, e); } } base.OnMouseUp(e); }
public static bool IsPlusTab(this TabPageAdv page) => page?.Name == "plusTab";
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); this.imageList2 = new System.Windows.Forms.ImageList(this.components); this.imageList1 = new System.Windows.Forms.ImageList(this.components); this.xpTaskBar1 = new TaskBar.GradientTaskBar(this.components); this.xpTaskBarBox1 = new Syncfusion.Windows.Forms.Tools.XPTaskBarBox(); this.xpTaskBarBox2 = new Syncfusion.Windows.Forms.Tools.XPTaskBarBox(); this.label1 = new System.Windows.Forms.Label(); this.tabControlAdv1 = new Syncfusion.Windows.Forms.Tools.TabControlAdv(); this.tabPageAdv1 = new Syncfusion.Windows.Forms.Tools.TabPageAdv(); this.tabPageAdv2 = new Syncfusion.Windows.Forms.Tools.TabPageAdv(); this.label2 = new System.Windows.Forms.Label(); this.xpTaskBarStyles = new Syncfusion.Windows.Forms.Tools.XPTaskBar(); this.xpTaskBarBox3 = new TaskBar.StyleTaskBox(); this.xpTaskBarBox4 = new TaskBar.StyleTaskBox(); this.xpTaskBarBox5 = new TaskBar.StyleTaskBox(); ((System.ComponentModel.ISupportInitialize)(this.xpTaskBar1)).BeginInit(); this.xpTaskBar1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.tabControlAdv1)).BeginInit(); this.tabControlAdv1.SuspendLayout(); this.tabPageAdv1.SuspendLayout(); this.tabPageAdv2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.xpTaskBarStyles)).BeginInit(); this.xpTaskBarStyles.SuspendLayout(); this.SuspendLayout(); // // imageList2 // this.imageList2.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList2.ImageStream"))); this.imageList2.TransparentColor = System.Drawing.Color.Transparent; this.imageList2.Images.SetKeyName(0, ""); this.imageList2.Images.SetKeyName(1, ""); // // imageList1 // this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream"))); this.imageList1.TransparentColor = System.Drawing.Color.Transparent; this.imageList1.Images.SetKeyName(0, ""); this.imageList1.Images.SetKeyName(1, ""); this.imageList1.Images.SetKeyName(2, ""); this.imageList1.Images.SetKeyName(3, ""); this.imageList1.Images.SetKeyName(4, ""); // // xpTaskBar1 // this.xpTaskBar1.AutoScroll = true; this.xpTaskBar1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(78)))), ((int)(((byte)(129))))); this.xpTaskBar1.BlendImage = ((System.Drawing.Image)(resources.GetObject("xpTaskBar1.BlendImage"))); this.xpTaskBar1.BorderColor = System.Drawing.Color.Black; this.xpTaskBar1.Controls.Add(this.xpTaskBarBox1); this.xpTaskBar1.Controls.Add(this.xpTaskBarBox2); this.xpTaskBar1.Dock = System.Windows.Forms.DockStyle.Right; this.xpTaskBar1.GradientEndColor = System.Drawing.Color.FromArgb(((int)(((byte)(42)))), ((int)(((byte)(78)))), ((int)(((byte)(129))))); this.xpTaskBar1.GradientStartColor = System.Drawing.Color.FromArgb(((int)(((byte)(237)))), ((int)(((byte)(241)))), ((int)(((byte)(242))))); this.xpTaskBar1.HeaderImageList = this.imageList2; this.xpTaskBar1.Location = new System.Drawing.Point(280, 0); this.xpTaskBar1.MetroColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(158)))), ((int)(((byte)(218))))); this.xpTaskBar1.MinimumSize = new System.Drawing.Size(0, 0); this.xpTaskBar1.Name = "xpTaskBar1"; this.xpTaskBar1.Padding = new System.Windows.Forms.Padding(10, 5, 10, 0); this.xpTaskBar1.Size = new System.Drawing.Size(240, 400); this.xpTaskBar1.TabIndex = 0; // // xpTaskBarBox1 // this.xpTaskBarBox1.BackColor = System.Drawing.Color.Transparent; this.xpTaskBarBox1.DrawFocusRect = false; this.xpTaskBarBox1.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(161))); this.xpTaskBarBox1.ForeColor = System.Drawing.Color.White; this.xpTaskBarBox1.HeaderBackColor = System.Drawing.Color.Transparent; this.xpTaskBarBox1.HeaderForeColor = System.Drawing.Color.White; this.xpTaskBarBox1.HeaderImageIndex = 0; this.xpTaskBarBox1.HeaderImageList = this.imageList2; this.xpTaskBarBox1.HitTaskBoxArea = false; this.xpTaskBarBox1.HotTrackColor = System.Drawing.Color.Empty; this.xpTaskBarBox1.ItemBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(241)))), ((int)(((byte)(242)))), ((int)(((byte)(241))))); this.xpTaskBarBox1.Items.AddRange(new Syncfusion.Windows.Forms.Tools.XPTaskBarItem[] { new Syncfusion.Windows.Forms.Tools.XPTaskBarItem("Item 1", System.Drawing.Color.Black, -1, null, null, true, true, "", new System.Drawing.Font("Microsoft Sans Serif", 8.25F), 0), new Syncfusion.Windows.Forms.Tools.XPTaskBarItem("Item2", System.Drawing.Color.Black, -1, null, null, true, true, "", new System.Drawing.Font("Microsoft Sans Serif", 8.25F), 0), new Syncfusion.Windows.Forms.Tools.XPTaskBarItem("Item 3", System.Drawing.Color.Black, -1, null, null, true, true, "", new System.Drawing.Font("Microsoft Sans Serif", 8.25F), 0), new Syncfusion.Windows.Forms.Tools.XPTaskBarItem("Item 4", System.Drawing.Color.Black, -1, null, null, true, true, "", new System.Drawing.Font("Microsoft Sans Serif", 8.25F), 0), new Syncfusion.Windows.Forms.Tools.XPTaskBarItem("Item 5", System.Drawing.Color.Black, -1, null, null, true, true, "", new System.Drawing.Font("Microsoft Sans Serif", 8.25F), 0), new Syncfusion.Windows.Forms.Tools.XPTaskBarItem("Item 6", System.Drawing.Color.Black, -1, null, null, true, true, "", new System.Drawing.Font("Microsoft Sans Serif", 8.25F), 0) }); this.xpTaskBarBox1.Location = new System.Drawing.Point(10, 5); this.xpTaskBarBox1.Name = "xpTaskBarBox1"; this.xpTaskBarBox1.Size = new System.Drawing.Size(220, 179); this.xpTaskBarBox1.TabIndex = 0; this.xpTaskBarBox1.Text = "Tasks"; this.xpTaskBarBox1.ProvideHeaderBackgroundBrush += new Syncfusion.Windows.Forms.Tools.ProvideBrushEventHandler(this.xpTaskBarBox1_ProvideHeaderBackgroundBrush); // // xpTaskBarBox2 // this.xpTaskBarBox2.BackColor = System.Drawing.Color.Transparent; this.xpTaskBarBox2.ForeColor = System.Drawing.Color.White; this.xpTaskBarBox2.HeaderBackColor = System.Drawing.Color.Transparent; this.xpTaskBarBox2.HeaderForeColor = System.Drawing.Color.White; this.xpTaskBarBox2.HeaderImageIndex = 1; this.xpTaskBarBox2.HitTaskBoxArea = false; this.xpTaskBarBox2.HotTrackColor = System.Drawing.Color.Empty; this.xpTaskBarBox2.ImageList = this.imageList1; this.xpTaskBarBox2.ItemBackColor = System.Drawing.Color.Transparent; this.xpTaskBarBox2.Items.AddRange(new Syncfusion.Windows.Forms.Tools.XPTaskBarItem[] { new Syncfusion.Windows.Forms.Tools.XPTaskBarItem("Canada", System.Drawing.Color.Empty, 0, null, null, true, true, "", new System.Drawing.Font("Microsoft Sans Serif", 8.25F), 0), new Syncfusion.Windows.Forms.Tools.XPTaskBarItem("France", System.Drawing.Color.Empty, 1, null, null, true, true, "", new System.Drawing.Font("Microsoft Sans Serif", 8.25F), 0), new Syncfusion.Windows.Forms.Tools.XPTaskBarItem("Germany", System.Drawing.Color.Empty, 2, null, null, true, true, "", new System.Drawing.Font("Microsoft Sans Serif", 8.25F), 0), new Syncfusion.Windows.Forms.Tools.XPTaskBarItem("UK", System.Drawing.Color.Empty, 3, null, null, true, true, "", new System.Drawing.Font("Microsoft Sans Serif", 8.25F), 0), new Syncfusion.Windows.Forms.Tools.XPTaskBarItem("USA", System.Drawing.Color.Empty, 4, null, null, true, true, "", new System.Drawing.Font("Microsoft Sans Serif", 8.25F), 0) }); this.xpTaskBarBox2.Location = new System.Drawing.Point(10, 184); this.xpTaskBarBox2.Name = "xpTaskBarBox2"; this.xpTaskBarBox2.Size = new System.Drawing.Size(220, 152); this.xpTaskBarBox2.TabIndex = 1; this.xpTaskBarBox2.Text = "Countries..."; // // label1 // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Dock = System.Windows.Forms.DockStyle.Fill; this.label1.Font = new System.Drawing.Font("Tahoma", 36F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(143)))), ((int)(((byte)(196)))), ((int)(((byte)(250))))); this.label1.Location = new System.Drawing.Point(0, 0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(280, 400); this.label1.TabIndex = 1; this.label1.Text = "MSN like TaskBar"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // tabControlAdv1 // this.tabControlAdv1.ActiveTabColor = System.Drawing.SystemColors.Highlight; this.tabControlAdv1.BackColor = System.Drawing.Color.White; this.tabControlAdv1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.tabControlAdv1.Controls.Add(this.tabPageAdv1); this.tabControlAdv1.Controls.Add(this.tabPageAdv2); this.tabControlAdv1.Dock = System.Windows.Forms.DockStyle.Fill; this.tabControlAdv1.FixedSingleBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(141)))), ((int)(((byte)(178)))), ((int)(((byte)(227))))); this.tabControlAdv1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(161))); this.tabControlAdv1.Location = new System.Drawing.Point(10, 10); this.tabControlAdv1.Name = "tabControlAdv1"; this.tabControlAdv1.Size = new System.Drawing.Size(526, 427); this.tabControlAdv1.TabIndex = 2; this.tabControlAdv1.TabPanelBackColor = System.Drawing.Color.White; this.tabControlAdv1.TabStyle = typeof(Syncfusion.Windows.Forms.Tools.TabRendererMetro); this.tabControlAdv1.ThemesEnabled = true; // // tabPageAdv1 // this.tabPageAdv1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(227)))), ((int)(((byte)(237)))), ((int)(((byte)(248))))); this.tabPageAdv1.Controls.Add(this.label1); this.tabPageAdv1.Controls.Add(this.xpTaskBar1); this.tabPageAdv1.Image = null; this.tabPageAdv1.ImageSize = new System.Drawing.Size(16, 16); this.tabPageAdv1.Location = new System.Drawing.Point(3, 24); this.tabPageAdv1.Name = "tabPageAdv1"; this.tabPageAdv1.ShowCloseButton = true; this.tabPageAdv1.Size = new System.Drawing.Size(520, 400); this.tabPageAdv1.TabIndex = 1; this.tabPageAdv1.Text = "MSN TaskBar"; this.tabPageAdv1.ThemesEnabled = false; // // tabPageAdv2 // this.tabPageAdv2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(227)))), ((int)(((byte)(237)))), ((int)(((byte)(248))))); this.tabPageAdv2.Controls.Add(this.label2); this.tabPageAdv2.Controls.Add(this.xpTaskBarStyles); this.tabPageAdv2.Image = null; this.tabPageAdv2.ImageSize = new System.Drawing.Size(16, 16); this.tabPageAdv2.Location = new System.Drawing.Point(3, 24); this.tabPageAdv2.Name = "tabPageAdv2"; this.tabPageAdv2.ShowCloseButton = true; this.tabPageAdv2.Size = new System.Drawing.Size(520, 400); this.tabPageAdv2.TabIndex = 2; this.tabPageAdv2.Text = "Custom TaskBar"; this.tabPageAdv2.ThemesEnabled = false; // // label2 // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Dock = System.Windows.Forms.DockStyle.Fill; this.label2.Font = new System.Drawing.Font("Tahoma", 36F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(143)))), ((int)(((byte)(196)))), ((int)(((byte)(250))))); this.label2.Location = new System.Drawing.Point(184, 0); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(336, 400); this.label2.TabIndex = 2; this.label2.Text = "Custom TaskBar "; this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // xpTaskBarStyles // this.xpTaskBarStyles.BackColor = System.Drawing.Color.White; this.xpTaskBarStyles.BorderColor = System.Drawing.Color.Black; this.xpTaskBarStyles.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.xpTaskBarStyles.Controls.Add(this.xpTaskBarBox3); this.xpTaskBarStyles.Controls.Add(this.xpTaskBarBox4); this.xpTaskBarStyles.Controls.Add(this.xpTaskBarBox5); this.xpTaskBarStyles.Dock = System.Windows.Forms.DockStyle.Left; this.xpTaskBarStyles.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(161))); this.xpTaskBarStyles.Location = new System.Drawing.Point(0, 0); this.xpTaskBarStyles.MetroColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(158)))), ((int)(((byte)(218))))); this.xpTaskBarStyles.MinimumSize = new System.Drawing.Size(0, 0); this.xpTaskBarStyles.Name = "xpTaskBarStyles"; this.xpTaskBarStyles.Padding = new System.Windows.Forms.Padding(10, 15, 10, 0); this.xpTaskBarStyles.Size = new System.Drawing.Size(184, 400); this.xpTaskBarStyles.Style = Syncfusion.Windows.Forms.Tools.XPTaskBarStyle.Metro; this.xpTaskBarStyles.TabIndex = 3; this.xpTaskBarStyles.VerticalPadding = 15; // // xpTaskBarBox3 // this.xpTaskBarBox3.DrawFocusRect = false; this.xpTaskBarBox3.HeaderBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(158)))), ((int)(((byte)(218))))); this.xpTaskBarBox3.HeaderImageIndex = -1; this.xpTaskBarBox3.HitTaskBoxArea = false; this.xpTaskBarBox3.HotTrackColor = System.Drawing.Color.Empty; this.xpTaskBarBox3.ItemBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(187)))), ((int)(((byte)(240))))); this.xpTaskBarBox3.Items.AddRange(new Syncfusion.Windows.Forms.Tools.XPTaskBarItem[] { new Syncfusion.Windows.Forms.Tools.XPTaskBarItem("Make a New Folder", System.Drawing.Color.Empty, -1, null, "", true, true, "XPTaskBarItem0", new System.Drawing.Font("Microsoft Sans Serif", 8.25F), 0), new Syncfusion.Windows.Forms.Tools.XPTaskBarItem("Publish this Folder to the web", System.Drawing.Color.Empty, -1, null, "", true, true, "XPTaskBarItem1", new System.Drawing.Font("Microsoft Sans Serif", 8.25F), 0), new Syncfusion.Windows.Forms.Tools.XPTaskBarItem("Copy", System.Drawing.Color.Empty, -1, null, "", true, true, "XPTaskBarItem6", new System.Drawing.Font("Microsoft Sans Serif", 8.25F), 0), new Syncfusion.Windows.Forms.Tools.XPTaskBarItem("Paste", System.Drawing.Color.Empty, -1, null, "", true, true, "XPTaskBarItem7", new System.Drawing.Font("Microsoft Sans Serif", 8.25F), 0) }); this.xpTaskBarBox3.Location = new System.Drawing.Point(10, 15); this.xpTaskBarBox3.Name = "xpTaskBarBox3"; this.xpTaskBarBox3.PADY = 2; this.xpTaskBarBox3.Size = new System.Drawing.Size(162, 99); this.xpTaskBarBox3.TabIndex = 0; this.xpTaskBarBox3.Text = "Files And Folder Task"; this.xpTaskBarBox3.Paint += new System.Windows.Forms.PaintEventHandler(this.xpTaskBarBox_Paint); // // xpTaskBarBox4 // this.xpTaskBarBox4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(223)))), ((int)(((byte)(242))))); this.xpTaskBarBox4.DrawFocusRect = false; this.xpTaskBarBox4.HeaderBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(158)))), ((int)(((byte)(218))))); this.xpTaskBarBox4.HeaderImageIndex = -1; this.xpTaskBarBox4.HitTaskBoxArea = false; this.xpTaskBarBox4.HotTrackColor = System.Drawing.Color.Empty; this.xpTaskBarBox4.ItemBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(187)))), ((int)(((byte)(240))))); this.xpTaskBarBox4.Items.AddRange(new Syncfusion.Windows.Forms.Tools.XPTaskBarItem[] { new Syncfusion.Windows.Forms.Tools.XPTaskBarItem("My Documents", System.Drawing.Color.Empty, -1, null, "", true, true, "XPTaskBarItem2", new System.Drawing.Font("Microsoft Sans Serif", 8.25F), 0), new Syncfusion.Windows.Forms.Tools.XPTaskBarItem("Desktop", System.Drawing.Color.Empty, -1, null, "", true, true, "XPTaskBarItem5", new System.Drawing.Font("Microsoft Sans Serif", 8.25F), 0), new Syncfusion.Windows.Forms.Tools.XPTaskBarItem("My Computer", System.Drawing.Color.Empty, -1, null, "", true, true, "XPTaskBarItem8", new System.Drawing.Font("Microsoft Sans Serif", 8.25F), 0), new Syncfusion.Windows.Forms.Tools.XPTaskBarItem("My Network Places", System.Drawing.Color.Empty, -1, null, "", true, true, "XPTaskBarItem9", new System.Drawing.Font("Microsoft Sans Serif", 8.25F), 0), new Syncfusion.Windows.Forms.Tools.XPTaskBarItem("My Music", System.Drawing.Color.Empty, -1, null, "", true, true, "XPTaskBarItem10", new System.Drawing.Font("Microsoft Sans Serif", 8.25F), 0) }); this.xpTaskBarBox4.Location = new System.Drawing.Point(10, 129); this.xpTaskBarBox4.Name = "xpTaskBarBox4"; this.xpTaskBarBox4.PADY = 2; this.xpTaskBarBox4.Size = new System.Drawing.Size(162, 118); this.xpTaskBarBox4.TabIndex = 1; this.xpTaskBarBox4.Text = "Other Places"; this.xpTaskBarBox4.Paint += new System.Windows.Forms.PaintEventHandler(this.xpTaskBarBox_Paint); // // xpTaskBarBox5 // this.xpTaskBarBox5.DrawFocusRect = false; this.xpTaskBarBox5.HeaderBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(158)))), ((int)(((byte)(218))))); this.xpTaskBarBox5.HeaderImageIndex = -1; this.xpTaskBarBox5.HitTaskBoxArea = false; this.xpTaskBarBox5.HotTrackColor = System.Drawing.Color.Empty; this.xpTaskBarBox5.ItemBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(187)))), ((int)(((byte)(240))))); this.xpTaskBarBox5.Items.AddRange(new Syncfusion.Windows.Forms.Tools.XPTaskBarItem[] { new Syncfusion.Windows.Forms.Tools.XPTaskBarItem("Cut", System.Drawing.Color.Empty, -1, null, "", true, true, "XPTaskBarItem3", new System.Drawing.Font("Microsoft Sans Serif", 8.25F), 0), new Syncfusion.Windows.Forms.Tools.XPTaskBarItem("Copy", System.Drawing.Color.Empty, -1, null, "", true, true, "XPTaskBarItem4", new System.Drawing.Font("Microsoft Sans Serif", 8.25F), 0), new Syncfusion.Windows.Forms.Tools.XPTaskBarItem("Paste", System.Drawing.Color.Empty, -1, null, "", true, true, "XPTaskBarItem11", new System.Drawing.Font("Microsoft Sans Serif", 8.25F), 0), new Syncfusion.Windows.Forms.Tools.XPTaskBarItem("Delete", System.Drawing.Color.Empty, -1, null, "", true, true, "XPTaskBarItem12", new System.Drawing.Font("Microsoft Sans Serif", 8.25F), 0) }); this.xpTaskBarBox5.Location = new System.Drawing.Point(10, 262); this.xpTaskBarBox5.Name = "xpTaskBarBox5"; this.xpTaskBarBox5.PADY = 2; this.xpTaskBarBox5.Size = new System.Drawing.Size(162, 99); this.xpTaskBarBox5.TabIndex = 2; this.xpTaskBarBox5.Text = "ClipBoard"; this.xpTaskBarBox5.Paint += new System.Windows.Forms.PaintEventHandler(this.xpTaskBarBox_Paint); // // Form1 // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.BackColor = System.Drawing.Color.White; this.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(161)))), ((int)(((byte)(226))))); this.CaptionAlign = System.Windows.Forms.HorizontalAlignment.Center; this.ClientSize = new System.Drawing.Size(546, 447); this.Controls.Add(this.tabControlAdv1); this.DropShadow = true; this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.IconAlign = System.Windows.Forms.HorizontalAlignment.Left; this.MetroColor = System.Drawing.Color.White; this.Name = "Form1"; this.Padding = new System.Windows.Forms.Padding(10); this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "XpTaskBar"; ((System.ComponentModel.ISupportInitialize)(this.xpTaskBar1)).EndInit(); this.xpTaskBar1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.tabControlAdv1)).EndInit(); this.tabControlAdv1.ResumeLayout(false); this.tabPageAdv1.ResumeLayout(false); this.tabPageAdv2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.xpTaskBarStyles)).EndInit(); this.xpTaskBarStyles.ResumeLayout(false); 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.panel1 = new System.Windows.Forms.Panel(); this.comboBox2 = new Syncfusion.Windows.Forms.Tools.ComboBoxAdv(); this.splitter1 = new System.Windows.Forms.Splitter(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.textLog = new System.Windows.Forms.TextBox(); this.tabPage1 = new Syncfusion.Windows.Forms.Tools.TabPageAdv(); this.comboBoxAdvSampleControl1 = new ComboTest.MultiColumnComboBoxSampleControl(); this.tabControl1 = new Syncfusion.Windows.Forms.Tools.TabControlAdv(); this.panel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.comboBox2)).BeginInit(); this.groupBox1.SuspendLayout(); this.tabPage1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.tabControl1)).BeginInit(); this.tabControl1.SuspendLayout(); this.SuspendLayout(); // // panel1 // this.panel1.Controls.Add(this.comboBox2); this.panel1.Controls.Add(this.splitter1); this.panel1.Dock = System.Windows.Forms.DockStyle.Right; this.panel1.Location = new System.Drawing.Point(456, 0); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(176, 517); this.panel1.TabIndex = 6; // // comboBox2 // this.comboBox2.Dock = System.Windows.Forms.DockStyle.Top; this.comboBox2.Location = new System.Drawing.Point(3, 0); this.comboBox2.Name = "comboBox2"; this.comboBox2.Size = new System.Drawing.Size(173, 21); this.comboBox2.TabIndex = 1; // // splitter1 // this.splitter1.Location = new System.Drawing.Point(0, 0); this.splitter1.Name = "splitter1"; this.splitter1.Size = new System.Drawing.Size(3, 517); this.splitter1.TabIndex = 0; this.splitter1.TabStop = false; // // groupBox1 // this.groupBox1.BackColor = System.Drawing.Color.White; this.groupBox1.Controls.Add(this.textLog); this.groupBox1.Dock = System.Windows.Forms.DockStyle.Bottom; this.groupBox1.Location = new System.Drawing.Point(0, 262); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(512, 192); this.groupBox1.TabIndex = 8; this.groupBox1.TabStop = false; this.groupBox1.Text = "Events:"; // // textLog // this.textLog.Dock = System.Windows.Forms.DockStyle.Fill; this.textLog.Location = new System.Drawing.Point(3, 16); this.textLog.Multiline = true; this.textLog.Name = "textLog"; this.textLog.Size = new System.Drawing.Size(506, 173); this.textLog.TabIndex = 0; // // tabPage1 // this.tabPage1.BackColor = System.Drawing.Color.White; this.tabPage1.Controls.Add(this.comboBoxAdvSampleControl1); this.tabPage1.Image = null; this.tabPage1.ImageSize = new System.Drawing.Size(16, 16); this.tabPage1.Location = new System.Drawing.Point(1, 18); this.tabPage1.Name = "tabPage1"; this.tabPage1.ShowCloseButton = true; this.tabPage1.Size = new System.Drawing.Size(509, 242); this.tabPage1.TabIndex = 1; this.tabPage1.Text = "ComboBoxAdv"; this.tabPage1.ThemesEnabled = false; // // comboBoxAdvSampleControl1 // this.comboBoxAdvSampleControl1.BackColor = System.Drawing.Color.White; this.comboBoxAdvSampleControl1.Dock = System.Windows.Forms.DockStyle.Fill; this.comboBoxAdvSampleControl1.Location = new System.Drawing.Point(0, 0); this.comboBoxAdvSampleControl1.Name = "comboBoxAdvSampleControl1"; this.comboBoxAdvSampleControl1.Size = new System.Drawing.Size(509, 242); this.comboBoxAdvSampleControl1.TabIndex = 0; // // tabControl1 // this.tabControl1.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.tabControl1.Controls.Add(this.tabPage1); this.tabControl1.ItemSize = new System.Drawing.Size(82, 18); this.tabControl1.Location = new System.Drawing.Point(0, 0); this.tabControl1.Name = "tabControl1"; this.tabControl1.Size = new System.Drawing.Size(512, 262); this.tabControl1.TabIndex = 7; this.tabControl1.TabPanelBackColor = System.Drawing.Color.White; this.tabControl1.TabStyle = typeof(Syncfusion.Windows.Forms.Tools.TabRendererMetro); // // Form1 // this.AutoScaleBaseSize = new System.Drawing.Size(5, 15); this.BackColor = System.Drawing.Color.White; this.CaptionFont = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.ClientSize = new System.Drawing.Size(512, 453); this.Controls.Add(this.tabControl1); this.Controls.Add(this.groupBox1); this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.MinimumSize = new System.Drawing.Size(524, 486); this.Name = "Form1"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Multi Column ComboBox"; this.Load += new System.EventHandler(this.Form1_Load); this.panel1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.comboBox2)).EndInit(); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); this.tabPage1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.tabControl1)).EndInit(); this.tabControl1.ResumeLayout(false); this.ResumeLayout(false); }
public static LinkedParsedPacket FromUnlinked(ParsedTsharkTextPacket packet, TabPageAdv page) { return(new LinkedParsedPacket(page) { Dest = packet.Dest, Info = packet.Info, Number = packet.Number, Proto = packet.Proto, Source = packet.Source, Time = packet.Time, Length = packet.Length }); }
/// <summary> /// Gets panel within the tab page. /// </summary> public static Panel GetPanel(this TabPageAdv tab) { return(tab.Controls[0] as Panel); }
public override void SaveDataAsync(bool newmode) { try { if (_bc == null) { return; } if (qtySpinEdit.Value == 0) { return; } var st = Convert.ToDecimal(stockLabelControl.Text); if (st - qtySpinEdit.Value < 0) { MessageBox.Show("Can not generate Barcode For Extra Qty"); return; } using (var db = new KontoContext()) { var repid = db.Barcodes.DefaultIfEmpty().Max(x => x == null ? 0 : x.ReportId) + 1; var barcode = Convert.ToInt32(GetNextBarcodeNo(db)); for (int i = 0; i < qtySpinEdit.Value; i++) { var bm = new BarcodeModel() { CompId = KontoGlobals.CompanyId, IsActive = true, IsDeleted = false, OrderTransId = _bc.OrderTransId, PcsNo = 1, AccId = _bc.AccId, Qty = 1, ProductId = _bc.ProductId, ReportId = repid, RefBarcodeId = _bc.Id }; if (i == 0) { bm.BarcodeNo = barcode.ToString(); } else { barcode = barcode + 1; bm.BarcodeNo = barcode.ToString(); }//String.Format("{0:d9}", (DateTime.Now.Ticks / 10) % 1000000000); //KontoUtils.GetUniqueKey(8)).tos; db.Barcodes.Add(bm); } db.SaveChanges(); _bc = null; PageReport rpt = new PageReport(); rpt.Load(new FileInfo("reg\\doc\\Outwardbarcode.rdlx")); rpt.Report.DataSources[0].ConnectionProperties.ConnectString = KontoGlobals.sqlConnectionString.ConnectionString; GrapeCity.ActiveReports.Document.PageDocument doc = new GrapeCity.ActiveReports.Document.PageDocument(rpt); doc.Parameters["Party"].CurrentValue = partyLabelControl.Text; doc.Parameters["ReportId"].CurrentValue = repid; doc.Parameters["BarcodeNo"].CurrentValue = "0"; var frm = new KontoRepViewer(doc); frm.Text = "Barcode"; var _tab = this.Parent.Parent as TabControlAdv; if (_tab == null) { return; } var pg1 = new TabPageAdv(); pg1.Text = "Barcode Print"; _tab.TabPages.Add(pg1); _tab.SelectedTab = pg1; frm.TopLevel = false; frm.Parent = pg1; frm.Location = new System.Drawing.Point(pg1.Location.X + pg1.Width / 2 - frm.Width / 2, pg1.Location.Y + pg1.Height / 2 - frm.Height / 2); frm.Show();// = true; } this.ResetPage(); barcodeTextEdit.Focus(); } catch (Exception ex) { Log.Error(ex, "Barcode Save"); MessageBox.Show(ex.ToString()); } }
private void addTabToolStripMenuItem_Click(object sender, EventArgs e) { TabPageAdv tabPage = new TabPageAdv("New Tab"); tabControlAdv1.TabPages.Add(tabPage); }
public override void Initialize() { base.Initialize(); _tabCmdLine = tabControlAdv1.AddTab("Cmd Line", Resources.img_console24); }
private TabPageAdv CreateAlignmentMethodTabPage(Template.AlignmentMethod alignmentMethod) { TabPageAdv result = null; switch (alignmentMethod.GetAlignmentMethodType) { case Template.AlignmentMethodType.Anchors: Template.AnchorAlignmentMethod anchorAlignmentMethod = (Template.AnchorAlignmentMethod)alignmentMethod; AnchorsSettingsPanel anchorSP = new AnchorsSettingsPanel(anchorAlignmentMethod.GetAnchors); TabPageAdv anchorTabPage = new TabPageAdv(alignmentMethod.MethodName); anchorTabPage.Controls.Add(anchorSP); anchorSP.Dock = DockStyle.Fill; anchorTabPage.AutoScroll = true; result = anchorTabPage; break; case Template.AlignmentMethodType.Registration: Template.RegistrationAlignmentMethod registrationAlignmentMethod = (Template.RegistrationAlignmentMethod)alignmentMethod; switch (registrationAlignmentMethod.GetRegistrationMethod.GetRegistrationMethodType) { case Template.RegistrationAlignmentMethod.RegistrationMethodType.KAZE: Template.RegistrationAlignmentMethod.KazeRegistrationMethod kazeRegistrationMethod = (Template.RegistrationAlignmentMethod.KazeRegistrationMethod)registrationAlignmentMethod.GetRegistrationMethod; KazeSettingsControl kazeSettingsControl = new KazeSettingsControl(kazeRegistrationMethod.GetKazeData, registrationAlignmentMethod.GetUseStoredModelFeatures, registrationAlignmentMethod.PipelineIndex); kazeSettingsControl.OnSetDataEvent += (Template.RegistrationAlignmentMethod.KazeRegistrationMethod.KazeData kazeData, bool useStoredModelFeatures, int pipelineIndex) => { Template.RegistrationAlignmentMethod _registrationAlignmentMethod = (Template.RegistrationAlignmentMethod)mainAlignmentPipeline[pipelineIndex]; string methodName = registrationAlignmentMethod.MethodName; IInputArray inputImage = registrationAlignmentMethod.GetSourceImage; Size outputWidth = registrationAlignmentMethod.GetOutputWidth; Template.RegistrationAlignmentMethod kazeAlignmentMethod = new Template.RegistrationAlignmentMethod(pipelineIndex, methodName, new Template.RegistrationAlignmentMethod.KazeRegistrationMethod(kazeData), inputImage, outputWidth); testAlignmentPipeline[pipelineIndex] = kazeAlignmentMethod; }; kazeSettingsControl.OnResetDataEvent += (object sender, int pipelineIndex) => { Template.RegistrationAlignmentMethod _registrationAlignmentMethod = (Template.RegistrationAlignmentMethod)mainAlignmentPipeline[pipelineIndex]; Template.RegistrationAlignmentMethod.KazeRegistrationMethod _kazeRegistrationMethod = (Template.RegistrationAlignmentMethod.KazeRegistrationMethod)_registrationAlignmentMethod.GetRegistrationMethod; var kSC = (KazeSettingsControl)sender; kSC.InitializeKazePanel(_kazeRegistrationMethod.GetKazeData, _registrationAlignmentMethod.GetUseStoredModelFeatures); testAlignmentPipeline[pipelineIndex] = mainAlignmentPipeline[pipelineIndex]; }; TabPageAdv kazeTabPage = new TabPageAdv(alignmentMethod.MethodName); kazeTabPage.Controls.Add(kazeSettingsControl); kazeSettingsControl.Dock = DockStyle.Top; kazeTabPage.AutoScroll = true; result = kazeTabPage; break; case Template.RegistrationAlignmentMethod.RegistrationMethodType.AKAZE: Template.RegistrationAlignmentMethod.AKazeRegistrationMethod akazeRegistrationMethod = (Template.RegistrationAlignmentMethod.AKazeRegistrationMethod)registrationAlignmentMethod.GetRegistrationMethod; AKazeSettingsControl aKazeSettingsControl = new AKazeSettingsControl(akazeRegistrationMethod.GetAKazeData, registrationAlignmentMethod.GetUseStoredModelFeatures, registrationAlignmentMethod.PipelineIndex); aKazeSettingsControl.OnSetDataEvent += (Template.RegistrationAlignmentMethod.AKazeRegistrationMethod.AKazeData akazeData, bool useStoredModelFeatures, int pipelineIndex) => { Template.RegistrationAlignmentMethod _registrationAlignmentMethod = (Template.RegistrationAlignmentMethod)mainAlignmentPipeline[pipelineIndex]; string methodName = registrationAlignmentMethod.MethodName; IInputArray inputImage = registrationAlignmentMethod.GetSourceImage; Size outputWidth = registrationAlignmentMethod.GetOutputWidth; Template.RegistrationAlignmentMethod akazeAlignmentMethod = new Template.RegistrationAlignmentMethod(pipelineIndex, methodName, new Template.RegistrationAlignmentMethod.AKazeRegistrationMethod(akazeData), inputImage, outputWidth); testAlignmentPipeline[pipelineIndex] = akazeAlignmentMethod; }; aKazeSettingsControl.OnResetDataEvent += (object sender, int pipelineIndex) => { Template.RegistrationAlignmentMethod _registrationAlignmentMethod = (Template.RegistrationAlignmentMethod)mainAlignmentPipeline[pipelineIndex]; Template.RegistrationAlignmentMethod.AKazeRegistrationMethod _akazeRegistrationMethod = (Template.RegistrationAlignmentMethod.AKazeRegistrationMethod)_registrationAlignmentMethod.GetRegistrationMethod; var akSC = (AKazeSettingsControl)sender; akSC.InitializeAKazePanel(_akazeRegistrationMethod.GetAKazeData, _registrationAlignmentMethod.GetUseStoredModelFeatures); testAlignmentPipeline[pipelineIndex] = mainAlignmentPipeline[pipelineIndex]; }; TabPageAdv akazeTabPage = new TabPageAdv(alignmentMethod.MethodName); akazeTabPage.Controls.Add(aKazeSettingsControl); aKazeSettingsControl.Dock = DockStyle.Top; akazeTabPage.AutoScroll = true; result = akazeTabPage; break; } break; } return(result); }
public LinkedParsedPacket(TabPageAdv tabPage) { _tabPage = tabPage; }
public TabCancelEventArgs(TabPageAdv tab) { Tab = tab; }
public TabEventArgs(TabPageAdv tab) { this.Tab = tab; }