public void InitializeSecondaryChoice(Altaxo.Collections.SelectableListNodeList items, LayerControllerTabType primaryChoice) { ++_suppressEventCounter; GuiHelper.Initialize(_lbEdges, items); _guiCreateNewAxis.Visibility = primaryChoice == LayerControllerTabType.Axes ? Visibility.Visible : Visibility.Collapsed; _guiMoveAxis.Visibility = primaryChoice == LayerControllerTabType.Axes ? Visibility.Visible : Visibility.Collapsed; --_suppressEventCounter; }
/// <summary> /// For a given enum value, this gives the list of possible choices for that enumeration (must not be a flag enumeration). /// </summary> /// <param name="value">The enum value that is currently selected.</param> /// <returns>List of all enumeration values. The current value is marked as (Selected is true for this list node).</returns> public static Altaxo.Collections.SelectableListNodeList GetListOfChoices(Enum value) { var list = new Altaxo.Collections.SelectableListNodeList(); Type enumtype = value.GetType(); foreach (Enum v in Enum.GetValues(enumtype)) { string name = Current.Gui.GetUserFriendlyName(v); list.Add(new Altaxo.Collections.SelectableListNode(name, v, Enum.Equals(v, value))); } return(list); }
public void InitializeSuperfluosLayersQuestion(Altaxo.Collections.SelectableListNodeList list) { _cbSuperfluousLayersAction.BeginUpdate(); _cbSuperfluousLayersAction.Items.Clear(); for (int i = 0; i < list.Count; i++) { _cbSuperfluousLayersAction.Items.Add(list[i]); if (list[i].Selected) { _cbSuperfluousLayersAction.SelectedIndex = i; } } _cbSuperfluousLayersAction.EndUpdate(); }
public static void InitComboBox(System.Windows.Forms.ComboBox box, Altaxo.Collections.SelectableListNodeList names) { box.BeginUpdate(); box.Items.Clear(); foreach (Altaxo.Collections.SelectableListNode node in names) { box.Items.Add(node); } foreach (Altaxo.Collections.SelectableListNode node in names) { if (node.Selected) { box.SelectedItem = node; break; } } box.EndUpdate(); }
protected override void Initialize(bool initData) { base.Initialize(initData); if (initData) { _triggerChoices = new Collections.SelectableListNodeList(_doc.ImportTriggerSource); } if (null != _view) { _view.InitializeTriggerSource(_triggerChoices); _view.DoNotSaveTableData = _doc.DoNotSaveCachedTableData; _view.ExecuteScriptAfterImport = _doc.ExecuteTableScriptAfterImport; _view.MinimumWaitingTimeAfterUpdateInSeconds = _doc.MinimumWaitingTimeAfterUpdateInSeconds; _view.MaximumWaitingTimeAfterUpdateInSeconds = _doc.MaximumWaitingTimeAfterUpdateInSeconds; _view.MinimumWaitingTimeAfterFirstTriggerInSeconds = _doc.MinimumWaitingTimeAfterFirstTriggerInSeconds; _view.MaximumWaitingTimeAfterFirstTriggerInSeconds = _doc.MaximumWaitingTimeAfterFirstTriggerInSeconds; _view.MinimumWaitingTimeAfterLastTriggerInSeconds = _doc.MinimumWaitingTimeAfterLastTriggerInSeconds; } }
/// <summary> /// Shows a dialog to add columns to a table. /// </summary> /// <param name="table">The table where to add the columns.</param> /// <param name="bAddToPropertyColumns">If true, the columns are added to the property columns instead of the data columns collection.</param> public static void ShowAddColumnsDialog(Altaxo.Data.DataTable table, bool bAddToPropertyColumns) { var lbitems = new Altaxo.Collections.SelectableListNodeList { new Altaxo.Collections.SelectableListNode("Numeric", typeof(Altaxo.Data.DoubleColumn), true), new Altaxo.Collections.SelectableListNode("Date/Time", typeof(Altaxo.Data.DateTimeColumn), false), new Altaxo.Collections.SelectableListNode("Text", typeof(Altaxo.Data.TextColumn), false) }; var ct = new IntegerAndComboBoxController( "Number of colums to add:", 1, int.MaxValue, 1, "Type of columns to add:", lbitems, 0); Current.Gui.FindAndAttachControlTo(ct); if (true == Current.Gui.ShowDialog(ct, "Add new column(s)", false)) { var columntype = (System.Type)ct.SelectedItem.Tag; using (var suspendToken = table.SuspendGetToken()) { if (bAddToPropertyColumns) { for (int i = 0; i < ct.IntegerValue; i++) { table.PropCols.Add((Altaxo.Data.DataColumn)System.Activator.CreateInstance(columntype)); } } else { for (int i = 0; i < ct.IntegerValue; i++) { table.DataColumns.Add((Altaxo.Data.DataColumn)System.Activator.CreateInstance(columntype)); } } suspendToken.Dispose(); } } }
/// <summary> /// Shows a dialog to add columns to a table. /// </summary> /// <param name="table">The table where to add the columns.</param> /// <param name="bAddToPropertyColumns">If true, the columns are added to the property columns instead of the data columns collection.</param> public static void ShowAddColumnsDialog(Altaxo.Data.DataTable table, bool bAddToPropertyColumns) { Altaxo.Collections.SelectableListNodeList lbitems = new Altaxo.Collections.SelectableListNodeList(); lbitems.Add(new Altaxo.Collections.SelectableListNode("Numeric", typeof(Altaxo.Data.DoubleColumn), true)); lbitems.Add(new Altaxo.Collections.SelectableListNode("Date/Time", typeof(Altaxo.Data.DateTimeColumn), false)); lbitems.Add(new Altaxo.Collections.SelectableListNode("Text", typeof(Altaxo.Data.TextColumn), false)); IntegerAndComboBoxController ct = new IntegerAndComboBoxController( "Number of colums to add:", 1, int.MaxValue, 1, "Type of columns to add:", lbitems, 0); SpinAndComboBoxControl panel = new SpinAndComboBoxControl(); ct.View = panel; if (true == Current.Gui.ShowDialog(ct, "Add new column(s)", false)) { System.Type columntype = (System.Type)ct.SelectedItem.Item; table.Suspend(); if (bAddToPropertyColumns) { for (int i = 0; i < ct.IntegerValue; i++) { table.PropCols.Add((Altaxo.Data.DataColumn)System.Activator.CreateInstance(columntype)); } } else { for (int i = 0; i < ct.IntegerValue; i++) { table.DataColumns.Add((Altaxo.Data.DataColumn)System.Activator.CreateInstance(columntype)); } } table.Resume(); } }
public void SetPixelFormat(Altaxo.Collections.SelectableListNodeList list) { GuiHelper.Initialize(_cbPixelFormat, list); }
public void InitializeAvailableClasses(Altaxo.Collections.SelectableListNodeList names) { GuiHelper.UpdateList(_cbColorProvider, names); }
public void InitializeTriggerSource(Altaxo.Collections.SelectableListNodeList list) { _guiTrigger.Initialize(list); }
/// <summary> /// Shows a dialog to add columns to a table. /// </summary> /// <param name="table">The table where to add the columns.</param> /// <param name="bAddToPropertyColumns">If true, the columns are added to the property columns instead of the data columns collection.</param> public static void ShowAddColumnsDialog(Altaxo.Data.DataTable table, bool bAddToPropertyColumns) { Altaxo.Collections.SelectableListNodeList lbitems = new Altaxo.Collections.SelectableListNodeList(); lbitems.Add(new Altaxo.Collections.SelectableListNode("Numeric", typeof(Altaxo.Data.DoubleColumn), true)); lbitems.Add(new Altaxo.Collections.SelectableListNode("Date/Time", typeof(Altaxo.Data.DateTimeColumn), false)); lbitems.Add(new Altaxo.Collections.SelectableListNode("Text", typeof(Altaxo.Data.TextColumn), false)); IntegerAndComboBoxController ct = new IntegerAndComboBoxController( "Number of colums to add:", 1, int.MaxValue, 1, "Type of columns to add:", lbitems, 0); SpinAndComboBoxControl panel = new SpinAndComboBoxControl(); ct.View = panel; if (true == Current.Gui.ShowDialog(ct,"Add new column(s)",false)) { System.Type columntype = (System.Type)ct.SelectedItem.Item; table.Suspend(); if (bAddToPropertyColumns) { for (int i = 0; i < ct.IntegerValue; i++) { table.PropCols.Add((Altaxo.Data.DataColumn)System.Activator.CreateInstance(columntype)); } } else { for (int i = 0; i < ct.IntegerValue; i++) { table.DataColumns.Add((Altaxo.Data.DataColumn)System.Activator.CreateInstance(columntype)); } } table.Resume(); } }
public void SetClipboardFormat(Altaxo.Collections.SelectableListNodeList list) { GuiHelper.UpdateList(_cbClipboardFormat, list); }
public void SetDestinationDpi(Altaxo.Collections.SelectableListNodeList list) { GuiHelper.UpdateList(_cbDestinationResolution, list); }
public void SetSourceDpi(Altaxo.Collections.SelectableListNodeList list) { GuiHelper.UpdateList(_cbSourceResolution, list); }
public void SetExportArea(Altaxo.Collections.SelectableListNodeList list) { GuiHelper.UpdateList(_cbExportArea, list); }
/// <summary> /// For a given enum value, this gives the list of possible choices for that enumeration (must not be a flag enumeration). /// </summary> /// <param name="value">The enum value that is currently selected.</param> /// <returns>List of all enumeration values. The current value is marked as (Selected is true for this list node).</returns> public static Altaxo.Collections.SelectableListNodeList GetListOfChoices(Enum value) { Altaxo.Collections.SelectableListNodeList list = new Altaxo.Collections.SelectableListNodeList(); Type enumtype = value.GetType(); foreach (Enum v in Enum.GetValues(enumtype)) { string name = Current.Gui.GetUserFriendlyName(v); list.Add(new Altaxo.Collections.SelectableListNode(name, v, Enum.Equals(v, value))); } return list; }
public void InitializeList(Altaxo.Collections.SelectableListNodeList list) { GuiHelper.UpdateList(_lvItems, list); }
/// <summary> /// Shows a dialog to add columns to a table. /// </summary> /// <param name="table">The table where to add the columns.</param> /// <param name="bAddToPropertyColumns">If true, the columns are added to the property columns instead of the data columns collection.</param> public static void ShowAddColumnsDialog(Altaxo.Data.DataTable table, bool bAddToPropertyColumns) { var lbitems = new Altaxo.Collections.SelectableListNodeList(); lbitems.Add(new Altaxo.Collections.SelectableListNode("Numeric", typeof(Altaxo.Data.DoubleColumn), true)); lbitems.Add(new Altaxo.Collections.SelectableListNode("Date/Time", typeof(Altaxo.Data.DateTimeColumn), false)); lbitems.Add(new Altaxo.Collections.SelectableListNode("Text", typeof(Altaxo.Data.TextColumn), false)); IntegerAndComboBoxController ct = new IntegerAndComboBoxController( "Number of colums to add:", 1, int.MaxValue, 1, "Type of columns to add:", lbitems, 0); Current.Gui.FindAndAttachControlTo(ct); if (true == Current.Gui.ShowDialog(ct, "Add new column(s)", false)) { System.Type columntype = (System.Type)ct.SelectedItem.Tag; using (var suspendToken = table.SuspendGetToken()) { if (bAddToPropertyColumns) { for (int i = 0; i < ct.IntegerValue; i++) { table.PropCols.Add((Altaxo.Data.DataColumn)System.Activator.CreateInstance(columntype)); } } else { for (int i = 0; i < ct.IntegerValue; i++) { table.DataColumns.Add((Altaxo.Data.DataColumn)System.Activator.CreateInstance(columntype)); } } suspendToken.Dispose(); } } }
public void Init_UpperInclusive(Altaxo.Collections.SelectableListNodeList list) { GuiHelper.Initialize(_guiUpperInclusive, list); }
public void SetDropFileImageFormat(Altaxo.Collections.SelectableListNodeList list) { GuiHelper.Initialize(_cbImageFormat, list); }
public void SetPixelFormat(Altaxo.Collections.SelectableListNodeList list) { GuiHelper.UpdateList(_cbPixelFormat, list); }
public void InitializeAxisType(Altaxo.Collections.SelectableListNodeList names) { GuiHelper.UpdateList(_cbScales, names); }