コード例 #1
0
 private void cmdFontSknls_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         var fontChooser = new WndFontChooser(Skinless.CaptionFont, Skinless.CaptionColor)
         {
             Owner = this
         };
         var result = fontChooser.ShowDialog();
         if (result.HasValue && result.Value)
         {
             Skinless = new PNSkinlessDetails
             {
                 CaptionFont  = fontChooser.SelectedFont,
                 CaptionColor = fontChooser.SelectedColor,
                 BackColor    = Skinless.BackColor
             };
             blkCaption.DataContext = Skinless.CaptionFont;
             _CustomSkinless        = true;
         }
     }
     catch (Exception ex)
     {
         PNStatic.LogException(ex);
     }
 }
コード例 #2
0
 private void cmdFontSknls_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         var fc = new WndFontChooser(m_Group.Skinless.CaptionFont, m_Group.Skinless.CaptionColor)
         {
             Owner = this
         };
         var showDialog = fc.ShowDialog();
         if (showDialog != null && showDialog.Value)
         {
             m_Group.Skinless.CaptionFont  = fc.SelectedFont;
             m_Group.Skinless.CaptionColor = fc.SelectedColor;
             PNStatic.DrawSkinlessPreview(m_Group, brdFrame, blkCaption, brdBody, blkBody);
         }
     }
     catch (Exception ex)
     {
         PNStatic.LogException(ex);
     }
 }
コード例 #3
0
 private void cmdFontSknls_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         var fontChooser = new WndFontChooser(Skinless.CaptionFont, Skinless.CaptionColor) { Owner = this };
         var result = fontChooser.ShowDialog();
         if (result.HasValue && result.Value)
         {
             Skinless = new PNSkinlessDetails
             {
                 CaptionFont = fontChooser.SelectedFont,
                 CaptionColor = fontChooser.SelectedColor,
                 BackColor = Skinless.BackColor
             };
             blkCaption.DataContext = Skinless.CaptionFont;
             _CustomSkinless = true;
         }
     }
     catch (Exception ex)
     {
         PNStatic.LogException(ex);
     }
 }
コード例 #4
0
 private void cmdFontSknls_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         var gr = selectedGroup();
         if (gr == null) return;
         var fc = new WndFontChooser(gr.Skinless.CaptionFont, gr.Skinless.CaptionColor) { Owner = this };
         var showDialog = fc.ShowDialog();
         if (showDialog != null && showDialog.Value)
         {
             gr.Skinless.CaptionFont = fc.SelectedFont;
             gr.Skinless.CaptionColor = fc.SelectedColor;
             PNStatic.DrawSkinlessPreview(gr, brdFrame, blkCaption, brdBody, blkBody);
         }
     }
     catch (Exception ex)
     {
         PNStatic.LogException(ex);
     }
 }
コード例 #5
0
 private void cmdSetFontUI_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         var fd = new WndFontChooser(PNSingleton.Instance.FontUser) { Owner = this };
         var showDialog = fd.ShowDialog();
         if (showDialog == null || !showDialog.Value) return;
         PNSingleton.Instance.FontUser.FontFamily = fd.SelectedFont.FontFamily;
         PNSingleton.Instance.FontUser.FontSize = fd.SelectedFont.FontSize;
         PNSingleton.Instance.FontUser.FontStretch = fd.SelectedFont.FontStretch;
         PNSingleton.Instance.FontUser.FontStyle = fd.SelectedFont.FontStyle;
         PNSingleton.Instance.FontUser.FontWeight = fd.SelectedFont.FontWeight;
         PNData.SaveFontUi();
         cmdRestoreFontUI.IsEnabled = true;
     }
     catch (Exception ex)
     {
         PNStatic.LogException(ex);
     }
 }