Beispiel #1
0
 static public ContractSelector GetInstance()
 {
     if (only_one == null)
     {
         only_one = new ContractSelector();
     }
     return(only_one);
 }
        void OnSelectorClosed(object sender, EventArgs e)
        {
            //if (!(sender as ContractSelector).IsAttachedToThisControl(this))
            //    return;

            ContractSelector.GetInstance().Closing -= OnSelectorClosing;
            ContractSelector.GetInstance().Closed  -= OnSelectorClosed;

            this.SelectorOpened = false;
        }
        protected override void OpenSelector()
        {
            if (m_contract == null)
            {
                return;
            }

            ContractSelector.GetInstance().OpenMe(this, this.SelectorCover, this.ParentForm, this.m_contract);

            ContractSelector.GetInstance().Closing += OnSelectorClosing;
            ContractSelector.GetInstance().Closed  += OnSelectorClosed;
            this.SelectorOpened = true;
        }
 public static ContractSelector GetInstance()
 {
     if (only_one == null)
         only_one = new ContractSelector();
     return only_one;
 }
 protected override void CloseSelector(bool saveBeforeClose)
 {
     ContractSelector.GetInstance().CloseMe(saveBeforeClose);
 }