Esempio n. 1
0
        private void GetSavedSettings()
        {
            var SavedTheme = _globalConfigService.Get(AppSettingsParam.AppTheme);
            var SavedColor = _globalConfigService.Get(AppSettingsParam.AppColor);

            ThemeManager.ChangeAppTheme(Application.Current, SavedTheme.ToString());

            var NewTheme = ThemeManager.DetectAppStyle(Application.Current);
            var NewColor = ThemeManager.GetAccent(SavedColor.ToString());

            ThemeManager.ChangeAppStyle(Application.Current, NewColor, NewTheme.Item1);
        }
        public ObservableCollection <ConfigurationDataItem> GetItemsCollection(string collectionName)
        {
            var configurationCollection = new ObservableCollection <ConfigurationDataItem>();

            var subfolders = FoldersHelper.GetSubFolders(Path.Combine(_globalSettings.Get("ItemsPath").ToString(), collectionName));

            foreach (var folder in subfolders)
            {
                configurationCollection.Add(new ConfigurationDataItem(folder));
            }

            return(configurationCollection);
        }
Esempio n. 3
0
        protected override void Print()
        {
            string path = (string)_settings.Get(SettingsNames.PAYM_REPORT_PATH);
            ExcelFileProperties prop = new ExcelFileProperties();

            prop.PrintDirectly    = false;
            prop.Path             = path;
            prop.StartRowIndex    = 3;
            prop.StartcolumnIndex = 1;
            prop.Source           = PaymentDetailsReport.FillData(_uiReportList);
            try
            {
                ExcelPrinterBase printer = new PaymentTransTempPrinter();
                printer.Print(prop);
            }
            catch (Exception ex)
            {
                Helper.LogAndShow(ex);
            }
        }
Esempio n. 4
0
        private async Task SyncShareHolders()
        {
            var familyDbPath = (string)_settings.Get(SettingsNames.FAMILY_DB_PATH);

            if (string.IsNullOrEmpty(familyDbPath))
            {
                var msg = ""; // Properties.Resources.SyncMembersView_FamilyDbMissing;
                Helper.ShowMessage(msg);
                return;
            }
            await Task.Run(() =>
            {
                var familyAppRepo    = new Repository(familyDbPath);
                var familyAppMembers = familyAppRepo.GetShareHolders().ToList();
                var myFlopMembers    = _unitOfWork.FamilyMembers;
                var current          = 0;
                var count            = familyAppMembers.Count;
                foreach (var familyMember in familyAppMembers)
                {
                    var exist = myFlopMembers.Any(shHo => shHo.Code == familyMember.Code);
                    if (!exist)
                    {
                        var newMember = new FamilyMember
                        {
                            Code             = familyMember.Code,
                            Parent           = familyMember.Parent,
                            FirstName        = familyMember.FirstName,
                            FullName         = familyMember.FullName,
                            MotherCode       = familyMember.MotherCode,
                            Independent      = familyMember.Independent,
                            IndependentDate  = familyMember.IndependentDate,
                            Alive            = familyMember.Alive,
                            HasChildren      = familyMember.HasChildren,
                            Shares           = familyMember.Shares,
                            XShares          = familyMember.XShares,
                            Buffer           = familyMember.Buffer,
                            ShareHolderLevel = familyMember.ShareHolderLevel,
                            Sex       = familyMember.Sex,
                            PayMethod = PayMethod.BankTransfer
                        };

                        myFlopMembers.Add(newMember);
                    }
                    else
                    {
                        var existingMember              = myFlopMembers.Single(sh => sh.Code == familyMember.Code);
                        existingMember.Parent           = familyMember.Parent;
                        existingMember.FirstName        = familyMember.FirstName;
                        existingMember.FullName         = familyMember.FullName;
                        existingMember.MotherCode       = familyMember.MotherCode;
                        existingMember.Independent      = familyMember.Independent;
                        existingMember.IndependentDate  = familyMember.IndependentDate;
                        existingMember.Alive            = familyMember.Alive;
                        existingMember.HasChildren      = familyMember.HasChildren;
                        existingMember.Shares           = familyMember.Shares;
                        existingMember.XShares          = familyMember.XShares;
                        existingMember.Buffer           = familyMember.Buffer;
                        existingMember.ShareHolderLevel = familyMember.ShareHolderLevel;
                        existingMember.Sex              = familyMember.Sex;
                    }
                    UpdateProgress(count, current);
                    current++;
                }
            });
        }