예제 #1
0
 public ExecuteFilesItemViewModel(string text, object tag, bool isBold = false, MvvmColor foreground = null) : base(text, tag, isBold, foreground)
 {
     Path       = System.IO.Path.GetDirectoryName(text);
     FileName   = System.IO.Path.GetFileName(text);
     StatusText = "Pendiente";
     IsChecked  = true;
 }
 public ChartSeriesItemViewModel(string text, object tag, bool isBold = false, MvvmColor foreground = null) : base(text, tag, isBold, foreground)
 {
     IsChecked = true;
     LoadComboOperations();
 }
예제 #3
0
 public TreeResultNodeViewModel(TreeSearchFilesResultViewModel trvTree, IHierarchicalViewModel parent,
                                string text, string fileName, int line, string textFound, bool isBold, MvvmColor foreground)
     : base(parent, text, null, false, isBold, foreground)
 {
     TreeViewModel = trvTree;
     if (!string.IsNullOrWhiteSpace(fileName) && line < 1)
     {
         Text = System.IO.Path.GetFileName(fileName);
     }
     FileName  = fileName;
     Line      = line;
     TextFound = textFound;
 }
예제 #4
0
        public NodeRootViewModel(BaseTreeViewModel trvTree, IHierarchicalViewModel parent, TreeReportingViewModel.NodeType type,
                                 string text, bool lazyLoad = true, bool bold = true, MvvmColor color = null) :
            base(trvTree, parent, text, type.ToString(), TreeReportingViewModel.IconType.Unknown.ToString(), type, lazyLoad, bold, color ?? MvvmColor.Red)
        {
            switch (NodeType)
            {
            case TreeReportingViewModel.NodeType.DimensionsRoot:
                Icon = TreeReportingViewModel.IconType.Dimension.ToString();
                break;

            case TreeReportingViewModel.NodeType.DataSourcesRoot:
                Icon = TreeReportingViewModel.IconType.Schema.ToString();
                break;

            case TreeReportingViewModel.NodeType.ReportsRoot:
                Icon = TreeReportingViewModel.IconType.Report.ToString();
                break;

            case TreeReportingViewModel.NodeType.File:
                Icon = TreeReportingViewModel.IconType.Field.ToString();
                break;

            case TreeReportingViewModel.NodeType.Table:
                Icon = TreeReportingViewModel.IconType.Path.ToString();
                break;
            }
        }
예제 #5
0
        /// <summary>
        ///		Añade un nodo
        /// </summary>
        protected ExplorerProjectNodeViewModel AddNode(IHierarchicalViewModel parent, string text, object tag, bool isBold, MvvmColor foreground,
                                                       string icon, bool lazyLoad = false)
        {
            ExplorerProjectNodeViewModel node = new ExplorerProjectNodeViewModel(this, parent, text, null, tag, lazyLoad, foreground);

            // Cambia la negrita
            node.IsBold     = isBold;
            node.Icon       = icon;
            node.Foreground = foreground;
            // Añade el nodo a la lista
            if (parent == null)
            {
                Children.Add(node);
            }
            else
            {
                parent.Children.Add(node);
            }
            // Devuelve el nodo
            return(node);
        }
예제 #6
0
 public BaseTreeNodeAsyncViewModel(BaseTreeViewModel trvTree, IHierarchicalViewModel parent, string text,
                                   NodeType type, IconType icon, object tag,
                                   bool lazyLoad, bool isBold = false, MvvmColor foreground = null)
     : base(trvTree, parent, text, type, icon, tag, lazyLoad, isBold, foreground)
 {
 }