private void EventUserFilter_OnItemSelectionChanged(object sender, ItemSelectionChangedEventArgs e) { CheckComboBox emitter = (CheckComboBox)sender; string[] items = emitter.SelectedItems.Cast <string>().ToArray(); UpdateFilter("EventUser", new EventUserFilter(items)); }
private void InitControls() { #region Customer cboCustomer.Params.Add("strCompType", "C"); cboCustomer.BindDataSet(); #endregion Customer #region Model Type cboType.Params.Add("strItem", "MODEL_TYPE"); cboType.BindDataSet(); #endregion Model Type CheckComboBox cbotmp = new CheckComboBox() { Sql = "CommonSearch#getCommonItems" }; cbotmp.Params.Add("strItem", "QTY_CODE"); cbotmp.BindDataSet(); dt_QtyCd = cbotmp.DataSource; cbotmp.Sql = "CommonSearch#getCompList"; cbotmp.Params.Clear(); cbotmp.Params.Add("strCompType", "V"); cbotmp.BindDataSet(); dt_VendorCd = cbotmp.DataSource; rdoCust.Checked = true; }
public pComboCheckList(string InstanceName) { //Set Element info setup Element = new CheckComboBox(); Element.Name = InstanceName; Type = "CheckComboBox"; //Set "Clear" appearance to all elements }
private WatermarkCheckComboBoxBehavior(CheckComboBox comboBox) { if (comboBox == null) { throw new ArgumentNullException("comboBox"); } m_ComboBox = comboBox; }
public override void OnApplyTemplate() { base.OnApplyTemplate(); _combo = GetTemplateChild("Combo") as CheckComboBox; if (ValidateOnLoad) { IsValid(); } }
private void InitControls() { #region Model Type cboType.Params.Add("strItem", "MODEL_TYPE"); cboType.BindDataSet(); #endregion Model Type #region 장비상태 cboStatus.Params.Add("strItem", "EQP_STATUS"); cboStatus.BindDataSet(); _dtStatus = cboStatus.DataSource; #endregion 장비상태 CheckComboBox cbo = new CheckComboBox() { Sql = "CommonSearch#getUserList" }; cbo.Params.Clear(); cbo.Params.Add("strCompType", "M,C,V"); cbo.BindDataSet(); _dtUser = cbo.DataSource; cbo = new CheckComboBox() { Sql = "CommonSearch#getCompList" }; cbo.Params.Clear(); cbo.Params.Add("strCompType", "M,C,V"); cbo.BindDataSet(); _dtComp = cbo.DataSource; cbo = new CheckComboBox() { Sql = "CommonSearch#getVerList" }; cbo.Params.Clear(); cbo.Params.Add("strModel", ""); cbo.BindDataSet(); _dtVer = cbo.DataSource; cbo = new CheckComboBox() { Sql = "CommonSearch#getManagerCode" }; cbo.Params.Clear(); cbo.Params.Add("strCompCode", ""); cbo.BindDataSet(); _dtMgrCode = cbo.DataSource; DataRow nr = _dtMgrCode.NewRow(); nr["ITEM_CD"] = ""; nr["ITEM_NM"] = "(선택없음)"; _dtMgrCode.Rows.Add(nr); }
private void EventTypeFilter_DropDownOpened(object sender, EventArgs e) { CheckComboBox emitter = (CheckComboBox)sender; if (eventTypeList.Count == 0) { foreach (Node.Node node in App.nodeCollection.nodeList) { eventTypeList.Add(node.aEvent.EventType); } } emitter.ItemsSource = eventTypeList; emitter.Items.Refresh(); }
void CommandUpdateExecute(object parameter) { var values = (object[])parameter; CheckComboBox ccb = (CheckComboBox)values[0]; Page page = (Page)values[1]; foreach (MovieNET.Actor actor in listActorMovie) { id_actors.Add(actor.Id_actor); } serviceClient.DeleteMovieActors(selectedMovie.Id_movie, id_actors); if (ccb.SelectedItems.Count > 0) { for (int i = 0; i < ccb.SelectedItems.Count; i++) { SelectedActors.Add((MovieNET.Actor)ccb.SelectedItems[i]); } } if (SelectedMovieType.Id_type == 0) { Id_movitype = serviceClient.CreateMovieType(MovieType); } if (SelectedDirector.Id_director == 0) { Id_director = serviceClient.CreateDirector(MovieDirectorFirstname, MovieDirectorLastname); } serviceClient.ModifyImage(selectedMovie.Id_image, Image); serviceClient.ModifyMovie(selectedMovie.Id_movie, MovieTitle, MovieSynopsys, new TimeSpan(int.Parse(MovieDurationHour), int.Parse(MovieDurationMin), int.Parse(MovieDurationSec)), Id_movitype, Id_director, selectedMovie.Id_image); id_actors.Clear(); foreach (MovieNET.Actor actor in SelectedActors) { id_actors.Add(actor.Id_actor); } serviceClient.AddMovieActors(id_movie, id_actors); clearPage(); Messenger.Default.Send(id_movie); Messenger.Default.Send(user_co); var PageW = Window.GetWindow(page); PageW.Content = new View.FilmPage(); }
private void EventUserFilter_DropDownOpened(object sender, EventArgs e) { CheckComboBox emitter = (CheckComboBox)sender; if (eventUserList.Count == 0) { //check if the owner property is on the node, then pull the user foreach (Node.Node node in App.nodeCollection.nodeList) { string userID; if (node.aEvent.Parent.GetAllProperties().TryGetValue("RegistryOwner", out userID)) { eventUserList.Add(userID); } } } emitter.ItemsSource = eventUserList; emitter.Items.Refresh(); }
private void Button_Click(object sender, RoutedEventArgs e) { if (CheckComboBoxPanel.Children.Count == 0) { CheckComboBox ccb = new CheckComboBox(); CheckComboBoxPanel.Children.Add(ccb); ccb.SetBinding(CheckComboBox.ItemsSourceProperty, new Binding("AllItems") { Source = DataContext }); ccb.SetBinding(CheckComboBox.SelectedItemsOverrideProperty, new Binding("SelectedItems") { Source = DataContext, Mode = BindingMode.TwoWay }); } else { CheckComboBoxPanel.Children.RemoveAt(0); } }
public static string GetLabel(CheckComboBox obj) { return((string)obj.GetValue(LabelProperty)); }
public static Style GetLabelStyle(CheckComboBox obj) { return((Style)obj.GetValue(LabelStyleProperty)); }
public static void SetLabelStyle(CheckComboBox obj, Style value) { obj.SetValue(LabelStyleProperty, value); }
private void ExcelExport(object sender, EventArgs e) { try { //2021-01-07 hsh 파일명 규칙에 어긋나는 문자열 제거 (초기버전) string path = @"c:\temp\" + txtSubject.Text.Replace("/", "_").Replace(@"\", "_") + ".xlsx"; Excel.Application app = new Excel.Application(); Excel.Workbook work = app.Workbooks.Add(); Excel._Worksheet sheet = (Excel._Worksheet)app.ActiveSheet; app.ActiveWindow.DisplayGridlines = false; CheckComboBox cbo = new CheckComboBox() { Sql = "CommonSearch#getUserGrade" }; cbo.MultiSelection = true; cbo.Params.Clear(); cbo.Params.Add("strCompType", ""); cbo.Params.Add("strCompCode", ""); cbo.BindDataSet(); #region Width / Height 정의 ((Excel.Range)sheet.Cells[1, 1]).EntireColumn.ColumnWidth = 2; ((Excel.Range)sheet.Cells[1, 2]).EntireColumn.ColumnWidth = 2; ((Excel.Range)sheet.Cells[1, 3]).EntireColumn.ColumnWidth = 10.25; ((Excel.Range)sheet.Cells[1, 4]).EntireColumn.ColumnWidth = 21.63; ((Excel.Range)sheet.Cells[1, 5]).EntireColumn.ColumnWidth = 23.63; ((Excel.Range)sheet.Cells[1, 6]).EntireColumn.ColumnWidth = 2; ((Excel.Range)sheet.Cells[1, 1]).EntireRow.RowHeight = 17.25; ((Excel.Range)sheet.Cells[2, 1]).EntireRow.RowHeight = 16.5; ((Excel.Range)sheet.Cells[3, 1]).EntireRow.RowHeight = 26.25; ((Excel.Range)sheet.Cells[4, 1]).EntireRow.RowHeight = 16.5; ((Excel.Range)sheet.Cells[5, 1]).EntireRow.RowHeight = 16.5; ((Excel.Range)sheet.Cells[6, 1]).EntireRow.RowHeight = 16.5; ((Excel.Range)sheet.Cells[7, 1]).EntireRow.RowHeight = 16.5; ((Excel.Range)sheet.Cells[8, 1]).EntireRow.RowHeight = 216; ((Excel.Range)sheet.Cells[9, 1]).EntireRow.RowHeight = 16.5; ((Excel.Range)sheet.Cells[10, 1]).EntireRow.RowHeight = 16.5; ((Excel.Range)sheet.Cells[11, 1]).EntireRow.RowHeight = 17.25; #endregion #region 외곽선 정의 sheet.Range["B2", "F11"].Borders[Excel.XlBordersIndex.xlEdgeLeft].LineStyle = Excel.XlLineStyle.xlContinuous; sheet.Range["B2", "F11"].Borders[Excel.XlBordersIndex.xlEdgeTop].LineStyle = Excel.XlLineStyle.xlContinuous; sheet.Range["B2", "F11"].Borders[Excel.XlBordersIndex.xlEdgeRight].LineStyle = Excel.XlLineStyle.xlContinuous; sheet.Range["B2", "F11"].Borders[Excel.XlBordersIndex.xlEdgeBottom].LineStyle = Excel.XlLineStyle.xlContinuous; sheet.Range["C5", "E10"].Borders[Excel.XlBordersIndex.xlEdgeLeft].LineStyle = Excel.XlLineStyle.xlContinuous; sheet.Range["C5", "E10"].Borders[Excel.XlBordersIndex.xlEdgeTop].LineStyle = Excel.XlLineStyle.xlContinuous; sheet.Range["C5", "E10"].Borders[Excel.XlBordersIndex.xlEdgeRight].LineStyle = Excel.XlLineStyle.xlContinuous; sheet.Range["C5", "E10"].Borders[Excel.XlBordersIndex.xlEdgeBottom].LineStyle = Excel.XlLineStyle.xlContinuous; sheet.Range["C5", "E10"].Borders[Excel.XlBordersIndex.xlInsideHorizontal].LineStyle = Excel.XlLineStyle.xlContinuous; sheet.Range["C5", "E10"].Borders[Excel.XlBordersIndex.xlInsideVertical].LineStyle = Excel.XlLineStyle.xlContinuous; sheet.Range["B2", "F11"].Borders[Excel.XlBordersIndex.xlEdgeLeft].Weight = Excel.XlBorderWeight.xlMedium; sheet.Range["B2", "F11"].Borders[Excel.XlBordersIndex.xlEdgeTop].Weight = Excel.XlBorderWeight.xlMedium; sheet.Range["B2", "F11"].Borders[Excel.XlBordersIndex.xlEdgeRight].Weight = Excel.XlBorderWeight.xlMedium; sheet.Range["B2", "F11"].Borders[Excel.XlBordersIndex.xlEdgeBottom].Weight = Excel.XlBorderWeight.xlMedium; sheet.Range["C5", "E10"].Borders[Excel.XlBordersIndex.xlEdgeLeft].Weight = Excel.XlBorderWeight.xlThin; sheet.Range["C5", "E10"].Borders[Excel.XlBordersIndex.xlEdgeTop].Weight = Excel.XlBorderWeight.xlThin; sheet.Range["C5", "E10"].Borders[Excel.XlBordersIndex.xlEdgeRight].Weight = Excel.XlBorderWeight.xlThin; sheet.Range["C5", "E10"].Borders[Excel.XlBordersIndex.xlEdgeBottom].Weight = Excel.XlBorderWeight.xlThin; sheet.Range["C5", "E10"].Borders[Excel.XlBordersIndex.xlInsideHorizontal].Weight = Excel.XlBorderWeight.xlThin; sheet.Range["C5", "E10"].Borders[Excel.XlBordersIndex.xlInsideVertical].Weight = Excel.XlBorderWeight.xlThin; #endregion #region Merge & Font 정의 sheet.Range["C3", "E10"].Font.Name = "맑은 고딕"; sheet.Range["C5", "E10"].Font.Size = 11; sheet.Range["C3", "E3"].Font.Size = 18; sheet.Range["C3", "E10"].HorizontalAlignment = Excel.XlHAlign.xlHAlignCenter; sheet.Range["C3", "E10"].VerticalAlignment = Excel.XlVAlign.xlVAlignCenter; sheet.Range["D8", "E8"].HorizontalAlignment = Excel.XlHAlign.xlHAlignLeft; sheet.Range["D8", "E8"].VerticalAlignment = Excel.XlVAlign.xlVAlignTop; sheet.Range["C3", "E3"].Merge(); sheet.Range["D5", "E5"].Merge(); sheet.Range["D6", "E6"].Merge(); sheet.Range["D7", "E7"].Merge(); sheet.Range["D8", "E8"].Merge(); sheet.Range["D9", "E9"].Merge(); #endregion #region 내용 입력 sheet.Cells[3, 3] = "장비 Assign 요청서"; sheet.Cells[5, 3] = "일 시"; sheet.Cells[6, 3] = "장 소"; sheet.Cells[7, 3] = "대 상"; sheet.Cells[8, 3] = "목 적"; sheet.Cells[9, 3] = "출입인원"; sheet.Cells[10, 3] = "주 관"; TimeSpan delay = CalEndTm.Value - CalStartTm.Value; string strTime = CalStartTm.Value.ToString("yyyy년 MM월 dd일 HH:mm") + " ~ "; if (delay.Days < 1) { strTime += CalEndTm.Value.ToString("HH:mm"); } else { strTime += CalEndTm.Value.ToString("yyyy년 MM월 dd일 HH:mm"); } strTime += " (" + delay.Hours.ToString() + "시간"; if (delay.Minutes > 0) { strTime += " " + delay.Minutes.ToString() + "분"; } strTime += ")"; sheet.Cells[5, 4] = strTime; sheet.Cells[6, 4] = txtSite.Text; sheet.Cells[7, 4] = txtProduct.Text; sheet.Cells[8, 4] = txtDesc.Text; cbo.SetItemChecked(cbockVisitUser.ValueList); sheet.Cells[9, 4] = cbo.Text.Trim(); sheet.Cells[10, 4] = "(주)MYC"; cbo.SetItemChecked(cboCstUser.ValueList); sheet.Cells[10, 5] = cboComp.Text.Substring(cboComp.Text.IndexOf(']') + 1).Trim() + ":" + cbo.Text.Trim(); FileInfo file = new FileInfo(path); if (file.Exists) { file.Delete(); } work.SaveAs(path, Excel.XlFileFormat.xlWorkbookDefault); work.Close(); app.Quit(); System.Diagnostics.Process.Start(path); #endregion } catch (Exception ex) { ViewMessage.Error(ex.Message); } }
public static bool GetEnableWatermark(CheckComboBox obj) { return((bool)obj.GetValue(EnableWatermarkProperty)); }
private void InitControls() { cboComp.Params.Add("strCompType", "C"); cboComp.BindDataSet(); CheckComboBox cbo = new CheckComboBox() { Sql = "CommonSearch#getUserList" }; cbo.Params.Clear(); cbo.Params.Add("strCompType", "M,C,V"); cbo.BindDataSet(); _dtUser = cbo.DataSource; cbo = new CheckComboBox() { Sql = "CommonSearch#getCompList" }; cbo.Params.Clear(); cbo.Params.Add("strCompType", "M,C,V"); cbo.BindDataSet(); _dtComp = cbo.DataSource; cbo = new CheckComboBox() { Sql = "CommonSearch#getModelList" }; cbo.Params.Clear(); cbo.Params.Add("strModel", ""); cbo.BindDataSet(); _dtModel = cbo.DataSource; cbo = new CheckComboBox() { Sql = "CommonSearch#getCommonItems" }; cbo.Params.Clear(); cbo.Params.Add("strItem", "EQP_STATUS"); cbo.BindDataSet(); _dtStatus = cbo.DataSource; cbo = new CheckComboBox() { Sql = "CommonSearch#getVerList" }; cbo.Params.Clear(); cbo.Params.Add("strModel", ""); cbo.BindDataSet(); _dtVer = cbo.DataSource; cbo = new CheckComboBox() { Sql = "CommonSearch#getManagerCode" }; cbo.Params.Clear(); cbo.Params.Add("strCompCode", ""); cbo.BindDataSet(); _dtMgrCode = cbo.DataSource; DataRow nr = _dtMgrCode.NewRow(); nr["ITEM_CD"] = ""; nr["ITEM_NM"] = "(선택없음)"; _dtMgrCode.Rows.Add(nr); }
public static void SetEnableWatermark(CheckComboBox obj, bool value) { obj.SetValue(EnableWatermarkProperty, value); }
public static void SetLabel(CheckComboBox obj, string value) { obj.SetValue(LabelProperty, value); }
/// <summary> /// This is the method that actually does the work. /// </summary> /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param> protected override void SolveInstance(IGH_DataAccess DA) { string ID = this.Attributes.InstanceGuid.ToString(); string name = new GUIDtoAlpha(Convert.ToString(ID + Convert.ToString(this.RunCount)), false).Text; List <string> newKeys = new List <string>(); string type, format; GH_Structure <IGH_Goo> El; GH_Structure <IGH_Goo> OutPut = new GH_Structure <IGH_Goo>(); if (!DA.GetDataTree(0, out El)) { return; } for (int i = 0; i < El.Paths.Count; i++) { GH_Path Q = El.get_Path(i); GH_Path P = El.get_Path(i); P.AppendElement(0); for (int k = 0; k < El.get_Branch(Q).Count; k++) { IGH_Goo X = El.get_DataItem(Q, k); wObject W; X.CastTo(out W); format = W.Type; if (format == "Parrot") { pElement E; E = (pElement)W.Element; type = E.Type; newKeys.Add(E.Element.Name); switch (type) { case ("Button"): Button C0 = (Button)E.Element; if (!keys.Contains(E.Element.Name)) { C0.PreviewMouseDown -= (o, e) => { ExpireSolution(true); }; C0.PreviewMouseDown += (o, e) => { ExpireSolution(true); }; C0.PreviewMouseUp -= (o, e) => { ExpireSolution(true); }; C0.PreviewMouseUp += (o, e) => { ExpireSolution(true); }; } OutPut.Append(new GH_ObjectWrapper((Mouse.LeftButton == MouseButtonState.Pressed) & C0.IsMouseOver), P); break; case ("Calculator"): Calculator C1 = (Calculator)E.Element; if (!keys.Contains(E.Element.Name)) { C1.ValueChanged -= (o, e) => { ExpireSolution(true); }; C1.ValueChanged += (o, e) => { ExpireSolution(true); }; } OutPut.Append(new GH_ObjectWrapper(C1.Value), P); break; case ("Calendar"): Calendar C2 = (Calendar)E.Element; if (!keys.Contains(E.Element.Name)) { C2.SelectedDatesChanged -= (o, e) => { ExpireSolution(true); }; C2.SelectedDatesChanged += (o, e) => { ExpireSolution(true); }; } List <IGH_Goo> Dates = new List <IGH_Goo>(); for (int j = 0; j < C2.SelectedDates.Count; j++) { OutPut.Append(new GH_ObjectWrapper(C2.SelectedDates[j]), P); } break; case ("Clock"): Clock C23 = (Clock)E.Element; if (!keys.Contains(E.Element.Name)) { C23.LayoutUpdated -= (o, e) => { ExpireSolution(true); }; C23.LayoutUpdated += (o, e) => { ExpireSolution(true); }; } OutPut.Append(new GH_ObjectWrapper(C23.Time), P); break; case ("CheckBox"): CheckBox C19 = (CheckBox)E.Element; if (!keys.Contains(E.Element.Name)) { C19.Click -= (o, e) => { ExpireSolution(true); }; C19.Click += (o, e) => { ExpireSolution(true); }; } OutPut.Append(new GH_ObjectWrapper(C19.IsChecked), P); break; case ("CheckListBox"): CheckListBox C3 = (CheckListBox)E.Element; if (!keys.Contains(E.Element.Name)) { C3.ItemSelectionChanged -= (o, e) => { ExpireSolution(true); }; C3.ItemSelectionChanged += (o, e) => { ExpireSolution(true); }; } for (int j = 0; j < C3.SelectedItems.Count; j++) { OutPut.Append(new GH_ObjectWrapper(C3.SelectedItems[j]), P); } break; case ("ColorCanvas"): ColorCanvas C4 = (ColorCanvas)E.Element; if (!keys.Contains(E.Element.Name)) { C4.SelectedColorChanged -= (o, e) => { ExpireSolution(true); }; C4.SelectedColorChanged += (o, e) => { ExpireSolution(true); }; } OutPut.Append(new GH_ObjectWrapper(new wColor((System.Windows.Media.Color)C4.SelectedColor).ToDrawingColor()), P); OutPut.Append(new GH_ObjectWrapper(C4.SelectedColor), P); break; case ("ColorPicker"): ColorPicker C5 = (ColorPicker)E.Element; if (!keys.Contains(E.Element.Name)) { C5.SelectedColorChanged -= (o, e) => { ExpireSolution(true); }; C5.SelectedColorChanged += (o, e) => { ExpireSolution(true); }; } OutPut.Append(new GH_ObjectWrapper(new wColor((System.Windows.Media.Color)C5.SelectedColor).ToDrawingColor()), P); break; case ("CheckComboBox"): CheckComboBox C6 = (CheckComboBox)E.Element; if (!keys.Contains(E.Element.Name)) { C6.ItemSelectionChanged -= (o, e) => { ExpireSolution(true); }; C6.ItemSelectionChanged += (o, e) => { ExpireSolution(true); }; } for (int j = 0; j < C6.SelectedItems.Count; j++) { OutPut.Append(new GH_ObjectWrapper(C6.SelectedItems[j]), P); } break; case ("RangeSlider"): MahApps.Metro.Controls.RangeSlider C7 = (MahApps.Metro.Controls.RangeSlider)E.Layout.Children[0]; if (!keys.Contains(E.Element.Name)) { C7.UpperValueChanged -= (o, e) => { ExpireSolution(true); }; C7.UpperValueChanged += (o, e) => { ExpireSolution(true); }; C7.LowerValueChanged -= (o, e) => { ExpireSolution(true); }; C7.LowerValueChanged += (o, e) => { ExpireSolution(true); }; } OutPut.Append(new GH_ObjectWrapper(new Interval(C7.LowerValue, C7.UpperValue)), P); break; case ("Slider"): Slider C8 = (Slider)E.Layout.Children[0]; if (!keys.Contains(E.Element.Name)) { C8.ValueChanged -= (o, e) => { ExpireSolution(true); }; C8.ValueChanged += (o, e) => { ExpireSolution(true); }; } OutPut.Append(new GH_ObjectWrapper(C8.Value), P); break; case ("RadioButton"): RadioButton C9 = (RadioButton)E.Element; if (!keys.Contains(E.Element.Name)) { C9.Checked -= (o, e) => { ExpireSolution(true); }; C9.Checked += (o, e) => { ExpireSolution(true); }; } OutPut.Append(new GH_ObjectWrapper(C9.IsChecked), P); break; case ("TimePicker"): MaterialDesignThemes.Wpf.TimePicker C10 = (MaterialDesignThemes.Wpf.TimePicker)E.Element; if (!keys.Contains(E.Element.Name)) { C10.MouseUp -= (o, e) => { ExpireSolution(true); }; C10.MouseUp += (o, e) => { ExpireSolution(true); }; C10.LayoutUpdated -= (o, e) => { ExpireSolution(true); }; C10.LayoutUpdated += (o, e) => { ExpireSolution(true); }; } OutPut.Append(new GH_ObjectWrapper(C10.SelectedTime), P); break; case ("PickDate"): DatePicker C11 = (DatePicker)E.Element; if (!keys.Contains(E.Element.Name)) { C11.SelectedDateChanged -= (o, e) => { ExpireSolution(true); }; C11.SelectedDateChanged += (o, e) => { ExpireSolution(true); }; } OutPut.Append(new GH_ObjectWrapper(C11.SelectedDate), P); break; case ("PickDateTime"): DateTimePicker C12 = (DateTimePicker)E.Element; if (!keys.Contains(E.Element.Name)) { C12.ValueChanged -= (o, e) => { ExpireSolution(true); }; C12.ValueChanged += (o, e) => { ExpireSolution(true); }; } OutPut.Append(new GH_ObjectWrapper(C12.Value), P); break; case ("ListView"): ListView C13 = (ListView)E.Element; if (!keys.Contains(E.Element.Name)) { C13.SelectionChanged -= (o, e) => { ExpireSolution(true); }; C13.SelectionChanged += (o, e) => { ExpireSolution(true); }; } for (int j = 0; j < C13.Items.Count; j++) { Label tbox = (Label)C13.Items[j]; OutPut.Append(new GH_ObjectWrapper(tbox.ToolTip.ToString()), P); } break; case ("ListBox"): ListBox C14 = (ListBox)E.Element; if (!keys.Contains(E.Element.Name)) { C14.SelectionChanged -= (o, e) => { ExpireSolution(true); }; C14.SelectionChanged += (o, e) => { ExpireSolution(true); }; } for (int j = 0; j < C14.SelectedItems.Count; j++) { OutPut.Append(new GH_ObjectWrapper(C14.SelectedItems[j]), P); } break; case ("ComboBox"): ComboBox C15 = (ComboBox)E.Element; if (!keys.Contains(E.Element.Name)) { C15.SelectionChanged -= (o, e) => { ExpireSolution(true); }; C15.SelectionChanged += (o, e) => { ExpireSolution(true); }; } OutPut.Append(new GH_ObjectWrapper(C15.SelectedValue), P); break; case ("ScrollValue"): ButtonSpinner C16 = (ButtonSpinner)E.Element; if (!keys.Contains(E.Element.Name)) { C16.Spin -= (o, e) => { ExpireSolution(true); }; C16.Spin += (o, e) => { ExpireSolution(true); }; } OutPut.Append(new GH_ObjectWrapper(C16.Content), P); break; case ("ScrollNumber"): NumericUpDown C17 = (NumericUpDown)E.Element; if (!keys.Contains(E.Element.Name)) { C17.ValueChanged -= (o, e) => { ExpireSolution(true); }; C17.ValueChanged += (o, e) => { ExpireSolution(true); }; } OutPut.Append(new GH_ObjectWrapper(C17.Value), P); break; case ("TextBox"): TextBox C18 = (TextBox)E.Element; if (!keys.Contains(E.Element.Name)) { C18.TextChanged -= (o, e) => { ExpireSolution(true); }; C18.TextChanged += (o, e) => { ExpireSolution(true); }; } OutPut.Append(new GH_ObjectWrapper(C18.Text), P); break; case ("TreeView"): TreeView C20 = (TreeView)E.Element; if (!keys.Contains(E.Element.Name)) { C20.SelectedItemChanged -= (o, e) => { ExpireSolution(true); }; C20.SelectedItemChanged += (o, e) => { ExpireSolution(true); }; } OutPut.Append(new GH_ObjectWrapper(C20.SelectedValue), P); break; case ("GridView"): ListView C21 = (ListView)E.Element; if (!keys.Contains(E.Element.Name)) { C21.SelectionChanged -= (o, e) => { ExpireSolution(true); }; C21.SelectionChanged += (o, e) => { ExpireSolution(true); }; } OutPut.Append(new GH_ObjectWrapper(C21.Items), P); break; case ("Toggle"): ToggleButton C22 = (ToggleButton)E.Element; if (!keys.Contains(E.Element.Name)) { C22.Click -= (o, e) => { ExpireSolution(true); }; C22.Click += (o, e) => { ExpireSolution(true); }; } OutPut.Append(new GH_ObjectWrapper(C22.IsChecked), P); break; } } } } keys = newKeys; DA.SetDataTree(0, OutPut); DA.SetDataList(1, keys); }
public Form1() { InitializeComponent(); PlayerList = listPlayers; }