Exemple #1
0
        /// <summary>
        /// Изменение позиции формы
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void UninstallForm_LocationChanged(object sender, EventArgs e)
        {
            if (!m_AppStart)
            {
                return;
            }

            m_ParamInfo.UninstLocation = Location;
            m_ActClass.SaveParameter(m_ParamInfo);
        }
Exemple #2
0
 /// <summary>
 /// Изменение местоположения формы
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void FindForm_LocationChanged(object sender, EventArgs e)
 {
     if (!_appStart)
     {
         return;
     }
     _paramInfo.FfLocation = Location;
     _actClass.SaveParameter(_paramInfo);
 }
Exemple #3
0
        /// <summary>
        /// Изменение типа преобразования
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void comboType_SelectedIndexChanged(object sender, EventArgs e)
        {
            comboFrom.Items.Clear();
            comboTo.Items.Clear();
            if (comboType.Text == "Кодировка")
            {
                comboFrom.Items.Add("Windows-1251");
                comboFrom.Items.Add("KOI8-R");
                comboFrom.Items.Add("UTF-7");
                comboFrom.Items.Add("cp866");
                comboTo.Items.Add("Windows-1251");
                comboTo.Items.Add("KOI8-R");
                comboTo.Items.Add("UTF-7");
                comboTo.Items.Add("cp866");
                comboFrom.SelectedIndex     = 1;
                comboTo.SelectedIndex       = 0;
                buttonOpenShifr.Visible     = pictureBoxFrom.Visible =
                    buttonSaveShifr.Visible = pictureBoxTo.Visible = false;
            }
            else if (comboType.Text == "Раскладка")
            {
                comboFrom.Items.Add("Русский текст");
                comboFrom.Items.Add("Транслит");
                comboFrom.Items.Add("Русский текст (английская раскладка)");
                comboFrom.Items.Add("Английский текст (русская раскладка)");
                comboFrom.SelectedIndex     = 0;
                buttonOpenShifr.Visible     = pictureBoxFrom.Visible =
                    buttonSaveShifr.Visible = pictureBoxTo.Visible = false;
            }
            else if (comboType.Text == "Шифрование")
            {
                comboFrom.Items.Add("Текст");
                comboFrom.Items.Add("Шифровка");
                comboFrom.SelectedIndex = 0;
            }
            if (!_appStart)
            {
                return;
            }

            _paramInfo.ComboType = comboType.Text;
            _actClass.SaveParameter(_paramInfo);
        }
Exemple #4
0
 /// <summary>
 /// Отлавливание смена языка ввода
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 public void MainForm_InputLanguageChanged(object sender, InputLanguageChangedEventArgs e)
 {
     if (!m_AppStart)
     {
         return;
     }
     m_ParamInfo.KeyboardLayoutId = InputLanguage.CurrentInputLanguage.Culture.KeyboardLayoutId;
     m_ActClass.SaveParameter(m_ParamInfo);
 }
Exemple #5
0
 /// <summary>
 /// Отмена свойства "поверх всех"
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void buttonTopMostOn_Click(object sender, EventArgs e)
 {
     m_ParamInfo.TopMost      = false;
     buttonTopMostOn.Visible  = false;
     buttonTopMostOff.Visible = true;
     TopMost = false;
     m_ActClass.SaveParameter(m_ParamInfo);
 }
Exemple #6
0
        /// <summary>
        /// Изменение размера колонок
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ProcessList_ColumnWidthChanged(object sender, DataGridViewColumnEventArgs e)
        {
            if (!_appStart)
            {
                return;
            }

            _paramInfo.ProcessColumnsWidth = new string[ProcessList.Columns.Count];
            int       left  = ProcessList.Left;
            const int shift = 2;

            for (int i = 0; i < ProcessList.ColumnCount; i++)
            {
                _paramInfo.ProcessColumnsWidth[i] = "" + ProcessList.Columns[i].Width;
                var textBoxFilter = (TextBox)Controls["textBoxFilter" + i];
                if (textBoxFilter != null)
                {
                    textBoxFilter.Left  = left + shift;
                    textBoxFilter.Width = ProcessList.Columns[i].Width - (shift * 2);
                    left += ProcessList.Columns[i].Width;
                }
            }
            _actClass.SaveParameter(_paramInfo);
        }