Exemplo n.º 1
0
        private void ToolbarItem_PreferencesClicked(object sender, System.EventArgs e)
        {
            if (prefsView == null)
            {
                prefsView         = new PreferencesView();
                prefsView.Closed += PreferencesClosed;

                bool needsMove = true;
                if (prefsViewLocation.X > 0 && prefsViewLocation.Y > 0)
                {
                    prefsView.Left = prefsViewLocation.X;
                    prefsView.Top  = prefsViewLocation.Y;
                    needsMove      = false;
                }

                prefsView.Show();

                if (needsMove)
                {
                    setWindowPosition(prefsView);
                    prefsViewLocation.X = prefsView.Left;
                    prefsViewLocation.Y = prefsView.Top;
                }
            }
            else
            {
                prefsView.Activate();
            }
        }
Exemplo n.º 2
0
 private void PreferencesClosed(object sender, System.EventArgs e)
 {
     prefsView = null;
 }