void OnColumnsComboBoxSelectedIndexChanged(NValueChangeEventArgs arg)
        {
            NComboBoxItem item = m_ColumnsComboBox.SelectedItem;

            if (item == null)
            {
                m_ColumnPropertiesHolder.Content = null;
                return;
            }

            NColumn column = (NColumn)item.Tag;

            NStackPanel columnPropertiesStack = new NStackPanel();

            m_ColumnPropertiesHolder.Content = new NUniSizeBoxGroup(columnPropertiesStack);

            NDesigner designer = NDesigner.GetDesigner(column);
            NList <NPropertyEditor> editors = designer.CreatePropertyEditors(column,
                                                                             NColumn.AllowFilterProperty,
                                                                             NColumn.AllowSortProperty,
                                                                             NColumn.AllowGroupProperty,
                                                                             NColumn.AllowFormatProperty,
                                                                             NColumn.AllowEditProperty,
                                                                             NColumn.AllowReorderProperty,
                                                                             NColumn.AllowResizeProperty);

            for (int i = 0; i < editors.Count; i++)
            {
                columnPropertiesStack.Add(editors[i]);
            }
        }
예제 #2
0
        void OnColumnsComboBoxSelectedIndexChanged(NValueChangeEventArgs arg)
        {
            NComboBoxItem item = m_ColumnsComboBox.SelectedItem;

            if (item == null)
            {
                m_ColumnPropertiesHolder.Content = null;
            }
            else
            {
                NColumn column = (NColumn)item.Tag;

                NStackPanel columnPropertiesStack = new NStackPanel();
                m_ColumnPropertiesHolder.Content = new NUniSizeBoxGroup(columnPropertiesStack);

                NDesigner designer = NDesigner.GetDesigner(column);
                NList <NPropertyEditor> editors = designer.CreatePropertyEditors(column,
                                                                                 NColumn.WidthModeProperty,
                                                                                 NColumn.FixedWidthProperty,
                                                                                 NColumn.WidthPercentProperty);

                for (int i = 0; i < editors.Count; i++)
                {
                    columnPropertiesStack.Add(editors[i]);
                }
            }
        }
예제 #3
0
        protected override NWidget CreateExampleControls()
        {
            NStackPanel stack = new NStackPanel();

            // create the row headers properties
            {
                NStackPanel selectionStack = new NStackPanel();

                NDesigner designer = NDesigner.GetDesigner(NGridSelection.NGridSelectionSchema);
                NList <NPropertyEditor> editors = designer.CreatePropertyEditors(
                    m_TableView.Grid.Selection,
                    NGridSelection.ModeProperty,
                    NGridSelection.AllowCurrentCellProperty,
                    NGridSelection.BeginEditCellOnClickProperty,
                    NGridSelection.BeginEditCellOnDoubleClickProperty,
                    NGridSelection.BeginEditCellOnBecomeCurrentProperty
                    );

                for (int i = 0; i < editors.Count; i++)
                {
                    selectionStack.Add(editors[i]);
                }

                NGroupBox selectionGroup = new NGroupBox("Selection Properties", selectionStack);
                stack.Add(new NUniSizeBoxGroup(selectionGroup));
            }

            return(stack);
        }
예제 #4
0
        protected override NWidget CreateExampleControls()
        {
            NStackPanel stack = new NStackPanel();

            // create the horizontal scrolling properties
            {
                NStackPanel hstack = new NStackPanel();

                NDesigner designer = NDesigner.GetDesigner(NTableGrid.NTableGridSchema);
                NList <NPropertyEditor> editors = designer.CreatePropertyEditors(
                    m_TableView.Grid,
                    NTableGrid.HScrollModeProperty,
                    NTableGrid.IntegralHScrollProperty,
                    NTableGrid.SmallHScrollChangeProperty);

                for (int i = 0; i < editors.Count; i++)
                {
                    hstack.Add(editors[i]);
                }

                NGroupBox hgroup = new NGroupBox("Horizontal Scrolling", hstack);
                stack.Add(new NUniSizeBoxGroup(hgroup));
            }

            // create the vertical scrolling properties
            {
                NStackPanel vstack = new NStackPanel();

                NDesigner designer = NDesigner.GetDesigner(NTableGrid.NTableGridSchema);
                NList <NPropertyEditor> editors = designer.CreatePropertyEditors(
                    m_TableView.Grid,
                    NTableGrid.VScrollModeProperty,
                    NTableGrid.IntegralVScrollProperty,
                    NTableGrid.SmallVScrollChangeProperty);

                for (int i = 0; i < editors.Count; i++)
                {
                    vstack.Add(editors[i]);
                }

                NGroupBox vgroup = new NGroupBox("Vertical Scrolling", vstack);
                stack.Add(new NUniSizeBoxGroup(vgroup));
            }

            return(stack);
        }
            /// <summary>
            /// Creates a custom appointment edit dialog.
            /// </summary>
            /// <returns></returns>
            public override NTopLevelWindow CreateEditDialog()
            {
                NSchedule schedule = (NSchedule)GetFirstAncestor(NSchedule.NScheduleSchema);
                NWindow   window   = schedule != null ? schedule.OwnerWindow : null;

                // Create a dialog window
                NTopLevelWindow dialog = NApplication.CreateTopLevelWindow(NWindow.GetFocusedWindowIfNull(window));

                dialog.SetupDialogWindow("Appointment with Image Editor", true);

                NStackPanel stack = new NStackPanel();

                stack.FillMode = ENStackFillMode.Last;
                stack.FitMode  = ENStackFitMode.Last;

                // Add an image box with the image
                NImageBox imageBox = new NImageBox((NImage)NSystem.SafeDeepClone(Image));

                stack.Add(imageBox);

                // Add property editors for some of the appointment properties
                NDesigner designer = NDesigner.GetDesigner(this);
                NList <NPropertyEditor> editors = designer.CreatePropertyEditors(this,
                                                                                 SubjectProperty,
                                                                                 StartProperty,
                                                                                 EndProperty);

                for (int i = 0; i < editors.Count; i++)
                {
                    stack.Add(editors[i]);
                }

                // Add a button strip with OK and Cancel buttons
                NButtonStrip buttonStrip = new NButtonStrip();

                buttonStrip.InitOKCancelButtonStrip();
                stack.Add(buttonStrip);

                dialog.Content = new NUniSizeBoxGroup(stack);

                return(dialog);
            }
예제 #6
0
        protected override NWidget CreateExampleControls()
        {
            NStackPanel stack = new NStackPanel();

            // create the row headers properties
            {
                NStackPanel rowHeadersStack = new NStackPanel();

                NDesigner designer = NDesigner.GetDesigner(NRowHeaderCollection.NRowHeaderCollectionSchema);
                NList <NPropertyEditor> editors = designer.CreatePropertyEditors(m_TableView.Grid.RowHeaders,
                                                                                 NRowHeaderCollection.VisibleProperty,
                                                                                 NRowHeaderCollection.ShowRowNumbersProperty,
                                                                                 NRowHeaderCollection.ShowRowSymbolProperty);

                for (int i = 0; i < editors.Count; i++)
                {
                    rowHeadersStack.Add(editors[i]);
                }

                NGroupBox rowHeadersGroup = new NGroupBox("Row Headers Properties", rowHeadersStack);
                stack.Add(new NUniSizeBoxGroup(rowHeadersGroup));
            }

            // create the grid properties
            {
                NStackPanel gridStack = new NStackPanel();

                NList <NPropertyEditor> editors = NDesigner.GetDesigner(m_TableView.Grid).CreatePropertyEditors(m_TableView.Grid,
                                                                                                                NGrid.FrozenRowsProperty,
                                                                                                                NGrid.IntegralVScrollProperty);

                for (int i = 0; i < editors.Count; i++)
                {
                    gridStack.Add(editors[i]);
                }

                NGroupBox gridGroup = new NGroupBox("Grid Properties", gridStack);
                stack.Add(new NUniSizeBoxGroup(gridGroup));
            }

            return(stack);
        }