Example #1
0
        internal void Dispose()
        {
            if (m_RsaKeyGenControl != null)
            {
                m_RsaKeyGenControl.Dispose();
            }
            if (m_StartControl != null)
            {
                m_StartControl.Dispose();
            }
            if (m_SigGenControl != null)
            {
                m_SigGenControl.Dispose();
            }
            if (m_SigGenFakeBleichenbControl != null)
            {
                m_SigGenFakeBleichenbControl.Dispose();
            }
            if (m_SigGenFakeShortControl != null)
            {
                m_SigGenFakeShortControl.Dispose();
            }
            if (m_SigValControl != null)
            {
                m_SigValControl.Dispose();
            }

            m_RsaKeyGenControl           = null;
            m_StartControl               = null;
            m_SigGenControl              = null;
            m_SigGenFakeBleichenbControl = null;
            m_SigGenFakeShortControl     = null;
            m_SigValControl              = null;
        }
Example #2
0
        private void Navigate(NavigationCommandType type)
        {
            if (m_ActualControl != null)
            {
                m_ActualControl.Dispose();
            }
            SetTitle(type);

            switch (type)
            {
            case NavigationCommandType.RsaKeyGen:
                if (m_RsaKeyGenControl == null)
                {
                    m_RsaKeyGenControl = new RsaKeyGenControl();
                }
                SetUserControl(m_RsaKeyGenControl);
                break;

            case NavigationCommandType.SigGen:
                if (m_SigGenControl == null)
                {
                    m_SigGenControl = new SigGenPkcs1Control();
                }
                SetUserControl(m_SigGenControl);
                break;

            case NavigationCommandType.SigGenFakeBleichenb:
                if (m_SigGenFakeBleichenbControl == null)
                {
                    m_SigGenFakeBleichenbControl = new SigGenFakeBleichenbControl();
                }
                SetUserControl(m_SigGenFakeBleichenbControl);
                break;

            case NavigationCommandType.SigGenFakeShort:
                if (m_SigGenFakeShortControl == null)
                {
                    m_SigGenFakeShortControl = new SigGenFakeShortControl();
                }
                SetUserControl(m_SigGenFakeShortControl);
                break;

            case NavigationCommandType.SigVal:
                if (m_SigValControl == null)
                {
                    m_SigValControl = new SigValControl();
                }
                SetUserControl(m_SigValControl);
                break;

            case NavigationCommandType.Start:
                if (m_StartControl == null)
                {
                    m_StartControl = new StartControl();
                }
                SetUserControl(m_StartControl);
                break;
            }
        }
Example #3
0
        private void SetUserControl(IPkcs1UserControl control, int tab)
        {
            (control as UserControl).HorizontalAlignment = HorizontalAlignment.Stretch;
            (control as UserControl).VerticalAlignment   = VerticalAlignment.Stretch;
            ContentArea.Content = control as UserControl;

            m_ActualControl = control;
        }
Example #4
0
 private void SetUserControl(IPkcs1UserControl control)
 {
     SetUserControl(control, 0);
 }