Пример #1
0
 public ViewEditor(IViewContext viewContext, ViewInfo viewInfo)
 {
     InitializeComponent();
     ViewContext = viewContext;
     ViewInfo = OriginalViewInfo = viewInfo;
     _undoIndex = 0;
     _undoStack = new List<KeyValuePair<ViewInfo, IList<PropertyPath>>>();
     SetViewInfo(ViewInfo, new PropertyPath[0]);
     tbxViewName.Text = ViewSpec.Name;
     Icon = ViewContext.ApplicationIcon;
     _chooseColumnsTab = new ChooseColumnsTab {Dock = DockStyle.Fill};
     tabPageColumns.Controls.Add(_chooseColumnsTab);
     _filterTab = new FilterTab { Dock = DockStyle.Fill };
     tabPageFilter.Controls.Add(_filterTab);
     _sourceTab = new SourceTab{Dock = DockStyle.Fill};
     tabPageSource.Controls.Add(_sourceTab);
     _editorWidgets.AddRange(new ViewEditorWidget[] { _chooseColumnsTab, _filterTab, _sourceTab });
     foreach (var tab in _editorWidgets)
     {
         tab.SetViewEditor(this);
     }
     toolButtonShowAdvanced.Checked = ShowHiddenFields;
     if (!ShowHiddenFields)
     {
         tabControl1.TabPages.Remove(tabPageSource);
     }
 }
Пример #2
0
 public ViewEditor(IViewContext viewContext, ViewInfo viewInfo)
 {
     InitializeComponent();
     ViewContext = viewContext;
     ViewInfo    = OriginalViewInfo = viewInfo;
     _undoIndex  = 0;
     _undoStack  = new List <KeyValuePair <ViewInfo, IList <PropertyPath> > >();
     SetViewInfo(ViewInfo, new PropertyPath[0]);
     tbxViewName.Text  = ViewSpec.Name;
     Icon              = ViewContext.ApplicationIcon;
     _chooseColumnsTab = new ChooseColumnsTab {
         Dock = DockStyle.Fill
     };
     tabPageColumns.Controls.Add(_chooseColumnsTab);
     _filterTab = new FilterTab {
         Dock = DockStyle.Fill
     };
     tabPageFilter.Controls.Add(_filterTab);
     _sourceTab = new SourceTab {
         Dock = DockStyle.Fill
     };
     tabPageSource.Controls.Add(_sourceTab);
     _editorWidgets.AddRange(new ViewEditorWidget[] { _chooseColumnsTab, _filterTab, _sourceTab });
     foreach (var tab in _editorWidgets)
     {
         tab.SetViewEditor(this);
     }
     toolButtonShowAdvanced.Checked = ShowHiddenFields;
     if (!ShowHiddenFields)
     {
         tabControl1.TabPages.Remove(tabPageSource);
     }
 }
Пример #3
0
 public ViewEditor(IViewContext viewContext, ViewInfo viewInfo)
 {
     InitializeComponent();
     ViewContext = viewContext;
     ViewInfo    = OriginalViewInfo = viewInfo;
     _undoIndex  = 0;
     _undoStack  = new List <KeyValuePair <ViewInfo, IList <PropertyPath> > >();
     SetViewInfo(ViewInfo, new PropertyPath[0]);
     tbxViewName.Text  = ViewSpec.Name;
     Icon              = ViewContext.ApplicationIcon;
     _chooseColumnsTab = new ChooseColumnsTab {
         Dock = DockStyle.Fill
     };
     tabPageColumns.Controls.Add(_chooseColumnsTab);
     _filterTab = new FilterTab {
         Dock = DockStyle.Fill
     };
     tabPageFilter.Controls.Add(_filterTab);
     _sourceTab = new SourceTab {
         Dock = DockStyle.Fill
     };
     tabPageSource.Controls.Add(_sourceTab);
     _editorWidgets.AddRange(new ViewEditorWidget[] { _chooseColumnsTab, _filterTab, _sourceTab });
     foreach (var tab in _editorWidgets)
     {
         tab.SetViewEditor(this);
     }
     AddTooltipHandler(_chooseColumnsTab.AvailableFieldsTree);
     AddTooltipHandler(_filterTab.AvailableFieldsTree);
 }