コード例 #1
0
        public static WpfServerSideGridTest CreateNewServerObject()
        {
            WpfServerSideGridTest obj = new WpfServerSideGridTest();

            obj.Subject       = OutlookDataGenerator.GetSubject();
            obj.From          = OutlookDataGenerator.GetFrom();
            obj.Sent          = OutlookDataGenerator.GetSentDate();
            obj.HasAttachment = OutlookDataGenerator.GetHasAttachment();
            obj.Size          = OutlookDataGenerator.GetSize(obj.HasAttachment.Value);
            return(obj);
        }
コード例 #2
0
        public AutoFilterRow()
        {
            InitializeComponent();
            grid.ItemsSource = OutlookDataGenerator.CreateOutlookDataTable(1000);
            ComboBoxEditSettings settings = new ComboBoxEditSettings()
            {
                IsTextEditable = false
            };

            ComboBoxEdit.SetupComboBoxSettingsEnumItemSource <Priority>(settings);
            colPriority.EditSettings = settings;
        }
コード例 #3
0
 void OnLoaded(object sender, RoutedEventArgs e)
 {
     if (DevExpress.Xpf.DemoBase.DemoTesting.DemoTestingHelper.IsTesting)
     {
         linqServerModeDataSource.QueryableSource = OutlookDataGenerator.CreateServerObjectsList(30000).AsQueryable();
         grid.ItemsSource = linqServerModeDataSource.Data;
         return;
     }
     if (String.IsNullOrEmpty(ServerModeOptions.SQLConnectionString))
     {
         ShowConnectionWizard();
     }
     ValidateSource();
 }
コード例 #4
0
        public CellEditors()
        {
            InitializeComponent();
            ComboBoxEditSettings settings = new ComboBoxEditSettings()
            {
                IsTextEditable = false
            };

            ComboBoxEdit.SetupComboBoxSettingsEnumItemSource <Priority>(settings);
            colPriority.EditSettings = settings;
            grid.ItemsSource         = OutlookDataGenerator.CreateOutlookDataTable(1000);
            booleanColumnEditorListBox.EditValueChanged  += new EditValueChangedEventHandler(booleanColumnEditorListBox_EditValueChanged);
            editorButtonShowModeListBox.EditValueChanged += new EditValueChangedEventHandler(editorButtonShowModeListBox_EditValueChanged);
            viewsListBox.EditValueChanged += new EditValueChangedEventHandler(viewsListBox_SelectionChanged);
            alternativeDisplayTemplateCheckBox.IsChecked = true;
            alternativeEditTemplateCheckBox.IsChecked    = true;
            editorShowModeCombobox.EditValueChanged     += new EditValueChangedEventHandler(editorShowModeCombobox_EditValueChanged);
        }
コード例 #5
0
        public CopyPasteOperations()
        {
            Counter = 0;
            InitializeComponent();
            DemoContentGrid.DataContext = this;
            ArrayList list = OutlookDataGenerator.CreateOutlookArrayList(10);

            object[] objectForCopying = list.ToArray();
            for (int i = 0; i < objectForCopying.Length; i++)
            {
                firstList.Add(CopyPasteOutlookData.ConvertOutlookDataToCopyPasteOutlookData((OutlookData)objectForCopying[i], this));
            }
            firstGrid.ItemsSource  = firstList;
            secondGrid.ItemsSource = secondList;
            allowCopyingtoClipboardCheckEdit.IsChecked = true;
            copyHeaderCheckEdit.IsChecked = true;

            firstGrid.PreviewMouseDown  += new MouseButtonEventHandler(firstGrid_PreviewMouseDown);
            secondGrid.PreviewMouseDown += new MouseButtonEventHandler(secondGrid_PreviewMouseDown);
            GridDictionary.Add(FocusedGrid.First, firstGrid);
            GridDictionary.Add(FocusedGrid.Second, secondGrid);
        }
コード例 #6
0
 protected override void AddNewItem()
 {
     context.WpfServerSideGridTests.InsertOnSubmit(OutlookDataGenerator.CreateNewServerObject());
 }
コード例 #7
0
 public DragDropViewModel()
 {
     DataSource       = new ObservableCollection <OutlookData>(OutlookDataGenerator.CreateOutlookArrayList(200).Cast <OutlookData>());
     RecycleBinSource = new ObservableCollection <OutlookData>(OutlookDataGenerator.CreateOutlookArrayList(5).Cast <OutlookData>());
     ClearRecycleBin  = new DelegateCommand <Object>(OnClearRecycleBin);
 }