private void InitUI() { //parent dari canvas editor = new DefaultEditor(); //genereate menu bar MenuStrip MenuBar = new MenuStrip(); ToolStripMenuItem file = new ToolStripMenuItem("File"); ToolStripMenuItem edit = new ToolStripMenuItem("Edit"); ToolStripMenuItem arrange = new ToolStripMenuItem("Arrange"); ToolStripMenuItem sendToBack = new ToolStripMenuItem("Send to back"); sendToBack.Click += SendToBack_Click; ToolStripMenuItem sendToFront = new ToolStripMenuItem("Send to front"); sendToFront.Click += SendToFront_Click; ToolStripMenuItem newFile = new ToolStripMenuItem("New"); newFile.Click += NewFile_Click; ToolStripMenuItem removeFile = new ToolStripMenuItem("Remove current canvas"); removeFile.Click += RemoveFile_Click; ToolStripMenuItem newplugin = new ToolStripMenuItem("Add Plugin"); newplugin.Click += Newplugin_Click; ToolStripMenuItem exportToImages = new ToolStripMenuItem("Export to Images"); exportToImages.Click += ExportToImages_Click; ToolStripMenuItem groupObject = new ToolStripMenuItem("Group current and previous object"); groupObject.Click += GroupObject_Click; ToolStripMenuItem unGroupObject = new ToolStripMenuItem("Ungroup Object"); unGroupObject.Click += UnGroupObject_Click; ToolStripMenuItem deleteObject = new ToolStripMenuItem("Delete seleceted object"); deleteObject.Click += DeleteObject_Click; ToolStripMenuItem exit = new ToolStripMenuItem("Exit"); exit.Click += Exit_Click; ToolStripMenuItem undo = new ToolStripMenuItem("Undo"); ToolStripMenuItem redo = new ToolStripMenuItem("Redo"); ToolStripMenuItem resizecanvas = new ToolStripMenuItem("Resize Canvas"); resizecanvas.Click += Resizecanvas_Click; ToolStripContainer toolContainer = new ToolStripContainer(); toolContainer.ContentPanel.Controls.Add((System.Windows.Forms.Control)editor); curCanvas = new DefaultCanvas(undoRedo); curCanvas.Name = "Main"; editor.AddCanvas(curCanvas); // Generate Toolbar toolbar = new DefaultToolbar(); ToolStripContainer toolStripContainer = new ToolStripContainer(); toolStripContainer.Height = 32; toolStripContainer.TopToolStripPanel.Controls.Add((System.Windows.Forms.Control) this.toolbar); UndoToolbarItem undoItem = new UndoToolbarItem(undoRedo, curCanvas); RedoToolbarItem redoItem = new RedoToolbarItem(undoRedo, curCanvas); toolbar.AddToolbarItem(undoItem); toolbar.AddToolbarItem(redoItem); toolbar.AddSeparator(); toolStripContainer.Dock = DockStyle.Top; //meyusun menu bar MenuBar.Items.Add(file); MenuBar.Items.Add(edit); MenuBar.Items.Add(arrange); edit.DropDown.Items.Add(undo); edit.DropDown.Items.Add(redo); edit.DropDown.Items.Add(resizecanvas); edit.DropDown.Items.Add(deleteObject); file.DropDown.Items.Add(newFile); file.DropDown.Items.Add(newplugin); file.DropDown.Items.Add(exportToImages); file.DropDown.Items.Add(removeFile); file.DropDown.Items.Add(exit); arrange.DropDown.Items.Add(sendToBack); arrange.DropDown.Items.Add(sendToFront); arrange.DropDown.Items.Add(groupObject); arrange.DropDown.Items.Add(unGroupObject); MenuBar.Dock = DockStyle.Top; //set size form this.Height = this.tinggi; this.Width = this.lebar; //deklarasi accordion form Accordion acc = new Accordion(); acc.CheckBoxMargin = new Padding(2); acc.ContentMargin = new Padding(5, 5, 5, 5); acc.ContentPadding = new Padding(1); acc.Insets = new Padding(5); acc.ControlBackColor = System.Drawing.Color.White; acc.Width = 200; //deklarasi panel pertama //deklarasi size button int tinggi = 100; int lebar = 100; tlp = new DefaultToolbox(); tlp.TabStop = true; tlp.MaximumSize = new Size(new Point(300)); Tools.SelectionTool pilih = new Tools.SelectionTool(undoRedo); pilih.Height = tinggi; pilih.Width = lebar; pilih.Image = null; pilih.BackgroundImage = Resources.Assets.cursor; pilih.BackgroundImageLayout = ImageLayout.Zoom; tlp.AddTool(pilih); Tools.TextTool txtTool = new Tools.TextTool(); txtTool.Height = tinggi; txtTool.Width = lebar; txtTool.Image = null; txtTool.BackgroundImage = Resources.Assets.font; txtTool.BackgroundImageLayout = ImageLayout.Zoom; tlp.AddTool(txtTool); if (plugins != null) { for (int i = 0; i < this.plugins.Length; i++) { this.tlp.Register(plugins[i]); } } acc.Add((System.Windows.Forms.Control)tlp, "Wireframes", "Enter the client's information.", 0, true);//memasukkan panel pertama acc.Add(new System.Windows.Forms.TextBox { Dock = DockStyle.Fill, Multiline = true, BackColor = Color.White }, "Memo", "Additional Client Info", 1, true, contentBackColor: Color.Transparent); //menambahkan panel kedua acc.Dock = DockStyle.Fill; mainPanel.Dock = DockStyle.Fill; mainPanel.Panel1.Controls.Add(acc); mainPanel.FixedPanel = FixedPanel.Panel1; mainPanel.MinimumSize = new Size(300, 200); mainPanel.Panel2.BackColor = System.Drawing.Color.White; toolContainer.Dock = DockStyle.Fill; mainPanel.Panel2.Controls.Add(toolContainer); mainPanel.SplitterWidth = 15; mainPanel.SplitterDistance = 300; Controls.Add(mainPanel); Controls.Add(toolStripContainer); Controls.Add(MenuBar); this.tlp.ToolSelected += Toolbox_ToolSelected; newSVGToolPhone("phone-line.svg"); newSVGToolWireframe("chatting.svg"); newSVGToolWireframe("image-feed.svg"); newSVGToolWireframe("insta-feed.svg"); newSVGToolWireframe("list.svg"); newSVGToolWireframe("login.svg"); newSVGToolWireframe("modal-popup.svg"); newSVGToolWireframe("product-detail.svg"); newSVGToolWireframe("user-feed.svg"); newSVGToolWireframe("video-detail.svg"); newSVGToolWireframe("post-with-image.svg"); }
public AOIAnalysisTab(HomeScreen _homeScreen) { homeScreen = _homeScreen; List <CheckBox> checkboxListFaceTracking = new List <CheckBox>(); TableLayoutPanel pnl_main_AOIAnalysis = new TableLayoutPanel { Dock = DockStyle.Fill, BackColor = Color.WhiteSmoke, Size = new Size(800, 800), AutoSizeMode = AutoSizeMode.GrowAndShrink }; pnl_main_AOIAnalysis.Margin = new Padding(0); pnl_main_AOIAnalysis.ColumnCount = 1; pnl_main_AOIAnalysis.RowCount = 1; Accordion accParentfaceTracking = acc; acc.Insets = new Padding(10); acc.ContentPadding = new Padding(10); acc.ContentMargin = new Padding(0); acc.CheckBoxMargin = new Padding(0); /*Face Tracking Tab*/ /**************************************************************************/ FaceTrackingUI faceTrackingUI = new FaceTrackingUI(homeScreen); FaceTrackingBE ft = new FaceTrackingBE(faceTrackingUI); accNestedaccParentfaceTracking = new Accordion() { Dock = DockStyle.Fill, OpenOneOnly = true }; checkboxListFaceTracking.Add(accNestedaccParentfaceTracking.Add(faceTrackingUI.pnl_trackingWithDefaultDetector, "Face Tracking (wtih default detector)")); checkboxListFaceTracking.Add(accNestedaccParentfaceTracking.Add(faceTrackingUI.pnl_trackingWithTrainedDetector, "Face Tracking (with trained detector)")); checkboxListFaceTracking.Add(accParentfaceTracking.Add(accNestedaccParentfaceTracking, "Face Tracking", "ToolTip 1")); /*End of Face Tracking*/ /*Detect ROI */ /**************************************************************************/ DetectROIUI detectROIUI = new DetectROIUI(homeScreen); DetectROIBE droi = new DetectROIBE(detectROIUI); accNestedaccParentdetectROI = new Accordion() { Dock = DockStyle.Fill, OpenOneOnly = true }; checkboxListFaceTracking.Add(accNestedaccParentdetectROI.Add(detectROIUI.pnl_preProcessGazeData, "Pre-Process Gaze Data")); checkboxListFaceTracking.Add(accNestedaccParentdetectROI.Add(detectROIUI.pnl_faceAsAOI, " Face as AOI")); checkboxListFaceTracking.Add(accParentfaceTracking.Add(accNestedaccParentdetectROI, "AOI Anaylse", "ToolTip 1")); /*End of Detect ROI*/ /*Review Outcomes */ /**************************************************************************/ ReviewOutcomesUI reviewOutcomesUI = new ReviewOutcomesUI(homeScreen); ReviewOutcomesBE ro = new ReviewOutcomesBE(reviewOutcomesUI); accNestedaccParentreviewOutcomes = new Accordion() { Dock = DockStyle.Fill, OpenOneOnly = true }; checkboxListFaceTracking.Add(accNestedaccParentreviewOutcomes.Add(reviewOutcomesUI.pnl_visualizeTrackingResults, "Visualize Tracking")); checkboxListFaceTracking.Add(accNestedaccParentreviewOutcomes.Add(reviewOutcomesUI.pnl_findDetectionRatio, "Find AOIs Detection Ratio")); checkboxListFaceTracking.Add(accNestedaccParentreviewOutcomes.Add(reviewOutcomesUI.pnl_labelAOIMAnually, "Label AOIs Manually")); checkboxListFaceTracking.Add(accNestedaccParentreviewOutcomes.Add(reviewOutcomesUI.pnl_reanalyseAOI, "Re-analyse AOIs (considering manually labeled AOIs)")); checkboxListFaceTracking.Add(accParentfaceTracking.Add(accNestedaccParentreviewOutcomes, "Review Outcomes", "ToolTip 1")); /*End of Review Outcomes*/ pnl_main_AOIAnalysis.Controls.Add(acc); Controls.Add(pnl_main_AOIAnalysis); }
public SpeechAnalysisTab(HomeScreen _homeScreen) { homeScreen = _homeScreen; List <CheckBox> checkboxList = new List <CheckBox>(); TableLayoutPanel pnl_main_speechAnalysis = new TableLayoutPanel { Dock = DockStyle.Fill, BackColor = Color.WhiteSmoke, Size = new Size(800, 800), AutoSizeMode = AutoSizeMode.GrowAndShrink }; pnl_main_speechAnalysis.Margin = new Padding(0); pnl_main_speechAnalysis.ColumnCount = 1; pnl_main_speechAnalysis.RowCount = 1; Accordion accParent = acc; acc.Insets = new Padding(10); acc.ContentPadding = new Padding(10); acc.ContentMargin = new Padding(0); acc.CheckBoxMargin = new Padding(0); /*Extract and Format Audio Tab*/ /**************************************************************************/ ExtractAndFormatAudioUI extractAndFormatAudioUI = new ExtractAndFormatAudioUI(homeScreen); ExtractAndFormatAudioBE efa = new ExtractAndFormatAudioBE(extractAndFormatAudioUI); checkboxList.Add(accParent.Add(extractAndFormatAudioUI.pnl_extractAndFormatAudio, "Extract and Format Audio", "ToolTip 1")); /*End of Extract and Format Audio*/ /*Segment Audio*/ /**************************************************************************/ SegmentAudioUI segmentAudioUI = new SegmentAudioUI(homeScreen); SegmentAudioBE sa = new SegmentAudioBE(segmentAudioUI); checkboxList.Add(accParent.Add(segmentAudioUI.pnl_SegmentAudio, "Segment Audio", "ToolTip 2")); /*End of Segment Audio*/ /*Time Interval Specification (also,Synchronization for Multiple Recordings) Tab*/ /**************************************************************************/ SpecifyTimeIntervalUI specifyTimeIntervalUI = new SpecifyTimeIntervalUI(homeScreen); SpecifyTimeIntervalBE sti = new SpecifyTimeIntervalBE(specifyTimeIntervalUI); checkboxList.Add(accParent.Add(specifyTimeIntervalUI.pnl_specifyTimeInterval, "Time Interval Estimation (also, Syncronization for Multiple Recordings)", "ToolTip 3")); /*End of Time Interval Specification (also, Synchronization for Multiple Recordings) Tab*/ /*Speech-Act Annotation Tab*/ /**************************************************************************/ SpeechActAnnotationUI speechActAnnotationUI = new SpeechActAnnotationUI(homeScreen); SpeechActAnnotationBE saa = new SpeechActAnnotationBE(speechActAnnotationUI); accNested = new Accordion() { Dock = DockStyle.Fill, OpenOneOnly = true }; checkboxList.Add(accNested.Add(speechActAnnotationUI.pnl_defineSpeechAct, "Define Speech-Acts")); checkboxList.Add(accNested.Add(speechActAnnotationUI.pnl_annotation, "Annotation")); checkboxList.Add(accParent.Add(accNested, "Speech Annotation", "ToolTip 4")); /*Speech-Act Annotation Tab*/ pnl_main_speechAnalysis.Controls.Add(acc); Controls.Add(pnl_main_speechAnalysis); // Controls.Add(acc); }
private void InitializeRatesTab() { var acc = new Accordion { CheckBoxMargin = new Padding(2), ContentMargin = new Padding(15, 5, 15, 5), ContentPadding = new Padding(1), Insets = new Padding(5), ControlBackColor = Color.White, ContentBackColor = Color.CadetBlue }; panel_activity_rates_parent.Controls.Add(acc); panel_language_rate.Dock = DockStyle.Fill; panel_hourly_rate.Dock = DockStyle.Fill; panel_custom_rate.Dock = DockStyle.Fill; acc.Add(panel_language_rate, "Language Rate", PluginResources.Select_a_language_rate, 0, true, contentBackColor: Color.Transparent); acc.Add(panel_hourly_rate, "Hourly Rate", PluginResources.Specify_an_hourly_rate, 1, true, contentBackColor: Color.Transparent); acc.Add(panel_custom_rate, "Custom Rate", PluginResources.Specify_a_custom_rate, 0, false, contentBackColor: Color.Transparent); checkBox_hourly_rate_CheckedChanged(null, null); checkBox_pem_rate_CheckedChanged(null, null); checkBox_custome_rate_CheckedChanged(null, null); checkBox_custom_rate.Checked = Activity.CustomRateChecked; textBox_custom_rate_description.Text = Activity.DocumentActivityRates.CustomRateDescription; numericUpDown_custom_rate_total.Value = Convert.ToDecimal(Activity.DocumentActivityRates.CustomRateTotal); textBox_hourly_rate_description.Text = Activity.DocumentActivityRates.HourlyRateDescription; textBox_language_rate_description.Text = Activity.DocumentActivityRates.LanguageRateDescription; if (objectListView_documents.Items.Count > 0) { checkBox_language_rate.Enabled = true; } else { checkBox_language_rate.Enabled = false; checkBox_language_rate.Checked = false; } ActivityRates = Activity.DocumentActivityRates.Clone() as ActivityRates; #region | PEM combobox | comboBox_pem_rates.BeginUpdate(); comboBox_pem_rates.Items.Clear(); var _cbi = new ComboboxItem(@"<empty>", null); comboBox_pem_rates.Items.Add(_cbi); if (IsEdit) { if (Activity.DocumentActivityRates.LanguageRateId > -1 && Activity.DocumentActivityRates.LanguageRateName.Trim() != string.Empty) { var cbi = new ComboboxItem(Activity.DocumentActivityRates.LanguageRateName + @" <saved version>", Activity.DocumentActivityRates.Clone() as ActivityRates); comboBox_pem_rates.Items.Add(cbi); } } foreach (var prg in Tracked.Settings.LanguageRateGroups) { var cbi = new ComboboxItem(prg.Name, prg.Clone() as LanguageRateGroup); comboBox_pem_rates.Items.Add(cbi); } comboBox_pem_rates.Sorted = true; comboBox_pem_rates.EndUpdate(); #endregion if (!IsEdit) { #region | hourly rate | linkLabel_get_default_hourly_rate_LinkClicked(null, null); linkLabel_get_total_hours_elapsed_from_documents_LinkClicked(null, null); calculate_hourly_rate(); if (numericUpDown_hourly_rate_total.Value > 0) { checkBox_hourly_rate.Checked = true; } #endregion #region | PEM Rate | var selectedIndex = 0; var foundPriceRateGroup = false; LanguageRateGroup prg = null; if (CompanyProfile != null && CompanyProfile.Id > -1) { foreach (ComboboxItem cbi in comboBox_pem_rates.Items) { if (cbi.Value != null && cbi.Value.GetType() == typeof(LanguageRateGroup)) { prg = (LanguageRateGroup)cbi.Value; if (prg.Id == CompanyProfile.ProfileRate.LanguageRateId) { foundPriceRateGroup = true; break; } selectedIndex++; } else { selectedIndex++; } } } comboBox_pem_rates.SelectedIndex = foundPriceRateGroup ? selectedIndex : 0; if (objectListView_documents.Items.Count > 0) { checkBox_language_rate.Checked = foundPriceRateGroup; SetActivityRateFromLanguageRate(prg); } #endregion checkBox_includeTagsInComparison.Checked = CompanyProfile == null || CompanyProfile.ComparerOptions.IncludeTagsInComparison; checkBox_group_changes.Checked = CompanyProfile == null || CompanyProfile.ComparerOptions.ConsolidateChanges; comboBox_comparisonType.SelectedIndex = CompanyProfile != null ? CompanyProfile.ComparerOptions.ComparisonType : 0; } else { #region | hourly rate | numericUpDown_hourly_rate_rate.Value = Convert.ToDecimal(Activity.DocumentActivityRates.HourlyRateRate); numericUpDown_hourly_rate_hours.Value = Convert.ToDecimal(Activity.DocumentActivityRates.HourlyRateQuantity); numericUpDown_hourly_rate_total.Value = Convert.ToDecimal(Activity.DocumentActivityRates.HourlyRateTotal); checkBox_hourly_rate.Checked = Activity.HourlyRateChecked; label_hourly_rate_curency.Text = Activity.DocumentActivityRates.HourlyRateCurrency; #endregion #region | PEM Rate | var selectedIndex = 0; var foundPriceRateGroup = false; if (Activity.DocumentActivityRates.LanguageRateId > -1 && Activity.DocumentActivityRates.LanguageRateName.Trim() != string.Empty) { foreach (ComboboxItem cbi in comboBox_pem_rates.Items) { if (cbi.Value != null && cbi.Value.GetType() == typeof(ActivityRates)) { var prg = cbi.Value as ActivityRates; if (prg != null && prg.LanguageRateId == Activity.DocumentActivityRates.LanguageRateId) { foundPriceRateGroup = true; break; } selectedIndex++; } else { selectedIndex++; } } } if (!foundPriceRateGroup) { foreach (ComboboxItem cbi in comboBox_pem_rates.Items) { if (cbi.Value != null && cbi.Value.GetType() == typeof(LanguageRateGroup)) { var prg = (LanguageRateGroup)cbi.Value; if (prg.Id == Activity.DocumentActivityRates.LanguageRateId) { foundPriceRateGroup = true; break; } selectedIndex++; } else { selectedIndex++; } } } comboBox_pem_rates.SelectedIndex = foundPriceRateGroup ? selectedIndex : 0; checkBox_language_rate.Checked = Activity.LanguageRateChecked; numericUpDown_pem_rate_total.Value = Convert.ToDecimal(Activity.DocumentActivityRates.LanguageRateTotal); if (foundPriceRateGroup) { label_rate_currency.Text = Activity.DocumentActivityRates.LanguageRateCurrency; label_hourly_rate_curency.Text = Activity.DocumentActivityRates.HourlyRateCurrency; } else { label_rate_currency.Text = Tracked.Settings.GetGeneralProperty("defaultCurrency").Value; } #endregion checkBox_includeTagsInComparison.Checked = Activity.ComparisonOptions.IncludeTagsInComparison; checkBox_group_changes.Checked = Activity.ComparisonOptions.ConsolidateChanges; comboBox_comparisonType.SelectedIndex = Activity.ComparisonOptions.ComparisonType; } Activity.DocumentActivityRates.CustomRateCurrency = Activity.DocumentActivityRates.HourlyRateCurrency; label_custom_rate_currency.Text = Activity.DocumentActivityRates.CustomRateCurrency; label_hourly_rate_curency_TextChanged(null, null); comboBox_billable_SelectedIndexChanged(null, null); if (comboBox_pem_rates.SelectedIndex == 0) { label_rate_currency.Text = label_hourly_rate_curency.Text; } }
/// <summary> /// verarbeitet die Lageliste aus dem Dash und erstellt dynamisch Tabpages, Akkordions und zusatinfo Panele /// </summary> /// <param name="lagerListe">die Lagerliste, übergeben vom Dashboard</param> public void UpdateForm() { //Reset Form VerwaltungTabcontrol.Controls.Clear(); VerwaltungTabcontrol.SelectedIndexChanged += OnChangedTab; //expand wenn checkbox if (ForceCheckbox.Checked == true) { Opulos.Core.UI.Accordion.OpenOnAdd = true; } else { Opulos.Core.UI.Accordion.OpenOnAdd = false; } var lagerListe = DB.SqlStatements.HoleLager(); foreach (LagerModel l in lagerListe.Values) { TabPage tp = new TabPage(l.Name); _lagerAccordion = new Accordion(); _lagerAccordion.GotFocus += OnFocusedPanel; tp.Controls.Add(_lagerAccordion); VerwaltungTabcontrol.TabPages.Add(tp); var regalListe = DB.SqlStatements.HoleRegal(-1, l.Lager_ID); foreach (RegalModel r in regalListe.Values) { Accordion nestedRegal = new Accordion(); nestedRegal.Name = r.Name; nestedRegal.Tag = r.Regal_ID; nestedRegal.GotFocus += OnFocusedPanel; _lagerAccordion.Add(nestedRegal, r.Name); var regalFachListe = DB.SqlStatements.HoleRegalfach(-1, r.Regal_ID); foreach (RegalfachModel f in regalFachListe.Values) { Accordion nestedFach = new Accordion(); nestedFach.GotFocus += OnFocusedPanel; nestedFach.Name = f.Name; nestedFach.Tag = f.Regalfach_ID; Panel infoPanel = new Panel(); Label name = new Label(); var paketListe = DB.SqlStatements.HolePaket(-1, f.Regalfach_ID); if (paketListe.Count > 0) { //im Fach ist ein Paketregistriert-> die restlichen Infos zum Paket anzeigen name.Text = "Inhalt: " + paketListe.First().Value.Produkt_ID; Label Menge = new Label(); Label Breite = new Label(); Label Hoehe = new Label(); Label Laenge = new Label(); Label Haltbarkeit = new Label(); Label Erstellt = new Label(); Label Geaendert = new Label(); Label Anschaffungsgrund = new Label(); Menge.Left = 100; Menge.Text = "Menge: " + paketListe.Count; Breite.Left = 200; Breite.Text = "Breite: " + paketListe.First().Value.Breite; Hoehe.Left = 300; Hoehe.Text = "Höhe: " + paketListe.First().Value.Hoehe; Laenge.Left = 400; Laenge.Text = "Länge: " + paketListe.First().Value.Laenge; Haltbarkeit.Left = 500; Haltbarkeit.Text = "Haltbarkeit: " + paketListe.First().Value.Haltbarkeit; Erstellt.Left = 600; Erstellt.Text = "Erstellt: " + paketListe.First().Value.Erstellt_Am; Geaendert.Left = 700; Geaendert.Text = "Geaendert: " + paketListe.First().Value.Zuletzt_Geaendert; Anschaffungsgrund.Top = 25; Anschaffungsgrund.Text = "Anschaffungsgrund: " + paketListe.First().Value.Anschaffungsgrund; Anschaffungsgrund.Width = Anschaffungsgrund.Width + 400; infoPanel.Controls.Add(name); infoPanel.Controls.Add(Menge); infoPanel.Controls.Add(Breite); infoPanel.Controls.Add(Hoehe); infoPanel.Controls.Add(Laenge); infoPanel.Controls.Add(Haltbarkeit); infoPanel.Controls.Add(Erstellt); infoPanel.Controls.Add(Geaendert); infoPanel.Controls.Add(Anschaffungsgrund); nestedRegal.Add(nestedFach, paketListe.First().Value.Name + " | " + paketListe.First().Value.Produkt_ID); } else { name.Text = "Leer"; infoPanel.Controls.Add(name); nestedRegal.Add(nestedFach, f.Name); } nestedFach.Controls.Add(infoPanel); } } } _lastFocusedAccordion = _lagerAccordion; if (VerwaltungTabcontrol.TabPages.Count > 0) { _lastFocusedPage = VerwaltungTabcontrol.TabPages[0]; } else { _lastFocusedPage = null; } }
private void AccordionSet() { accIndicator.SuspendLayout(); accIndicator.Controls.Clear(); accIndicator.CheckBoxMargin = new Padding(1); accIndicator.ContentMargin = new Padding(15, 5, 15, 5); accIndicator.ContentPadding = new Padding(1); accIndicator.Insets = new Padding(5); accIndicator.AddResizeBars = false; accIndicator.Font = new System.Drawing.Font("Century Gothic", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); DataTable dtIndi, dtCrit, dtElement, dtFlow, dtFlowLines = new DataTable(); dtIndi = extensions.SQLiteDatabaseCommand.itemsList("tblIndicator", KRAId); int e = 0; e = 0; foreach (DataRow row in dtIndi.Rows) { Accordion accCritiria = new Accordion(); accCritiria.Margin = new System.Windows.Forms.Padding(5); accCritiria.CheckBoxMargin = new Padding(2); accCritiria.ContentMargin = new Padding(15, 5, 15, 5); accCritiria.ContentPadding = new Padding(1); accCritiria.Insets = new Padding(5); accCritiria.FillHeight = false; accCritiria.OpenOneOnly = true; accCritiria.AddResizeBars = false; accCritiria.Font = new System.Drawing.Font("Century Gothic", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); dtCrit = extensions.SQLiteDatabaseCommand.itemsList("tblCritiria", dtIndi.Rows[e][3].ToString()); int c = 0; foreach (DataRow rowC in dtCrit.Rows) { Accordion accElement = new Accordion(); accElement.Margin = new System.Windows.Forms.Padding(5); accElement.CheckBoxMargin = new Padding(2); accElement.ContentMargin = new Padding(15, 5, 15, 5); accElement.ContentPadding = new Padding(1); accElement.Insets = new Padding(5); accElement.FillHeight = false; accElement.OpenOneOnly = true; accElement.AddResizeBars = false; accElement.Font = new System.Drawing.Font("Century Gothic", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); dtElement = extensions.SQLiteDatabaseCommand.itemsList("tblElement", dtCrit.Rows[c][2].ToString()); int el = 0; foreach (DataRow rowE in dtElement.Rows) { Accordion accFlowChart = new Accordion(); accFlowChart.Margin = new System.Windows.Forms.Padding(5); accFlowChart.CheckBoxMargin = new Padding(2); accFlowChart.ContentMargin = new Padding(15, 5, 15, 5); accFlowChart.ContentPadding = new Padding(1); accFlowChart.Insets = new Padding(5); accFlowChart.FillHeight = false; accFlowChart.OpenOneOnly = true; accFlowChart.AddResizeBars = false; accFlowChart.Font = new System.Drawing.Font("Century Gothic", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); dtFlow = extensions.SQLiteDatabaseCommand.itemsList("tblFlowChart", dtElement.Rows[el][2].ToString()); int f = 0; foreach (DataRow rowF in dtFlow.Rows) { Accordion accFlowChartLines = new Accordion(); accFlowChartLines.Margin = new System.Windows.Forms.Padding(5); accFlowChartLines.CheckBoxMargin = new Padding(2); accFlowChartLines.ContentMargin = new Padding(15, 5, 15, 5); accFlowChartLines.ContentPadding = new Padding(1); accFlowChartLines.Insets = new Padding(5); accFlowChartLines.FillHeight = false; accFlowChartLines.OpenOneOnly = true; accFlowChartLines.AddResizeBars = false; accFlowChartLines.Font = new System.Drawing.Font("Century Gothic", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); dtFlowLines = extensions.SQLiteDatabaseCommand.getFlowChartLines(dtFlow.Rows[f][2].ToString()); int fl = 0; TableLayoutPanel tlp = new TableLayoutPanel { Dock = DockStyle.Fill, Padding = new Padding(5) }; tlp.Dock = DockStyle.Fill; foreach (DataRow rowFL in dtFlowLines.Rows) { LinkLabel lnkLbl = new LinkLabel(); lnkLbl.Name = "lnkLabel" + dtFlowLines.Rows[fl][2].ToString(); lnkLbl.Text = "Open"; lnkLbl.AccessibleDescription = dtFlowLines.Rows[fl][0].ToString(); lnkLbl.Click += new EventHandler(fcl_Click); lnkLbl.AutoSize = true; tlp.TabStop = true; tlp.Controls.Add(new Label() { Text = dtFlowLines.Rows[fl][2].ToString(), AutoSize = true, TextAlign = ContentAlignment.BottomLeft, Font = new System.Drawing.Font("Century Gothic", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))) }, 0, fl); tlp.Controls.Add(lnkLbl, 1, fl); fl++; } accFlowChart.Add(tlp, dtFlow.Rows[f][1].ToString(), dtFlow.Rows[f][1].ToString(), 1, true); accFlowChart.Close(); accFlowChart.OpenOnAdd = false; f++; } accElement.Add(accFlowChart, dtElement.Rows[el][1].ToString(), dtElement.Rows[el][1].ToString(), 1, true); accElement.Close(); accElement.OpenOnAdd = false; el++; } accCritiria.Add(accElement, dtCrit.Rows[c][1].ToString(), dtCrit.Rows[c][1].ToString(), 1, true); accCritiria.Close(); accIndicator.OpenOnAdd = false; c++; } accIndicator.ResumeLayout(true); accIndicator.Add(accCritiria, dtIndi.Rows[e][2].ToString() + ": " + dtIndi.Rows[e][1].ToString(), dtIndi.Rows[e][2].ToString() + ": " + dtIndi.Rows[e][1].ToString(), 1, true); accIndicator.Close(); accIndicator.OpenOnAdd = false; e++; } }