public IConfigirationControl GetConfigControl(ConfigurationBase config)
        {
            var soundSettingsModel = new SoundSettingsModel();
            soundSettingsModel.Initialize((SoundPluginConfiguration)config);

            return new SoundSettingsView
            {
                DataContext = soundSettingsModel
            };
        }
        public IConfigirationControl GetConfigControl()
        {
            var soundSettingsModel = new SoundSettingsModel();
            soundSettingsModel.Initialize(this.configuration);

            return new SoundSettingsView
            {
                DataContext = soundSettingsModel
            };
        }
        public static SettingsModel GetDefaultSettings()
        {
            GeneralSettingsModel general = new GeneralSettingsModel()
            {
                ThemeBase = new ThemeBaseModel
                {
                    Name        = "BaseLight",
                    DisplayName = "Light",
                    SourceUri   = "pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml"
                },
                ThemeAccent = new ThemeAccentModel
                {
                    Name      = "Cobalt",
                    ColorCode = "#FF0050EF",
                    SourceUri = "pack://application:,,,/MahApps.Metro;component/Styles/Accents/Cobalt.xaml"
                },
                TopMost = false
            };

            AlertSettingsModel alerts = new AlertSettingsModel()
            {
                BuyTypeColor                = media.Brushes.Green,
                SellTypeColor               = media.Brushes.Red,
                OtherTypesColor             = media.Brushes.Yellow,
                PriceColor                  = media.Brushes.SlateGray,
                SymbolColor                 = media.Brushes.DarkGoldenrod,
                TriggeredByColor            = media.Brushes.DeepPink,
                TimeFrameColor              = media.Brushes.DarkMagenta,
                TimeColor                   = media.Brushes.DimGray,
                MaxAlertNumber              = 100,
                MaxPriceDecimalPlacesNumber = 5,
                CommentFontModel            = new FontModel()
                {
                    Family = media.Fonts.SystemFontFamilies.FirstOrDefault(family => family.Source.Equals("Arial",
                                                                                                          StringComparison.InvariantCultureIgnoreCase)),
                    WeightModel = new FontWeightModel()
                    {
                        Name = "Normal", Weight = windows.FontWeights.Normal
                    },
                    StyleModel = new FontStyleModel()
                    {
                        Name = "Normal", Style = windows.FontStyles.Normal
                    },
                    Size = 20
                },
                TimeFormat = TimeFormat.TwentyFourHour,
                TimeZone   = TimeZoneInfo.GetSystemTimeZones().FirstOrDefault(tz => tz.BaseUtcOffset.Equals(DateTimeOffset.Now.Offset)),
            };

            SoundSettingsModel sound = new SoundSettingsModel();

            EmailSettingsModel email = new EmailSettingsModel()
            {
                Template        = GetDefaultEmailTemplate(),
                DefaultTemplate = GetDefaultEmailTemplate(),
            };

            TelegramSettingsModel telegram = new TelegramSettingsModel()
            {
                DefaultMessageTemplate = GetDefaultTelegramMessageTemplate(),
                MessageTemplate        = GetDefaultTelegramMessageTemplate(),
                Conversations          = new ObservableCollection <TelegramConversation>()
            };

            SettingsModel Settings = new SettingsModel()
            {
                General  = general,
                Alerts   = alerts,
                Sound    = sound,
                Email    = email,
                Telegram = telegram
            };

            return(Settings);
        }