本文整理汇总了C#中System.Windows.Forms.SplitterEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# SplitterEventArgs类的具体用法?C# SplitterEventArgs怎么用?C# SplitterEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SplitterEventArgs类属于System.Windows.Forms命名空间,在下文中一共展示了SplitterEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: splitterMoved
private void splitterMoved(object sender, SplitterEventArgs e)
{
if (_settings != null && Visible)
_settings.PositionPercent = (double) SplitterDistance / Width;
if (SplitterMoved != null)
SplitterMoved(sender, e);
}
示例2: SplitContainerHorizontal_SplitterMoved
void SplitContainerHorizontal_SplitterMoved(object sender, SplitterEventArgs e) {
if (this.DataSnapshot == null) return; // there is no DataSnapshot deserialized in InitializeComponents()
if (Assembler.InstanceInitialized.MainFormClosingIgnoreReLayoutDockedForms) return;
if (this.DataSnapshot.SplitDistanceHorizontal == this.splitContainerHorizontal.SplitterDistance) return;
this.DataSnapshot.SplitDistanceHorizontal = this.splitContainerHorizontal.SplitterDistance;
this.DataSnapshotSerializer.Serialize();
}
示例3: splitContainerImage_SplitterMoved
protected override void splitContainerImage_SplitterMoved(object sender, SplitterEventArgs e)
{
foreach (Control con in this.flowLayoutPanelThumbnail.Controls)
{
int horizontalMargin = (this.flowLayoutPanelThumbnail.Width - con.Width) / 2;
con.Margin = new Padding(horizontalMargin, 0, horizontalMargin, 2);
}
}
示例4: OnSplitterMove
private void OnSplitterMove(object sender, SplitterEventArgs e)
{
// Commented because it does not seem to avoid a slight offset every time the splitter is restored.
/*
var settings = CoreSettings.CoreSettings.Default;
settings.InspectorRecordedWidth = splitContainer.Panel1.Width;
// for some reason this is necessary to keep the layout from breaking up.
inspectionView1.ClientSize = splitContainer.Panel2.ClientSize; */
//inspectionView1.ClientSize = splitContainer.Panel2.ClientSize;
}
示例5: _splitContainer_SplitterMoved
private void _splitContainer_SplitterMoved(object sender, SplitterEventArgs e)
{
if (PaneFixed || _resetting)
return;
// when the user moves the splitter, we need to keep track of the split ratio
float x1 = _vertical ? _splitContainer.Panel1.Width : _splitContainer.Panel1.Height;
float x2 = _vertical ? _splitContainer.Panel2.Width : _splitContainer.Panel2.Height;
_splitRatio = x1 / (x1 + x2);
}
示例6: splitter1_SplitterMoved
private void splitter1_SplitterMoved(object sender, SplitterEventArgs e)
{
int width = e.X;
if (width > 350)
{
width = 350;
}
if (width < 150)
{
width = 23;
}
this.panLeft.Width = width;
resizeMiddlePanel();
}
示例7: CustomSplitter_SplitterMoved
void CustomSplitter_SplitterMoved(object sender, SplitterEventArgs e)
{
if (m_IsInternalCall)
{
m_IsInternalCall = false;
if (m_LastSplitterPos == 0)
m_LastSplitterPos = m_Panel1MinSize; //arbitary
return;
}
if (this.Orientation == Orientation.Vertical)
{
if (this.SplitterDistance == 0)
{
this.m_Panel1State = SplitterPanelState.Retracted;
this.Invalidate();
}
else if (this.SplitterDistance == (this.Width - this.SplitterWidth))
{
this.m_Panel2State = SplitterPanelState.Retracted;
this.Invalidate();
}
else
{
this.m_Panel1State = SplitterPanelState.Expanded;
this.m_Panel2State = SplitterPanelState.Expanded;
}
}
else
{
if (this.SplitterDistance == 0)
{
this.m_Panel1State = SplitterPanelState.Retracted;
this.Invalidate();
}
else if (this.SplitterDistance == (this.Height - this.SplitterWidth))
{
this.m_Panel2State = SplitterPanelState.Retracted;
this.Invalidate();
}
else
{
this.m_Panel1State = SplitterPanelState.Expanded;
this.m_Panel2State = SplitterPanelState.Expanded;
}
}
}
示例8: splitContainer2_SplitterMoved
private void splitContainer2_SplitterMoved(object sender, SplitterEventArgs e)
{
if (splitContainer2.SplitterDistance >= 250 && button2.Text == ">")
button2.Text = "<";
else if(splitContainer2.SplitterDistance<100)
{
panel2.Visible = false;
}
else if(splitContainer2.SplitterDistance>100 && !panel2.Visible)
{
panel2.Visible = true;
}
}
示例9: OnSplitterMoved
private void OnSplitterMoved(object sender, SplitterEventArgs e)
{
if ((this.InheritanceAttribute != InheritanceAttribute.InheritedReadOnly) && !this.splitterDistanceException)
{
try
{
base.RaiseComponentChanging(TypeDescriptor.GetProperties(this.splitContainer)["SplitterDistance"]);
base.RaiseComponentChanged(TypeDescriptor.GetProperties(this.splitContainer)["SplitterDistance"], null, null);
if (this.disabledGlyphs)
{
base.BehaviorService.EnableAllAdorners(true);
SelectionManager service = (SelectionManager) this.GetService(typeof(SelectionManager));
if (service != null)
{
service.Refresh();
}
this.disabledGlyphs = false;
}
}
catch (InvalidOperationException exception)
{
((IUIService) base.Component.Site.GetService(typeof(IUIService))).ShowError(exception.Message);
}
catch (CheckoutException exception2)
{
if (exception2 == CheckoutException.Canceled)
{
try
{
this.splitterDistanceException = true;
this.splitContainer.SplitterDistance = this.initialSplitterDist;
return;
}
finally
{
this.splitterDistanceException = false;
}
}
throw;
}
}
}
示例10: mainSplitContainer_SplitterMoved
private void mainSplitContainer_SplitterMoved(object sender, SplitterEventArgs e)
{
var changingUI = false;
try
{
changingUI = true;
panelMain.SuspendLayout();
panelMain.SuspendDrawing();
SetControlSize(null);
}
catch (Exception ex)
{
HandleException(ex);
}
finally
{
if (changingUI)
{
panelMain.ResumeDrawing();
panelMain.ResumeLayout();
}
}
}
示例11: splitDescription_SplitterMoved
private void splitDescription_SplitterMoved(object sender, SplitterEventArgs e) {
if (ignore_change_ > 0)
return;
if (splitDescription.SplitterDistance >= 0) {
global_ui.description_splitter_pos = splitDescription.SplitterDistance;
save();
} else
Debug.Assert(false);
}
示例12: filteredLeft_SplitterMoved
private void filteredLeft_SplitterMoved(object sender, SplitterEventArgs e) {
update_msg_details(true);
if (ignore_change_ > 0)
return;
//logger.Debug("[splitter] filteredleft=" + filteredLeft.SplitterDistance );
if (filteredLeft.SplitterDistance >= 0) {
global_ui.full_log_splitter_pos = filteredLeft.SplitterDistance;
save();
} else
Debug.Assert(false);
}
示例13: splitContainer8_SplitterMoved
private void splitContainer8_SplitterMoved(object sender, SplitterEventArgs e)
{
}
示例14: splitContainer1_SplitterMoved
/// <summary>
/// resize the forms to appropriate sizes
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void splitContainer1_SplitterMoved(object sender, SplitterEventArgs e)
{
int size = Convert.ToInt32(splitContainer1.Width * maxDistancePercent);
if (splitContainer1.SplitterDistance < size)
{
splitContainer1.SplitterDistance = size;
}
}
示例15: SplitContainer4_SplitterMoved
private void SplitContainer4_SplitterMoved(object sender, SplitterEventArgs e)
{
if (this.WindowState == FormWindowState.Normal && !_initialLayout)
{
_myAdSpDis = SplitContainer4.SplitterDistance;
_modifySettingLocal = true;
}
}