public DataPointsViewModel() { Position = ShellPosition.CENTER; AnalogInputPoints = new ObservableCollection <AnalogInputPoint>(); foreach (AnalogInputPoint analog in Database.AnalogInputPoints) { AnalogInputPoints.Add(analog); } }
public void PlaceOrFocusControlInShell(ShellPosition position, ShellFillerShell sfs, bool isFocus, string parameter) { var currentTabControl = ShellProperties[position]; if (!isFocus) { TabItem tabItem = new TabItem() { Header = sfs.Header.Text }; tabItem.Content = sfs; tabItem.Header = sfs.Header.Text; currentTabControl.TabControlTabs.Add(tabItem); currentTabControl.TabControlIndex = currentTabControl.TabControlTabs.Count - 1; RaisePropertyChanged("ShellProperties"); if (position != ShellPosition.CENTER) { currentTabControl.TabControlVisibility = Visibility.Visible; } else { sfs.Header.Text = ""; } } else { int i = 0; for (i = 0; i < currentTabControl.TabControlTabs.Count; i++) { if ((string)currentTabControl.TabControlTabs[i].Header == parameter) { if (sfs != null) { currentTabControl.TabControlTabs[i].Content = sfs; } break; } } currentTabControl.TabControlIndex = i; } }
static ReportExplorerModelView() { Position = ShellPosition.CENTER; }
public DeviceInfoViewModel() { Position = ShellPosition.LEFT; }