示例#1
0
        //private string path;
        //public string Path
        //{
        //    get { return path; }
        //    set { this.SetField(p => p.Path, ref path, value); }
        //}

        //public class CommandViewModelTree : ViewModelBase
        //{
        //    private CommandViewModel data;
        //    public CommandViewModel Data
        //    {
        //        get { return data; }
        //        set { this.SetField(p => p.Data, ref data, value); }
        //    }

        //    private ObservableCollection<CommandViewModelTree> childs;
        //    public ObservableCollection<CommandViewModelTree> Childs
        //    {
        //        get { return childs; }
        //        set { this.SetField(p => p.Childs, ref childs, value); }
        //    }
        //}

        private ObservableCollection <TreeElementViewModel <ReportCommandVM> > createReportCommands()
        {
            if (!LogonUser.IsAdmin)
            {
                return(new ObservableCollection <TreeElementViewModel <ReportCommandVM> >());
            }
            var cmdList = new ObservableCollection <TreeElementViewModel <ReportCommandVM> >();

            ReportVM.IsBusy      = true;
            ReportVM.BusyMessage = "در حال دریافت اطلاعات...";
            controller.GetReportsTree(res =>
            {
                buildTree("/", res, cmdList);
                ReportVM.IsBusy = false;
            });
            return(cmdList);
        }