@@ -38,15 +38,15 @@ private void Window_Loaded(object sender, RoutedEventArgs e)
38
38
DataContext = this ;
39
39
generalTreeItem . IsSelected = true ;
40
40
41
- channelTextBox . Text = ZChat . FirstChannel ;
42
- nickNameTextBox . Text = ZChat . InitialNickname ;
43
- serverTextBox . Text = ZChat . Server ;
44
- serverPortTextBox . Text = ZChat . ServerPort . ToString ( ) ;
45
- channelKeyTextBox . Text = ZChat . FirstChannelKey ;
41
+ channelTextBox . Text = ZChat . Options . FirstChannel ;
42
+ nickNameTextBox . Text = ZChat . Options . InitialNickname ;
43
+ serverTextBox . Text = ZChat . Options . Server ;
44
+ serverPortTextBox . Text = ZChat . Options . ServerPort . ToString ( ) ;
45
+ channelKeyTextBox . Text = ZChat . Options . FirstChannelKey ;
46
46
47
- saveConnectionInfoCheckBox . IsChecked = ZChat . SaveConnectionInfo ;
47
+ saveConnectionInfoCheckBox . IsChecked = ZChat . Options . SaveConnectionInfo ;
48
48
49
- if ( ZChat . RestoreType == ClickRestoreType . SingleClick )
49
+ if ( ZChat . Options . RestoreType == ClickRestoreType . SingleClick )
50
50
{
51
51
singleClickRestore . IsChecked = true ;
52
52
doubleClickRestore . IsChecked = false ;
@@ -57,28 +57,28 @@ private void Window_Loaded(object sender, RoutedEventArgs e)
57
57
doubleClickRestore . IsChecked = true ;
58
58
}
59
59
60
- joinsQuitsHighlight . IsChecked = ZChat . HighlightTrayIconForJoinsAndQuits ;
61
-
62
- UsersBack . Background = ZChat . UsersBack ;
63
- UsersFore . Background = ZChat . UsersFore ;
64
- EntryBack . Background = ZChat . EntryBack ;
65
- EntryFore . Background = ZChat . EntryFore ;
66
- ChatBack . Background = ZChat . ChatBack ;
67
- TimeFore . Background = ZChat . TimeFore ;
68
- NickFore . Background = ZChat . NickFore ;
69
- BracketFore . Background = ZChat . BracketFore ;
70
- TextFore . Background = ZChat . TextFore ;
71
- QueryTextFore . Background = ZChat . QueryTextFore ;
72
- OwnNickFore . Background = ZChat . OwnNickFore ;
73
- LinkFore . Background = ZChat . LinkFore ;
60
+ joinsQuitsHighlight . IsChecked = ZChat . Options . HighlightTrayIconForJoinsAndQuits ;
61
+
62
+ UsersBack . Background = ZChat . Options . UsersBack ;
63
+ UsersFore . Background = ZChat . Options . UsersFore ;
64
+ EntryBack . Background = ZChat . Options . EntryBack ;
65
+ EntryFore . Background = ZChat . Options . EntryFore ;
66
+ ChatBack . Background = ZChat . Options . ChatBack ;
67
+ TimeFore . Background = ZChat . Options . TimeFore ;
68
+ NickFore . Background = ZChat . Options . NickFore ;
69
+ BracketFore . Background = ZChat . Options . BracketFore ;
70
+ TextFore . Background = ZChat . Options . TextFore ;
71
+ QueryTextFore . Background = ZChat . Options . QueryTextFore ;
72
+ OwnNickFore . Background = ZChat . Options . OwnNickFore ;
73
+ LinkFore . Background = ZChat . Options . LinkFore ;
74
74
75
75
fontsCombo . ItemsSource = Fonts . SystemFontFamilies ;
76
- fontsCombo . SelectedValue = ZChat . Font . Source ;
76
+ fontsCombo . SelectedValue = ZChat . Options . Font . Source ;
77
77
78
- timeFormatBox . Text = ZChat . TimeStampFormat ;
79
- windowsForPrivMsgs . IsChecked = ZChat . WindowsForPrivMsgs ;
80
- lastfmUserBox . Text = ZChat . LastFMUserName ;
81
- hyperlinkPatternBox . Text = ZChat . HyperlinkPattern ;
78
+ timeFormatBox . Text = ZChat . Options . TimeStampFormat ;
79
+ windowsForPrivMsgs . IsChecked = ZChat . Options . WindowsForPrivMsgs ;
80
+ lastfmUserBox . Text = ZChat . Options . LastFMUserName ;
81
+ hyperlinkPatternBox . Text = ZChat . Options . HyperlinkPattern ;
82
82
83
83
//foreach (Plugin plugin in ZChat.LoadedScripts)
84
84
// foreach (Grid pluginGrid in plugin.GetOptionGrids())
@@ -93,41 +93,41 @@ private void Cancel_Click(object sender, RoutedEventArgs e)
93
93
94
94
private void SaveOptions ( )
95
95
{
96
- ZChat . FirstChannel = channelTextBox . Text ;
97
- ZChat . InitialNickname = nickNameTextBox . Text ;
98
- ZChat . Server = serverTextBox . Text ;
99
- try { ZChat . ServerPort = int . Parse ( serverPortTextBox . Text ) ; }
100
- catch { serverPortTextBox . Text = ZChat . ServerPort . ToString ( ) ; }
101
- ZChat . FirstChannelKey = channelKeyTextBox . Text ;
96
+ ZChat . Options . FirstChannel = channelTextBox . Text ;
97
+ ZChat . Options . InitialNickname = nickNameTextBox . Text ;
98
+ ZChat . Options . Server = serverTextBox . Text ;
99
+ try { ZChat . Options . ServerPort = int . Parse ( serverPortTextBox . Text ) ; }
100
+ catch { serverPortTextBox . Text = ZChat . Options . ServerPort . ToString ( ) ; }
101
+ ZChat . Options . FirstChannelKey = channelKeyTextBox . Text ;
102
102
103
- ZChat . SaveConnectionInfo = saveConnectionInfoCheckBox . IsChecked . Value ;
103
+ ZChat . Options . SaveConnectionInfo = saveConnectionInfoCheckBox . IsChecked . Value ;
104
104
105
105
if ( singleClickRestore . IsChecked . Value )
106
- ZChat . RestoreType = ClickRestoreType . SingleClick ;
106
+ ZChat . Options . RestoreType = ClickRestoreType . SingleClick ;
107
107
else
108
- ZChat . RestoreType = ClickRestoreType . DoubleClick ;
109
-
110
- ZChat . HighlightTrayIconForJoinsAndQuits = joinsQuitsHighlight . IsChecked . Value ;
111
-
112
- ZChat . UsersBack = ( SolidColorBrush ) UsersBack . Background ;
113
- ZChat . UsersFore = ( SolidColorBrush ) UsersFore . Background ;
114
- ZChat . EntryBack = ( SolidColorBrush ) EntryBack . Background ;
115
- ZChat . EntryFore = ( SolidColorBrush ) EntryFore . Background ;
116
- ZChat . ChatBack = ( SolidColorBrush ) ChatBack . Background ;
117
- ZChat . TimeFore = ( SolidColorBrush ) TimeFore . Background ;
118
- ZChat . NickFore = ( SolidColorBrush ) NickFore . Background ;
119
- ZChat . BracketFore = ( SolidColorBrush ) BracketFore . Background ;
120
- ZChat . TextFore = ( SolidColorBrush ) TextFore . Background ;
121
- ZChat . QueryTextFore = ( SolidColorBrush ) QueryTextFore . Background ;
122
- ZChat . OwnNickFore = ( SolidColorBrush ) OwnNickFore . Background ;
123
- ZChat . LinkFore = ( SolidColorBrush ) LinkFore . Background ;
124
-
125
- ZChat . Font = ( FontFamily ) fontsCombo . SelectedItem ;
126
-
127
- ZChat . TimeStampFormat = timeFormatBox . Text ;
128
- ZChat . WindowsForPrivMsgs = windowsForPrivMsgs . IsChecked . Value ;
129
- ZChat . LastFMUserName = lastfmUserBox . Text ;
130
- ZChat . HyperlinkPattern = hyperlinkPatternBox . Text ;
108
+ ZChat . Options . RestoreType = ClickRestoreType . DoubleClick ;
109
+
110
+ ZChat . Options . HighlightTrayIconForJoinsAndQuits = joinsQuitsHighlight . IsChecked . Value ;
111
+
112
+ ZChat . Options . UsersBack = ( SolidColorBrush ) UsersBack . Background ;
113
+ ZChat . Options . UsersFore = ( SolidColorBrush ) UsersFore . Background ;
114
+ ZChat . Options . EntryBack = ( SolidColorBrush ) EntryBack . Background ;
115
+ ZChat . Options . EntryFore = ( SolidColorBrush ) EntryFore . Background ;
116
+ ZChat . Options . ChatBack = ( SolidColorBrush ) ChatBack . Background ;
117
+ ZChat . Options . TimeFore = ( SolidColorBrush ) TimeFore . Background ;
118
+ ZChat . Options . NickFore = ( SolidColorBrush ) NickFore . Background ;
119
+ ZChat . Options . BracketFore = ( SolidColorBrush ) BracketFore . Background ;
120
+ ZChat . Options . TextFore = ( SolidColorBrush ) TextFore . Background ;
121
+ ZChat . Options . QueryTextFore = ( SolidColorBrush ) QueryTextFore . Background ;
122
+ ZChat . Options . OwnNickFore = ( SolidColorBrush ) OwnNickFore . Background ;
123
+ ZChat . Options . LinkFore = ( SolidColorBrush ) LinkFore . Background ;
124
+
125
+ ZChat . Options . Font = ( FontFamily ) fontsCombo . SelectedItem ;
126
+
127
+ ZChat . Options . TimeStampFormat = timeFormatBox . Text ;
128
+ ZChat . Options . WindowsForPrivMsgs = windowsForPrivMsgs . IsChecked . Value ;
129
+ ZChat . Options . LastFMUserName = lastfmUserBox . Text ;
130
+ ZChat . Options . HyperlinkPattern = hyperlinkPatternBox . Text ;
131
131
}
132
132
133
133
private void OK_Click ( object sender , RoutedEventArgs e )
0 commit comments