Exemple #1
0
        private void Pin_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            try
            {
                PNStatic.Settings.Behavior.PanelAutoHide = !PNStatic.Settings.Behavior.PanelAutoHide;
                PNData.SaveBehaviorSettings();
                UpdateAutoHideImageBinding();
                if (PNStatic.FormSettings != null)
                {
                    PNStatic.FormSettings.PanelAutohideChanged();
                }
                if (PNStatic.Settings.Behavior.PanelAutoHide)
                {
                    _PreventMove = true;
                    switch (PNStatic.Settings.Behavior.NotesPanelOrientation)
                    {
                    case NotesPanelOrientation.Left:
                        Left = -SIZE_VERT + 2;
                        break;

                    case NotesPanelOrientation.Top:
                        Top = -SIZE_HORZ + 2;
                        break;
                    }
                    _PreventMove = false;
                }
            }
            catch (Exception ex)
            {
                PNStatic.LogException(ex);
            }
        }
Exemple #2
0
 private void Orient_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
 {
     try
     {
         PNStatic.Settings.Behavior.NotesPanelOrientation = PNStatic.Settings.Behavior.NotesPanelOrientation ==
                                                            NotesPanelOrientation.Left
             ? NotesPanelOrientation.Top
             : NotesPanelOrientation.Left;
         PNData.SaveBehaviorSettings();
         SetPanelPlacement();
         UpdateOrientationImageBinding();
         if (PNStatic.FormSettings == null)
         {
             return;
         }
         PNStatic.FormSettings.PanelOrientationChanged();
     }
     catch (Exception ex)
     {
         PNStatic.LogException(ex);
     }
 }