public bool ReportItemSettingsDialog(AppSettings settings, string name, string desc, bool useCustomIcon, GizmoComputerHardwareIconsEnum customIcon, TreeItem root, ReportSettings reportSettings) { ReportDialog dialog = new ReportDialog(settings, name, desc, useCustomIcon, customIcon, root, reportSettings); switch (dialog.ShowDialog()) { case true: Name = (dialog.DataContext as ReportItemSettingsViewModel).ReportName; Description = (dialog.DataContext as ReportItemSettingsViewModel).ReportDescription; UseCustomIcon = (dialog.DataContext as ReportItemSettingsViewModel).UseCustomIcon; CustomIcon = (dialog.DataContext as ReportItemSettingsViewModel).CustomIcon; ReportSettings = new ReportSettings() { ReportSourceContainerId = (dialog.DataContext as ReportItemSettingsViewModel).SelectedContainer.Id, ReportTimeStamp = DateTime.Now, Columns = (dialog.DataContext as ReportItemSettingsViewModel).Columns, ReportType = (ReportTypeEnum)(dialog.DataContext as ReportItemSettingsViewModel).SelectedReportTypeItem.Value, ComponentItem = (ComponentTypeEnum)(dialog.DataContext as ReportItemSettingsViewModel).SelectedComponentItem.Value, EachValueIsASepareteRow = (dialog.DataContext as ReportItemSettingsViewModel).EachValueIsASepareteRow }; return(true); default: return(false); } }
public bool ReportItemSettingsDialog(AppSettings settings, TreeItem root) { ReportDialog dialog = new ReportDialog(settings, root); switch (dialog.ShowDialog()) { case true: Name = (dialog.DataContext as ReportItemSettingsViewModel).ReportName; Description = (dialog.DataContext as ReportItemSettingsViewModel).ReportDescription; UseCustomIcon = (dialog.DataContext as ReportItemSettingsViewModel).UseCustomIcon; CustomIcon = (dialog.DataContext as ReportItemSettingsViewModel).CustomIcon; ReportSettings = new ReportSettings() { ReportSourceContainerId = (dialog.DataContext as ReportItemSettingsViewModel).SelectedContainer != null ? (dialog.DataContext as ReportItemSettingsViewModel).SelectedContainer.Id : new Guid(), ReportTimeStamp = DateTime.Now, Columns = (dialog.DataContext as ReportItemSettingsViewModel).Columns, ReportType = (ReportTypeEnum)(dialog.DataContext as ReportItemSettingsViewModel).SelectedReportTypeItem.Value, ComponentItem = (ComponentTypeEnum)(dialog.DataContext as ReportItemSettingsViewModel).SelectedComponentItem.Value, EachValueIsASepareteRow = (dialog.DataContext as ReportItemSettingsViewModel).EachValueIsASepareteRow }; return(true); default: return(false); } }
private void FillWrapPanelWithIcons(bool useCustomIcon, GizmoComputerHardwareIconsEnum customIcon) { foreach (var node in GizmoIconHelper.GetIconsByCategory("Item Icons")) { var btn = new UIButton() { Flat = useCustomIcon == true && node == customIcon ? false : useCustomIcon == false && node == GizmoComputerHardwareIconsEnum.Report ? false : true, Tag = node, Width = 30, Height = 30, Margin = new Thickness(3), Content = new GizmoIcon() { Icon = node, FontSize = 16, IconFontFamily = Application.Current.Resources["GizmoIcon"] as FontFamily } }; btn.Click += Btn_Click; wpIconList.Children.Add(btn); } }
public bool ReportContainerSettingsDialog(AppSettings settings, string name, string desc, bool useCustomIcon, GizmoComputerHardwareIconsEnum customIcon) { ReportContainerDialog dialog = new ReportContainerDialog(settings, name, desc, useCustomIcon, customIcon); switch (dialog.ShowDialog()) { case true: Name = (dialog.DataContext as ReportContainerSettingsViewModel).ContainerName; Description = (dialog.DataContext as ReportContainerSettingsViewModel).ContainerDescription; UseCustomIcon = (dialog.DataContext as ReportContainerSettingsViewModel).UseCustomIcon; CustomIcon = (dialog.DataContext as ReportContainerSettingsViewModel).CustomIcon; return(true); default: return(false); } }
public bool ReportContainerSettingsDialog(AppSettings settings) { ReportContainerDialog dialog = new ReportContainerDialog(settings); switch (dialog.ShowDialog()) { case true: Name = (dialog.DataContext as ReportContainerSettingsViewModel).ContainerName; Description = (dialog.DataContext as ReportContainerSettingsViewModel).ContainerDescription; UseCustomIcon = (dialog.DataContext as ReportContainerSettingsViewModel).UseCustomIcon; CustomIcon = (dialog.DataContext as ReportContainerSettingsViewModel).CustomIcon; return(true); default: return(false); } }
public ReportDialog(AppSettings settings, string name, string description, bool useCustomIcon, GizmoComputerHardwareIconsEnum customIcon, TreeItem root, ReportSettings reportSettings) { Owner = Application.Current.MainWindow; InitializeComponent(); ThemeManager.ApplyThemeToWindow(this, settings.Theme); DataContext = new ReportItemSettingsViewModel(name, description, useCustomIcon, customIcon, root, reportSettings); FillWrapPanelWithIcons(useCustomIcon, customIcon); }