private void RefreshServiceHistoryLogFiles(ServiceEntity service) { BarListItem bliLogs = MenuItemHelper.Instance.Buttons[MenuItem.ViewHistoryLog] as BarListItem; bliLogs.Strings.Clear(); if (service != null) { string logPath = Path.Combine( Path.GetDirectoryName(service.ServiceHomePath), "Logs"); string currengLogPath = Path.Combine( logPath, $"IRAPS7GatewayConsole-{DateTime.Now.ToString("yyyy-MM-dd")}.log"); if (Directory.Exists(logPath)) { string[] files = Directory.GetFiles(logPath); for (int i = 0; i < files.Length; i++) { if (files[i].ToUpper() == currengLogPath.ToUpper()) { continue; } bliLogs.Strings.Add(Path.GetFileName(files[i])); } } } bliLogs.Enabled = bliLogs.Strings.Count > 0; }
private void openRecentBarListItem_GetItemData(object sender, EventArgs e) { BarListItem bar = sender as BarListItem; if (bar.Strings.Count > 0) { return; } }
BarListItem CreateLayoutModeBarItem() { BarListItem barItem = new BarListItem(); barItem.Caption = barListLayoutCaption; barItem.ImageOptions.SvgImage = global::MultiPaneExtension.Properties.Resources.LayoutModeButton; barItem.ShowChecks = true; barItem.Strings.Add("Grid"); barItem.Strings.Add("Linear"); barItem.ListItemClick += BarItem_ListItemClick; barItem.RibbonStyle = RibbonItemStyles.All; return(barItem); }
private void openRecentBarListItem_ListItemClick(object sender, ListItemClickEventArgs e) { if (this.SaveFileDialogHelper() != DialogResult.OK) { return; } BarListItem bar = sender as BarListItem; string str = bar.Strings[e.Index]; this.DefaultFileName = Path.GetFileName(str); this.DefaultPath = Path.GetDirectoryName(str); this.FileOpened = true; this.UpdateFileNameLabel(); this.UpdateFileStatusLabel(); }
//void OnAllowCollapsingClick(object sender, ItemClickEventArgs e) //{ // ChartDashboardItem dashboardItem = dashboardDesigner.SelectedDashboardItem as ChartDashboardItem; // MultiPaneSettings settings = MultiPaneSettings.FromJson(dashboardItem.CustomProperties[customPropertyName]); // settings.AllowPaneCollapsing = !settings.AllowPaneCollapsing; // string status = settings.AllowPaneCollapsing == true ? "enabled" : "disabled"; // CustomPropertyHistoryItem historyItem = new CustomPropertyHistoryItem(dashboardItem, customPropertyName, settings.ToJson(), $"Pane Collapsing for {dashboardItem.ComponentName} is {status}"); // dashboardDesigner.AddToHistory(historyItem); // UpdateBarItems(); //} void AddButtonToRibbon() { RibbonControl ribbon = dashboardDesigner.Ribbon; RibbonPage page = ribbon.GetDashboardRibbonPage(DashboardBarItemCategory.ChartTools, DashboardRibbonPage.Design); RibbonPageGroup group = page.GetGroupByName(ribonPageGroupName); if (group == null) { group = new RibbonPageGroup(ribonPageGroupName) { Name = ribonPageGroupName }; page.Groups.Add(group); } enableBarItem = CreateEnableBarItem(); showTitlesBarItem = CreateShowTitlesBarItem(); allowCollapsingBarItem = CreateAllowCollapsingBarItem(); layoutModeBarItem = CreateLayoutModeBarItem(); group.ItemLinks.Add(enableBarItem); group.ItemLinks.Add(showTitlesBarItem); group.ItemLinks.Add(allowCollapsingBarItem); group.ItemLinks.Add(layoutModeBarItem); }
// GET: Hotel public ActionResult Index() { var model = new BarListItem[0]; return(View(model)); }
public bool DatosValidosPedido(Pedido pedido, BarListItem lista) { bool result = true; if (pedido.Requisicion == null) { result = false; lista.Strings.Add("Requisicion requerida"); } if (!Util.FechaValida(pedido.FechaPedido)) { result = false; lista.Strings.Add("Fecha Pedido requerida"); } if (!Util.FechaValida(deFechaInicial.DateTime)) { result = false; lista.Strings.Add("Fecha Inicial requerida"); } if (!Util.FechaValida(deFechaFinal.DateTime)) { result = false; lista.Strings.Add("Fecha Final requerida"); } if (deFechaInicial.DateTime.CompareTo(deFechaFinal.DateTime) > 0) { result = false; lista.Strings.Add("Fecha inicial debe ser mayor fecha final"); } if (pedido.Fundamento == null) { result = false; lista.Strings.Add("Fundamento requerido"); } if (pedido.CatActividad == null) { result = false; lista.Strings.Add("Actividad requerida"); } if (pedido.Iva == null) { result = false; lista.Strings.Add("Iva requerido"); } if (pedido.CatPresupuesto == null) { result = false; lista.Strings.Add("Cargo a requerido"); } lblNumErrors.Caption = lista.Strings.Count + " Errores"; return result; }