コード例 #1
0
        private void UIContext_FormClosed(object sender, FormClosedEventArgs e)
        {
            UIContext.FormClosed -= UIContext_FormClosed;
            UIContext             = null;

            Contractor.Dispose(this);
        }
コード例 #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();
            }
        }
コード例 #3
0
 public void Dispose()
 {
     IsRunning = false;
     if (UIContext != null)
     {
         UIContext.FormClosed -= UIContext_FormClosed;
         UIContext.Close();
         UIContext = null;
     }
     Triggers.Dispose();
     OnDisposed();
 }