public DictionaryForm()
        {
            CheckForIllegalCrossThreadCalls = false;
              InitializeComponent();  //Initialize all Form components.
              spellingChecker = new SpellCheck();  //Create a new spell checker object.
              theHeadword = new Headword();

              setupSQL();

              // Create a SQL DATABASE if one doesn't exist;

              // Create a clock for the application.
              clockSetup();

              // Initialize semantic and social fields by reading
              // in the values from the class and populating the ComboBoxes.
              semanticSocial = new SemanticSocial();
              for (int i = 0; i < semanticSocial.ListCount; i++)
              {
            lb_Semantics.Items.Add(semanticSocial[i].Semantic);
            lb_SocialUsage.Items.Add(semanticSocial[i].Social);
              }

              // Set the first item to be selected/highlighted in the GUI.
              lb_Semantics.SelectedIndex = 0;
              lb_SocialUsage.SelectedIndex = 0;
        }
Example #2
0
        public DictionaryForm()
        {
            InitializeComponent();              //Initialize all Form components.
            spellingChecker = new SpellCheck(); //Create a new spell checker object.
            theHeadword     = new Headword();

            CheckForIllegalCrossThreadCalls = false;

            // Create a clock for the application.
            timer = new Timer();
            timer.Start();            // Start the timer.
            timer.Interval = 1000;    // Set the interval to 1 second.
            timer.Tick    += delegate // Add an event handler to the Tick event.
            {
                // Call getTime to get and format the time.
                // Also, change the display.
                string time = DateTime.Now.ToString("hh:mm:ss tt");
                l_clock.Text = time; // Set the time on the Form.
            };

            // Initialize semantic and social fields by reading
            // in the values from the class and populating the ComboBoxes.
            semanticSocial = new SemanticSocial();
            for (int i = 0; i < semanticSocial.ListCount; i++)
            {
                lb_Semantics.Items.Add(semanticSocial[i].Semantic);
                lb_SocialUsage.Items.Add(semanticSocial[i].Social);
            }

            // Set the first item to be selected/highlighted in the GUI.
            lb_Semantics.SelectedIndex   = 0;
            lb_SocialUsage.SelectedIndex = 0;
        }
        public DictionaryForm()
        {
            InitializeComponent();  //Initialize all Form components.
              spellingChecker = new SpellCheck();  //Create a new spell checker object.
              theHeadword = new Headword();

              CheckForIllegalCrossThreadCalls = false;

              // Create a clock for the application.
              timer = new Timer();
              timer.Start();  // Start the timer.
              timer.Interval = 1000; // Set the interval to 1 second.
              timer.Tick += delegate // Add an event handler to the Tick event.
              {
            // Call getTime to get and format the time.
            // Also, change the display.
            string time = DateTime.Now.ToString("hh:mm:ss tt");
            l_clock.Text = time; // Set the time on the Form.
              };

              // Initialize semantic and social fields by reading
              // in the values from the class and populating the ComboBoxes.
              semanticSocial = new SemanticSocial();
              for (int i = 0; i < semanticSocial.ListCount; i++)
              {
            lb_Semantics.Items.Add(semanticSocial[i].Semantic);
            lb_SocialUsage.Items.Add(semanticSocial[i].Social);
              }

              // Set the first item to be selected/highlighted in the GUI.
              lb_Semantics.SelectedIndex = 0;
              lb_SocialUsage.SelectedIndex = 0;
        }
Example #4
0
        public DictionaryForm()
        {
            CheckForIllegalCrossThreadCalls = false;
            InitializeComponent();              //Initialize all Form components.
            spellingChecker = new SpellCheck(); //Create a new spell checker object.
            theHeadword     = new Headword();

            setupSQL();

            // Create a SQL DATABASE if one doesn't exist;

            // Create a clock for the application.
            clockSetup();

            // Initialize semantic and social fields by reading
            // in the values from the class and populating the ComboBoxes.
            semanticSocial = new SemanticSocial();
            for (int i = 0; i < semanticSocial.ListCount; i++)
            {
                lb_Semantics.Items.Add(semanticSocial[i].Semantic);
                lb_SocialUsage.Items.Add(semanticSocial[i].Social);
            }

            // Set the first item to be selected/highlighted in the GUI.
            lb_Semantics.SelectedIndex   = 0;
            lb_SocialUsage.SelectedIndex = 0;
        }
Example #5
0
        private void btn_Clear_Click(object sender, EventArgs e)
        {
            tb_HeadWord.Text = "";
            tb_HeadWord.Focus();
            tb_Pronunciation.Text = "";

            lb_Semantics.SelectedIndex   = -1;
            lb_SocialUsage.SelectedIndex = -1;

            theHeadword = new Headword();
        }
        Headword theHeadword; // A reference to the headword in the main program.

        #endregion Fields

        #region Constructors

        public DefinitionForm(DictionaryForm dictionaryEditorForm, String strHeadword)
        {
            InitializeComponent();
              theHeadword = dictionaryEditorForm.Headword;
              tb_Headword.Text = strHeadword;

              // Create a new Definition with the a new ID number;
              definition = new Definition(theHeadword.Definitions.Count + 1);

              // If the user selected a POS for the headword use it.
              if (dictionaryEditorForm.CB_PartOfSpeech.Text != "")
              cb_POS.SelectedIndex = dictionaryEditorForm.CB_PartOfSpeech.SelectedIndex;
        }
        Headword theHeadword; // A reference to the headword in the main program.

        public DefinitionForm(DictionaryForm dictionaryEditorForm, String strHeadword)
        {
            InitializeComponent();
            theHeadword      = dictionaryEditorForm.Headword;
            tb_Headword.Text = strHeadword;

            // Create a new Definition with the a new ID number;
            definition = new Definition(theHeadword.Definitions.Count + 1);

            // If the user selected a POS for the headword use it.
            if (dictionaryEditorForm.CB_PartOfSpeech.Text != "")
            {
                cb_POS.SelectedIndex = dictionaryEditorForm.CB_PartOfSpeech.SelectedIndex;
            }
        }
Example #8
0
        // Clears the user enterable component on the Form.
        private void btn_Clear_Click(object sender, EventArgs e)
        {
            // Clears the user enterable fields.
            tb_HeadWord.Text = "";
            tb_HeadWord.Focus();
            tb_Pronunciation.Text         = "";
            lb_Semantics.SelectedIndex    = -1;
            lb_SocialUsage.SelectedIndex  = -1;
            cb_PartOfSpeech.SelectedIndex = -1;

            // Create a new instace of a headword.
            theHeadword = new Headword();

            // Enable the addDefinition and addEntry buttons.
            btn_AddDefinition.Enabled = true;
            btn_AddEntry.Enabled      = true;
        }
        // Clears the user enterable component on the Form.
        private void btn_Clear_Click(object sender, EventArgs e)
        {
            // Clears the user enterable fields.
            tb_HeadWord.Text = "";
            tb_HeadWord.Focus();
            tb_Pronunciation.Text = "";
            lb_Semantics.SelectedIndex = -1;
            lb_SocialUsage.SelectedIndex = -1;
            cb_PartOfSpeech.SelectedIndex = -1;

            // Create a new instace of a headword.
            theHeadword = new Headword();

            // Enable the addDefinition and addEntry buttons.
            btn_AddDefinition.Enabled = true;
            btn_AddEntry.Enabled = true;
        }
        public DefinitionForm(Form dictionaryForm, Headword theHeadword)
        {
            InitializeComponent();

              tb_Headword.Text = theHeadword.getHeadword;
        }
Example #11
0
        public DefinitionForm(Form dictionaryForm, Headword theHeadword)
        {
            InitializeComponent();

            tb_Headword.Text = theHeadword.getHeadword;
        }
        private void btn_Clear_Click(object sender, EventArgs e)
        {
            tb_HeadWord.Text = "";
              tb_HeadWord.Focus();
              tb_Pronunciation.Text = "";

              lb_Semantics.SelectedIndex = -1;
              lb_SocialUsage.SelectedIndex = -1;

              theHeadword = new Headword();
        }