/// <summary> /// #0 Called when the screen is constructed /// </summary> /// <param name="platform"></param> public override void init(IPlatform platform) { menu = new aceMenu(); menu.menuTitle = "Welcome menu"; menu.setItems(this); messageSection = new smartMessageSection(messageTitle, message, platform.height, platform.width, 2, 2); messageSection.height = 17; messageSection.margin.top = 3; messageSection.margin.bottom = 1; messageSection.padding.bottom = 1; messageSection.doInverseColors = false; messageSection.backColor = platformColorName.Black; messageSection.foreColor = platformColorName.Gray; menuSection = new smartMenuSection(menu, platform.height, platform.width, 2, 1); menuSection.renderView = textInputMenuRenderView.inlineKeyListGroup; menuSection.doShowTitle = false; menuSection.doInverseColors = false; menuSection.padding.top = 1; menuSection.padding.bottom = 1; menuSection.backColor = platformColorName.White; menuSection.foreColor = platformColorName.Blue; menuSection.setStyle(textSectionLineStyleName.itemlinst); messageSection.setAttachment(menuSection); layout.addLayer(messageSection, layerBlending.transparent, 50); }
public smartMenuSection(aceMenu __menu, IHasCursor forLayout, textInputMenuRenderView __renderView) : base(__menu, forLayout.height, forLayout.width, 0, 0) { margin = forLayout.margin; padding = forLayout.padding; renderView = __renderView; }
/// <summary> /// Dijalog kojim se edituju propertiji nekog objekta. Podrzava paginaciju /// </summary> /// <param name="platform">Platforma na kojoj se prikazuje dijalog</param> /// <param name="targetObject">Objekat koi se edituje</param> public dialogMessageBoxWithOptions(IPlatform platform, String title, String description, IEnumerable <T> options) : base(platform) { layoutTitleMessage = title; layoutStatusMessage = description; init(platform); // Definicija izgleda ovog dijaloga dialogFormatSettings format = new dialogFormatSettings(dialogStyle.redDialog, dialogSize.messageBox); // Primenjuje pravila formatiranja format.apply(this, platform); backgroundDecoration = "="; writeBackground(null, true); //var titleDiv = new smartMessageSection(title, description, height, width, 2, 2); //titleDiv.setStyle(textSectionLineStyleName.heading); var menu = new aceMenu(); menu.setItems(options); var menuDiv = new smartMenuSection(menu, this, textInputMenuRenderView.inlineKeyListGroup); menuDiv.doShowValueRemarks = false; menuDiv.doShowTitle = false; menuDiv.doShowRemarks = false; header.setAttachment(menuDiv); // titleDiv.setAttachment(menuDiv); // addLayer(titleDiv, layerBlending.transparent, 100); }
public void refresh() { IEnumerable items = target.value as IEnumerable; menu = new aceMenu(); menu.menuTitle = "Inside " + target.pi.DeclaringType.Name + "->" + target.displayName + " collection"; menu.menuDescription = "Collection type [" + target.pi.PropertyType.ToString() + "]"; pageManager = new textPageManager <aceMenuItem>(10, 100, 1); itemSettings = null; Int32 c = 0; foreach (var t in items) { if (itemSettings == null) { itemSettings = new settingsEntriesForObject(t); } var mi = new aceMenuItem(t.ToString(), c.ToString(), t.GetType().Name, "", t); menu.setItem(mi); } }
public smartMenuSection(aceMenu __menu, int _height, int __width, int __leftRightMargin = 0, int __leftRightPadding = 0) : base(__menu, _height, __width, __leftRightMargin, __leftRightPadding) { doShowTitle = true; doShowRemarks = true; doShowInstructions = true; renderView = textInputMenuRenderView.listItemSelectable; }
//public textInputMenuBase(aceMenu __menu, IPlatform platform, int __leftRightMargin = 0, int __leftRightPadding = 0): base(0, __width, __leftRightMargin, __leftRightPadding) //{ //} protected textInputMenuBase(aceMenu __menu, int _height, int __width, int __leftRightMargin = 0, int __leftRightPadding = 0) : base(_height, __width, __leftRightMargin, __leftRightPadding) { if ((__menu == null) && (menu == null)) { menu = new aceMenu(); } menu = __menu; updateFormats(); }
protected virtual void init(IAceComponent component) { commands = new aceMenu(); commands.setItems(this, component); Type consoleType = this.GetType(); output = new builderForLog(consoleType.Name + "_output", false); response = new builderForLog(consoleType.Name + "_response", false); consoleIsRunning = true; }
/// <summary> /// Dijalog kojim se edituju propertiji nekog objekta. Podrzava paginaciju /// </summary> /// <param name="platform">Platforma na kojoj se prikazuje dijalog</param> /// <param name="targetObject">Objekat koi se edituje</param> public dialogPageViewerWithMenu(IPlatform platform, IEnumerable <String> content, String title, String description, T[] spec) : base(platform) { layoutTitleMessage = title; layoutStatusMessage = description; init(platform); // Definicija izgleda ovog dijaloga dialogFormatSettings format = new dialogFormatSettings(dialogStyle.greenDialog, dialogSize.fullScreenBox); // Primenjuje pravila formatiranja format.apply(this, platform); backgroundDecoration = "="; // writeBackground(null, true); //var titleDiv = new smartMessageSection(title, description, height, width, 2, 2); Int32 h = height - header.outerBottomPosition; var editorDiv = new smartPageViewer(content, h, width, 0, 0); // titleDiv.setAttachment(editorDiv); var menu = new aceMenu(); //menu.setItems(spec); //var menuDiv = new smartMenuSection(menu, this, textInputMenuRenderView.inlineKeyListGroup); //menuDiv.doShowValueRemarks = false; //menuDiv.doShowTitle = false; //menuDiv.doShowRemarks = false; header.setAttachment(editorDiv); // editorDiv.setAttachment(menuDiv); //header.refreshAttachmentPosition(); // editorDiv.setAttachment(menuDiv); // addLayer(menuDiv, layerBlending.transparent, 100); }
/// <summary> /// Izvrsava se svaki put kad treba azurirati strukturu sadrzaja prema DataModel izvoru /// </summary> public void refresh() { if (String.IsNullOrEmpty(path)) { path = ""; } if (File.Exists(path)) { filename = Path.GetFileName(path); path = Path.GetDirectoryName(path); } files = new fileSystemList(path, selectMode, extension); menu = new aceMenu(); switch (selectMode) { case dialogSelectFileMode.selectPath: menu.menuTitle = "Select directory path"; //items.AddRange(Directory.EnumerateDirectories(path)); break; case dialogSelectFileMode.selectFileToOpen: menu.menuTitle = "Select file to load (".add(files.pattern, " ").add(")", " "); //items.AddRange(Directory.EnumerateDirectories(path, "*", SearchOption.TopDirectoryOnly)); //items.AddRange(Directory.EnumerateFiles(path, pattern, SearchOption.TopDirectoryOnly)); break; case dialogSelectFileMode.selectFileToSave: menu.menuTitle = "Select file or type filename (*".add(extension, ".") + ")"; //items.AddRange(Directory.EnumerateDirectories(path, "*", SearchOption.TopDirectoryOnly)); //items.AddRange(Directory.EnumerateFiles(path, pattern, SearchOption.TopDirectoryOnly)); break; } foreach (var di in files.directories) { String nm = ""; aceMenuItem menuItem = null; if (files.rootDirectory.Parent != null) { if (di.FullName == files.rootDirectory.Parent.FullName) { nm = ".."; menuItem = new aceMenuItem(nm, "", "<dir>", "<lock>", di); menuItem.helpLine = "Move to parent"; } } if (files.rootDirectory != null) { if (di.FullName == files.rootDirectory.FullName) { nm = "."; menuItem = new aceMenuItem(nm, "", "<dir>", "<lock>", di); menuItem.helpLine = "This directory"; } } if (String.IsNullOrEmpty(nm)) { nm = di.FullName.Replace(files.rootDirectory.FullName, ""); menuItem = new aceMenuItem(nm, "", "<dir>", "<lock>", di); menuItem.helpLine = di.FullName; } menu.setItem(menuItem); //if (path == di.FullName) //{ // menu.selected = menuItem; //} } foreach (var di in files.files) { aceMenuItem menuItem = new aceMenuItem(di.Name, "", di.LastWriteTime.ToShortDateString(), "", di); menuItem.helpLine = di.FullName; menu.setItem(menuItem); //if (path == di.FullName) //{ // menu.selected = menuItem; //} } pageManager = new textPageManager <aceMenuItem>(10); pageManager.refresh(menu); }
public smartMenuPropertyEditor(aceMenu __menu, int _height, int __width, int __leftRightMargin = 0, int __leftRightPadding = 0) : base(__menu, _height, __width, __leftRightMargin, __leftRightPadding) { }