public void ShowLoginControl(UcBase sender) { MethodName = MethodBase.GetCurrentMethod().Name; //AdminLogger.Instance.Log.Verbose(ClassName, MethodName, "Start"); try { LoadLoginControl(sender); MainPanel.Controls.Remove(sender); } catch (Exception ex) { //AdminLogger.Instance.Log.Error(ClassName, MethodName, ex.ToString()); MessageBox.Show(ex.Message); } //AdminLogger.Instance.Log.Verbose(ClassName, MethodName, "End"); }
private void LoadLoginControl(UcBase sender) { MethodName = MethodBase.GetCurrentMethod().Name; //AdminLogger.Instance.Log.Verbose(ClassName, MethodName, "Start"); try { UcLogin control = new UcLogin(); control.Dock = DockStyle.Fill; LoadChildControl(sender, control); } catch (Exception ex) { //AdminLogger.Instance.Log.Error(ClassName, MethodName, ex.ToString()); MessageBox.Show(ex.Message); } //AdminLogger.Instance.Log.Verbose(ClassName, MethodName, "End"); }
public void LoadChildControl(UcBase sender, UcBase control) { MethodName = MethodBase.GetCurrentMethod().Name; //AdminLogger.Instance.Log.Verbose(ClassName, MethodName, "Start"); try { control.MainWindow = this; control.Dock = DockStyle.Fill; MainPanel.Controls.Clear(); MainPanel.Controls.Add(control); sender?.Dispose(); } catch (Exception ex) { //AdminLogger.Instance.Log.Error(ClassName, MethodName, ex.ToString()); MessageBox.Show(ex.Message); } //AdminLogger.Instance.Log.Verbose(ClassName, MethodName, "End"); }
public void Init(UserCfg cfg) { _Cfg = cfg; UcBase.Init(cfg); UcKeys.Init(); }