Esempio n. 1
0
        private void UIContext_FormClosed(object sender, FormClosedEventArgs e)
        {
            UIContext.FormClosed -= UIContext_FormClosed;
            UIContext             = null;

            Contractor.Dispose(this);
        }
Esempio n. 2
0
        void IExtension.Initialize()
        {
            if (UIContext != null)
            {
                UIContext.BringToFront(); return;
            }
            else if (UIContextType != null && UIContextType.BaseType == typeof(SKoreForm))
            {
                UIContext = (SKoreForm)Activator.CreateInstance(UIContextType, this);

                if (UIContext.Extension == null)
                {
                    UIContext.Extension = this;
                }

                UIContext.FormClosed += UIContext_FormClosed;
                UIContext.Show();
            }

            if (!IsRunning)
            {
                IsRunning = true;
                OnInitialized();
            }
        }
Esempio n. 3
0
 public void Dispose()
 {
     IsRunning = false;
     if (UIContext != null)
     {
         UIContext.FormClosed -= UIContext_FormClosed;
         UIContext.Close();
         UIContext = null;
     }
     Triggers.Dispose();
     OnDisposed();
 }