Beispiel #1
0
 private void Form_addGesture_Load(object sender, EventArgs e)
 {
     if (!m_appMode)
     {
         this.Text                 = Translation.GetText("AG_caption");
         this.Icon                 = Properties.Resources.add_gesture16;
         uc_gesture.MyNNetwork     = m_network;
         uc_gesture.Gestures       = m_gestures;
         uc_name.Gestures          = m_gestures;
         uc_actions.Gestures       = m_gestures;
         uc_actions.SelectedGroups = m_selectedGroups;
         m_currentControl          = uc_actions;
         uc_clipboard.Gestures     = m_gestures;
         this.Size                 = new Size(680, 580);
     }
     else
     {
         this.Text        = Translation.GetText("AA_caption");
         this.Icon        = Properties.Resources.add_app16;
         btn_back.Visible = false;
         m_currentControl = uc_selectProgram;
         this.Size        = new Size(530, 430);
     }
     this.MinimumSize = this.MaximumSize = this.Size;
     m_currentControl.Show();
     MoveToPage(m_currentControl.Identifier);
 }
        private void MoveToPage(BaseActionControl.Page page)
        {            
            m_currentControl.Hide();
            btn_next.Enabled = false;
            btn_back.Enabled = true;
            switch (page)
            {                           
                case BaseActionControl.Page.Action:
                    m_currentControl = uc_actions; 
                    break;
                case BaseActionControl.Page.PrgWwwFld:
                    m_currentControl = uc_openPrgFld;
                    break;
                case BaseActionControl.Page.MailSearchWeb:
                    m_currentControl = uc_mailSearchWeb;
                    break;
                case BaseActionControl.Page.Keystrokes:
                    m_currentControl = uc_customKeystrokes;
                    break;  
                case BaseActionControl.Page.Gesture:
                    m_currentControl = uc_gesture;
                    uc_gesture.Previous = uc_actions.Next == uc_gesture.Identifier ? uc_actions.Identifier : uc_actions.Next;
                    break;
                case BaseActionControl.Page.Name:
                    m_currentControl = uc_name;                    
                    break;
                case BaseActionControl.Page.Application:
                    m_currentControl = uc_selectProgram;
                    break;
                case BaseActionControl.Page.PlainText:
                    m_currentControl = uc_plainText;
                    break;
                case BaseActionControl.Page.Clipboard:
                    m_currentControl = uc_clipboard;
                    break;
            }
            m_currentControl.Show();


            if (m_currentControl.Next != BaseActionControl.Page.None)
            {
                btn_next.DialogResult = DialogResult.None;
                btn_next.Text = Translation.Btn_next;
            }
            else
            {
                btn_next.DialogResult = DialogResult.OK;
                if (!m_appMode)
                    btn_next.Text = Translation.Btn_finish;
                else
                    btn_next.Text = Translation.Btn_add;
            }
            if (m_currentControl.Previous == BaseActionControl.Page.None)
            {
                btn_back.Enabled = false;
            }
        }
Beispiel #3
0
        private void MoveToPage(BaseActionControl.Page page)
        {
            m_currentControl.Hide();
            btn_next.Enabled = false;
            btn_back.Enabled = true;
            switch (page)
            {
            case BaseActionControl.Page.Action:
                m_currentControl = uc_actions;
                break;

            case BaseActionControl.Page.PrgWwwFld:
                m_currentControl = uc_openPrgFld;
                break;

            case BaseActionControl.Page.MailSearchWeb:
                m_currentControl = uc_mailSearchWeb;
                break;

            case BaseActionControl.Page.Keystrokes:
                m_currentControl = uc_customKeystrokes;
                break;

            case BaseActionControl.Page.Gesture:
                m_currentControl    = uc_gesture;
                uc_gesture.Previous = uc_actions.Next == uc_gesture.Identifier ? uc_actions.Identifier : uc_actions.Next;
                break;

            case BaseActionControl.Page.Name:
                m_currentControl = uc_name;
                break;

            case BaseActionControl.Page.Application:
                m_currentControl = uc_selectProgram;
                break;

            case BaseActionControl.Page.PlainText:
                m_currentControl = uc_plainText;
                break;

            case BaseActionControl.Page.Clipboard:
                m_currentControl = uc_clipboard;
                break;
            }
            m_currentControl.Show();


            if (m_currentControl.Next != BaseActionControl.Page.None)
            {
                btn_next.DialogResult = DialogResult.None;
                btn_next.Text         = Translation.Btn_next;
            }
            else
            {
                btn_next.DialogResult = DialogResult.OK;
                if (!m_appMode)
                {
                    btn_next.Text = Translation.Btn_finish;
                }
                else
                {
                    btn_next.Text = Translation.Btn_add;
                }
            }
            if (m_currentControl.Previous == BaseActionControl.Page.None)
            {
                btn_back.Enabled = false;
            }
        }