示例#1
0
 private void lp_backgroundcolor_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     try
     {
         BackgroundColorList val = (BackgroundColorList)lp_backgroundcolor.SelectedItem;
         IsolatedStorageSettings.ApplicationSettings["Appsetting_backgroundcolor"] = val.Color;
     }
     catch (Exception)
     {
         //예외는 무시
     }
 }
示例#2
0
        private void setColorSetting(string backgroundcolor, string fontcolor)
        {
            lp_fontcolor.ItemsSource = Fontcolorlists;
            _fontcolor.Add(new FontColorList("Black"));
            _fontcolor.Add(new FontColorList("White"));
            _fontcolor.Add(new FontColorList("Magenta"));
            _fontcolor.Add(new FontColorList("Teal"));
            _fontcolor.Add(new FontColorList("Orange"));

            lp_backgroundcolor.ItemsSource = Backgroundcolorlists;
            _backgroundcolor.Add(new BackgroundColorList("White"));
            _backgroundcolor.Add(new BackgroundColorList("Black"));
            _backgroundcolor.Add(new BackgroundColorList("Magenta"));
            _backgroundcolor.Add(new BackgroundColorList("Teal"));
            _backgroundcolor.Add(new BackgroundColorList("Orange"));

            try
            {
                //lb_dropboxdata.SelectedIndex = -1;
                for (int i = 0; i < _fontcolor.Count; i++)
                {
                    FontColorList fcl = (FontColorList)lp_fontcolor.Items[i];
                    if (fcl.Color == fontcolor)
                    {
                        lp_fontcolor.SelectedIndex = i;
                        break;
                    }
                }
                for (int j = 0; j < _backgroundcolor.Count; j++)
                {
                    BackgroundColorList bcl = (BackgroundColorList)lp_backgroundcolor.Items[j];
                    if (bcl.Color == backgroundcolor)
                    {
                        lp_backgroundcolor.SelectedIndex = j;
                        break;
                    }
                }
            }
            catch (Exception)
            {
            }
        }