Fixed the problem with dragging the panels where it looked like the panel was closed but it really wasn’t
This commit is contained in:
@@ -29,6 +29,7 @@ namespace VEPROMS
|
||||
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
#endregion
|
||||
#region PropertiesVariables
|
||||
private bool _panelExpandedChanging = false;
|
||||
Color _CommentTitleBckColor;
|
||||
DocVersionInfo _SelectedDVI = null;
|
||||
StepTabPanel _SelectedStepTabPanel=null;
|
||||
@@ -581,9 +582,9 @@ namespace VEPROMS
|
||||
/// <param name="e"></param>
|
||||
private void btnOpen_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!expandablePanel2.Expanded) // If panel not expanded - expand it.
|
||||
if (!epProcedures.Expanded) // If panel not expanded - expand it.
|
||||
{
|
||||
expandablePanel2.Expanded = true;
|
||||
epProcedures.Expanded = true;
|
||||
if(tv.Nodes.Count > 0 && tv.SelectedNode==null)
|
||||
tv.SelectedNode = tv.Nodes[0];
|
||||
tv.Focus();
|
||||
@@ -597,7 +598,7 @@ namespace VEPROMS
|
||||
}
|
||||
private void btnNew_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!expandablePanel2.Expanded) return;
|
||||
if (!epProcedures.Expanded) return;
|
||||
VETreeNode vtn = tv.SelectedNode as VETreeNode;
|
||||
if (vtn == null) return; // nothing was selected.
|
||||
if (btnNew.SubItems.Count > 0) return; // submenu will be displayed
|
||||
@@ -1054,11 +1055,6 @@ namespace VEPROMS
|
||||
}
|
||||
}
|
||||
|
||||
private void toolsPanel_ExpandedChanged(object sender, ExpandedChangeEventArgs e)
|
||||
{
|
||||
if (toolsPanel.Expanded)
|
||||
InitiateSearch(true);
|
||||
}
|
||||
private void ribbonControl1_ExpandedChanged(object sender, EventArgs e)
|
||||
{
|
||||
Console.WriteLine("Size {0}",ribbonControl1.Expanded);
|
||||
@@ -1071,9 +1067,69 @@ namespace VEPROMS
|
||||
frmPropGrid pg = new frmPropGrid(tc.SelectedDisplayTabItem.SelectedItemInfo, tc.SelectedDisplayTabItem.SelectedItemInfo.Path);
|
||||
pg.Show();
|
||||
}
|
||||
private void expandablePanel2_ExpandedChanged(object sender, ExpandedChangeEventArgs e)
|
||||
|
||||
private void epAnnotations_Resize(object sender, EventArgs e)
|
||||
{
|
||||
expandableSplitter1.Enabled = expandablePanel2.Expanded;
|
||||
if (epAnnotations.Expanded && !_panelExpandedChanging)
|
||||
{
|
||||
// if the height of the panel is smaller than the titleheight+20
|
||||
//(due to the user dragging the splitter down), then un-expand the
|
||||
// panel and set the height to the titleheight+75
|
||||
if (epAnnotations.Size.Height < epAnnotations.TitleHeight + 20)
|
||||
{
|
||||
Size sz = new Size(epAnnotations.Size.Width, epAnnotations.TitleHeight + 75);
|
||||
epAnnotations.Size = sz;
|
||||
epAnnotations.Expanded = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void resizeVerticalExpandedPanel(object sender, EventArgs e)
|
||||
{
|
||||
ExpandablePanel ep = (ExpandablePanel)sender;
|
||||
if (ep.Expanded && !_panelExpandedChanging)
|
||||
{
|
||||
// if the width of the panel is smaller than the titleheight+20
|
||||
//(due to the user dragging the splitter over), then un-expand the
|
||||
// panel and set the width to the titleheight+50
|
||||
if (ep.Size.Width < ep.TitleHeight + 10)
|
||||
{
|
||||
Size sz = new Size(ep.TitleHeight + 50, ep.Size.Height);
|
||||
ep.Size = sz;
|
||||
ep.Expanded = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void expandPanelExpandedChanging(object sender, ExpandedChangeEventArgs e)
|
||||
{
|
||||
_panelExpandedChanging = true;
|
||||
}
|
||||
|
||||
private void toolsPanel_ExpandedChanged(object sender, ExpandedChangeEventArgs e)
|
||||
{
|
||||
_panelExpandedChanging = false;
|
||||
expandableSplitter4.Enabled = toolsPanel.Expanded;
|
||||
if (toolsPanel.Expanded)
|
||||
InitiateSearch(true);
|
||||
}
|
||||
|
||||
private void epAnnotations_ExpandedChanged(object sender, ExpandedChangeEventArgs e)
|
||||
{
|
||||
_panelExpandedChanging = false;
|
||||
expandableSplitter2.Enabled = epAnnotations.Expanded;
|
||||
}
|
||||
|
||||
private void epProcedures_ExpandedChanged(object sender, ExpandedChangeEventArgs e)
|
||||
{
|
||||
_panelExpandedChanging = false;
|
||||
expandableSplitter1.Enabled = epProcedures.Expanded;
|
||||
}
|
||||
|
||||
private void infoPanel_ExpandedChanged(object sender, ExpandedChangeEventArgs e)
|
||||
{
|
||||
_panelExpandedChanging = false;
|
||||
expandableSplitter3.Enabled = infoPanel.Expanded;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
Reference in New Issue
Block a user