Exemplo n.º 1
0
        public void OpenDebugForm(Type type)
        {
            if (type == null)
            {
                throw new ArgumentNullException("invalid type");
            }

            LinkedListNode <IDebugForm> node = m_Forms.First;

            while (node != null)
            {
                if (type == node.Value.GetType())
                {
                    CurrentForm = node.Value;
                    CurrentForm.OnShow();
                    return;
                }

                node = node.Next;
            }

            throw new DrbException("not exists form '{0}'", type.FullName);
        }
Exemplo n.º 2
0
        public void OpenDebugForm(string formName)
        {
            if (string.IsNullOrEmpty(formName))
            {
                throw new ArgumentNullException("invalid form name");
            }

            LinkedListNode <IDebugForm> node = m_Forms.First;

            while (node != null)
            {
                if (formName.Equals(node.Value.FormName))
                {
                    CurrentForm = node.Value;
                    CurrentForm.OnShow();
                    return;
                }

                node = node.Next;
            }

            throw new DrbException("not exists form '{0}'", formName);
        }