Ejemplo n.º 1
0
    public PanelLeft(Form ParentArg)
    {
        Parent = ParentArg;
        This   = this;

        Size = new Size(FileRegistry.GetLeftPanelWidth(), 0);
        Dock = DockStyle.Left;

        new FileTree(this);
    }
Ejemplo n.º 2
0
    protected override void OnClosing(CancelEventArgs CEA)
    {
        base.OnClosing(CEA);

        FileTree.This.Save();
        PanelLeft.Closing();

        if (TabManager.HasTabs())
        {
            IO_SaveAll.SaveAll();
        }

        if (Options_Registry.IsChecked)
        {
            RegistryManager.DeleteAccount();
            return;
        }

        if (WindowState == FormWindowState.Normal)
        {
            WindowStateManager.SetState((int)FormWindowState.Normal);

            Rectangle Rect = new Rectangle();

            Rect.Width  = Size.Width;
            Rect.Height = Size.Height;
            Rect.X      = Location.X;
            Rect.Y      = Location.Y;

            WindowLocationManager.SetLocation(Rect);
        }

        else if (WindowState == FormWindowState.Maximized)
        {
            WindowStateManager.SetState((int)FormWindowState.Maximized);
        }
    }