Example #1
0
 public Girl GetCurrentGirl()
 {
     if (_current == null)
     {
         _current = Girls.First(g => g.Name == Selected);
     }
     return(_current);
 }
        public void SetGirl([NotNull] Girl girl)
        {
            Asure.NotNull(girl, girl.Path, girl.Name, girl.Quotes);

            QuoteShown = false;
            BitmapImage image = Api.Api.CreateImageFromPath(girl.Path);

            this.girlImage.Source  = image;
            this.girlImage.ToolTip = girl.Name;
        }
Example #3
0
        public void SetGirl([NotNull] Girl girl)
        {
            Asure.NotNull(girl);
            _mainWindow.SetGirl(girl);
            _mainWindow.QuoteProvider = new GirlQuoteProvider(girl.Quotes,
                                                              _emojiConfig.GetQuoteAnalizer());

            if (_visible == false)
            {
                _mainWindow.Show();
                _visible = true;
            }
        }
Example #4
0
        private void confirmButton_Click(object sender, RoutedEventArgs e)
        {
            if (string.IsNullOrEmpty(GirlImagePath) || string.IsNullOrEmpty(GirlName))
            {
                return;
            }

            string quote = Quotes[0].Value;

            if (Quotes.Count == 1 && (quote == "..." || quote.Length < 2))
            {
                return;
            }

            var girl = new Girl()
            {
                Name   = GirlName,
                Path   = GirlImagePath,
                Quotes = Quotes.Where(q => q.Value != "...").Select(q => q.Value).ToList()
            };

            _callback.Invoke(girl);
            Close();
        }
Example #5
0
 public void SetCurrentGirl(Girl girl)
 {
     _current = girl;
     Selected = girl.Name;
 }
Example #6
0
 public void AddGirl([NotNull] Girl girl)
 {
     _config.Girls.Add(girl);
     _pendingChanges = true;
     //WriteConfig();
 }