PageRenderTime 20ms CodeModel.GetById 15ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/IronPython_Main/Tools/IronStudio/IronPythonTools/IronPythonTools/Options/PythonIntellisenseOptionsControl.cs

#
C# | 45 lines | 26 code | 6 blank | 13 comment | 0 complexity | 4a609929a42739bf27bc57f6e3dff901 MD5 | raw file
 1/* ****************************************************************************
 2 *
 3 * Copyright (c) Microsoft Corporation. 
 4 *
 5 * This source code is subject to terms and conditions of the Apache License, Version 2.0. A 
 6 * copy of the license can be found in the License.html file at the root of this distribution. If 
 7 * you cannot locate the Apache License, Version 2.0, please send an email to 
 8 * ironpy@microsoft.com. By using this source code in any fashion, you are agreeing to be bound 
 9 * by the terms of the Apache License, Version 2.0.
10 *
11 * You must not remove this notice, or any other, from this software.
12 *
13 * ***************************************************************************/
14
15using System;
16using System.Windows.Forms;
17using Microsoft.IronStudio.Core.Repl;
18
19namespace Microsoft.IronPythonTools.Options {
20    public partial class PythonIntellisenseOptionsControl : UserControl {        
21        public PythonIntellisenseOptionsControl() {
22            InitializeComponent();
23            _enterCommits.Checked = IronPythonToolsPackage.Instance.IntellisenseOptionsPage.EnterCommitsIntellisense;
24            _intersectMembers.Checked = IronPythonToolsPackage.Instance.IntellisenseOptionsPage.IntersectMembers;
25            _completionCommitedBy.Text = IronPythonToolsPackage.Instance.IntellisenseOptionsPage.CompletionCommittedBy;
26            _newLineAfterCompleteCompletion.Checked = IronPythonToolsPackage.Instance.IntellisenseOptionsPage.AddNewLineAtEndOfFullyTypedWord;
27        }
28
29        private void _enterCommits_CheckedChanged(object sender, EventArgs e) {
30            IronPythonToolsPackage.Instance.IntellisenseOptionsPage.EnterCommitsIntellisense = _enterCommits.Checked;
31        }
32
33        private void _intersectMembers_CheckedChanged(object sender, EventArgs e) {
34            IronPythonToolsPackage.Instance.IntellisenseOptionsPage.IntersectMembers = _intersectMembers.Checked;
35        }
36
37        private void _completionCommitedBy_TextChanged(object sender, EventArgs e) {
38            IronPythonToolsPackage.Instance.IntellisenseOptionsPage.CompletionCommittedBy = _completionCommitedBy.Text;
39        }
40
41        private void _newLineAfterCompleteCompletion_CheckedChanged(object sender, EventArgs e) {
42            IronPythonToolsPackage.Instance.IntellisenseOptionsPage.AddNewLineAtEndOfFullyTypedWord = _newLineAfterCompleteCompletion.Checked;
43        }
44    }
45}