Exemplo n.º 1
0
        public FrmToolBase FindExistingWindow(string uniqueId)
        {
            // Look for existing window with the specified uniqueId
            FormItem form = _forms[uniqueId];

            return((form != null) ? form.RegisteredForm : null);
        }
Exemplo n.º 2
0
        public void RegisterWindow(FrmToolBase form, string uniqueId)
        {
            if (this._forms[uniqueId] != null)
            {
                throw new InvalidOperationException("Window is already registered.");
            }
            if (string.IsNullOrEmpty(uniqueId))
            {
                throw new ArgumentNullException("uniqueId cannot be null.", "uniqueId");
            }

            FormItem fi = new FormItem(form, uniqueId);

            _forms.Add(fi);
        }