protected override void Initialize(IPadWindow window) { base.Initialize(window); var tabControl = new TabbedControl(); tabControl.AddPage(new LogsWidget(logsViewModel), "Logs"); //tabControl.AddPage(new ClientsWidget(clientsViewModel), "Clients"); control = tabControl; control.ShowAll(); }
public Control buildFromNode(XmlNode node) { // przetwarzamy rekurencyjnie wszystkich synow, zbieramy te widoki, do ktorych mamy uprawnienia List <Control> controls = new List <Control>(); foreach (XmlNode child in node.ChildNodes) { Control c = buildFromNode(child); if (c != null) { controls.Add(c); } } // przetwarzamy aktualny wezel if (controls.Count == 0) { if (node.Attributes["roles"] != null && roles.Contains(node.Attributes["roles"].Value.ToString())) { string viewName = node.Attributes["viewname"].Value.ToString(); string name = node.Attributes["name"].Value.ToString(); ViewControl viewControl = new ViewControl(viewName, 400); viewControl.Name = name; return(viewControl); } else { return(null); } } // else if (controls.Count == 1) // { // return controls[0]; // } else { TabbedControl tabbedControl = new TabbedControl(controls); tabbedControl.Name = node.Attributes["name"].Value.ToString(); return(tabbedControl); } }