void mainFormPanelMode(SPLITTER_MODE up, SPLITTER_MODE center, SPLITTER_MODE bottom) { if (this.InvokeRequired) { mainFormPanelMode_Call d = new mainFormPanelMode_Call(mainFormPanelMode); this.BeginInvoke(d, new object[] { up, center, bottom }); } else { if (center == SPLITTER_MODE.EXPAND) { label.Dock = DockStyle.Left; label.Text = "<<"; } if (center == SPLITTER_MODE.NORMAL) { label.Dock = DockStyle.Right; label.Text = ">>"; } //if (!mc.init.success.ALL) //{ // TS_FR.Visible = false; // TS_RR.Visible = false; //} //else //{ // TS_FR.Visible = true; // TS_RR.Visible = true; //} } }
void mainFormPanelMode(SPLITTER_MODE up, SPLITTER_MODE center, SPLITTER_MODE bottom) { if (this.InvokeRequired) { mainFormPanelMode_Call d = new mainFormPanelMode_Call(mainFormPanelMode); this.BeginInvoke(d, new object[] { up, center, bottom }); } else { panelResize(up, center, bottom); } }
void mainFormPanelMode(SPLITTER_MODE up, SPLITTER_MODE center, SPLITTER_MODE bottom) { if (this.InvokeRequired) { mainFormPanelMode_Call d = new mainFormPanelMode_Call(mainFormPanelMode); this.BeginInvoke(d, new object[] { up, center, bottom }); } else { if (bottom == SPLITTER_MODE.EXPAND) { label.Dock = DockStyle.Left; label.Text = "<<"; } if (bottom == SPLITTER_MODE.NORMAL) { label.Dock = DockStyle.Right; label.Text = ">>"; } } }
void panelResize(SPLITTER_MODE splitterModeUp, SPLITTER_MODE splitterModeCenter, SPLITTER_MODE splitterModeBottom) { mc.panel.up.height = 95; mc.panel.center.height = 602; mc.panel.bottom.height = 287; int splitterTargetUp, splitterTargetCenter, splitterTargetBottom; int splitterCurrentUp, splitterCurrentCenter, splitterCurrentBottom; splitterCurrentUp = SC_Up.SplitterDistance; splitterCurrentCenter = SC_Center.SplitterDistance; splitterCurrentBottom = SC_Bottom.SplitterDistance; if (splitterModeUp == SPLITTER_MODE.NORMAL) { splitterTargetUp = (int)SPLITTER_MODE.NORMAL; } else if (splitterModeUp == SPLITTER_MODE.EXPAND) { splitterTargetUp = (int)SPLITTER_MODE.EXPAND; } else { splitterTargetUp = splitterCurrentUp; } if (splitterModeCenter == SPLITTER_MODE.NORMAL) { splitterTargetCenter = (int)SPLITTER_MODE.NORMAL; } else if (splitterModeCenter == SPLITTER_MODE.EXPAND) { splitterTargetCenter = (int)SPLITTER_MODE.EXPAND; mc.user.logInDone = false; EVENT.refresh(); } else { splitterTargetCenter = splitterCurrentCenter; } if (splitterModeBottom == SPLITTER_MODE.NORMAL) { splitterTargetBottom = (int)SPLITTER_MODE.NORMAL; } else if (splitterModeBottom == SPLITTER_MODE.EXPAND) { splitterTargetBottom = (int)SPLITTER_MODE.EXPAND; } else { splitterTargetBottom = splitterCurrentBottom; } int gap = 200; // 30; while (true) { mc.idle(0); #region current change if (splitterCurrentUp > splitterTargetUp) { splitterCurrentUp -= gap; if (splitterCurrentUp < splitterTargetUp) { splitterCurrentUp = splitterTargetUp; } } if (splitterCurrentUp < splitterTargetUp) { splitterCurrentUp += gap; if (splitterCurrentUp > splitterTargetUp) { splitterCurrentUp = splitterTargetUp; } } if (splitterCurrentCenter > splitterTargetCenter) { splitterCurrentCenter -= gap; if (splitterCurrentCenter < splitterTargetCenter) { splitterCurrentCenter = splitterTargetCenter; } } if (splitterCurrentCenter < splitterTargetCenter) { splitterCurrentCenter += gap; if (splitterCurrentCenter > splitterTargetCenter) { splitterCurrentCenter = splitterTargetCenter; } } if (splitterCurrentBottom > splitterTargetBottom) { splitterCurrentBottom -= gap; if (splitterCurrentBottom < splitterTargetBottom) { splitterCurrentBottom = splitterTargetBottom; } } if (splitterCurrentBottom < splitterTargetBottom) { splitterCurrentBottom += gap; if (splitterCurrentBottom > splitterTargetBottom) { splitterCurrentBottom = splitterTargetBottom; } } #endregion mc.panel.up.splitterDistance = splitterCurrentUp; mc.panel.center.splitterDistance = splitterCurrentCenter; mc.panel.bottom.splitterDistance = splitterCurrentBottom; if (splitterCurrentUp != splitterTargetUp) { panelUpResize(); } if (splitterCurrentCenter != splitterTargetCenter) { panelCenterResize(); } if (splitterCurrentBottom != splitterTargetBottom) { panelBottomResize(); } if (splitterCurrentUp == splitterTargetUp && splitterCurrentCenter == splitterTargetCenter && splitterCurrentBottom == splitterTargetBottom) { break; } } panelUpResize(); panelCenterResize(); panelBottomResize(); SC_Up.IsSplitterFixed = true; SC_Center.IsSplitterFixed = true; SC_Bottom.IsSplitterFixed = true; }
void mainFormPanelMode(SPLITTER_MODE up, SPLITTER_MODE center, SPLITTER_MODE bottom) { if (this.InvokeRequired) { mainFormPanelMode_Call d = new mainFormPanelMode_Call(mainFormPanelMode); this.BeginInvoke(d, new object[] { up, center, bottom }); } else { if (up == SPLITTER_MODE.EXPAND) { label.Dock = DockStyle.Left; label.Text = "<<"; } if (up == SPLITTER_MODE.NORMAL) { label.Dock = DockStyle.Right; label.Text = ">>"; } if (mc.init.success.ALL && !mc.full.RUNING) { RB_AutoMode.Visible = true; RB_ByPassMode.Visible = true; RB_DumyMode.Visible = true; BT_Start.Visible = true; CB_NO_SMEMA_PRE.Visible = true; CB_Stay_Work.Visible = true; //CB_StepWorkMode.Visible = true; TB_USERNAME.Visible = true; RB_AutoMode.Enabled = true; RB_ByPassMode.Enabled = true; RB_DumyMode.Enabled = true; BT_Start.Enabled = true; BT_PowerOff.Enabled = true; if (mc.main.RB_AUTOCHECK == true) { RB_AutoMode.Checked = true; mc.main.RB_AUTOCHECK = false; } } else { if (!mc.init.success.ALL) { RB_AutoMode.Visible = false; //RB_ByPassMode.Visible = false; RB_DumyMode.Visible = false; //BT_Start.Visible = false; BT_PowerOff.Enabled = true; CB_NO_SMEMA_PRE.Visible = false; CB_Stay_Work.Visible = false; // TB_USERNAME.Visible = false; //CB_StepWorkMode.Visible = false; } else { RB_AutoMode.Enabled = false; RB_ByPassMode.Enabled = false; RB_DumyMode.Enabled = false; BT_Start.Enabled = false; BT_PowerOff.Enabled = false; } } } }