/// <summary> /// Shows the Manage form and directs it at a particular /// machine. /// </summary> /// <param name="sHostname">The machine to manage</param> /// <param name="viewStyle">The style of list view to use, if a listview is used</param> /// <returns>TRUE if was able to manage the given machine. FALSE if a /// network or credential error occured. </returns> public bool ManageHost(string sHostname, StandardPage.ViewStyle viewStyle) { // first, normalize the incoming hostname Hostinfo hn = new Hostinfo(sHostname); // now, set the host type if (!CheckHostInfo(hn)) { string sMsg = string.Format(Resources.Error_InvalidComputerType, sHostname); ShowError(sMsg, MessageBoxButtons.OK); return(false); } // do this first so that we can do any slow stuff before we start // changing pages if (!controlManage.ManageHost(hn)) { return(false); } SetViewStyle(viewStyle); // show the management control ShowManage(); string str = String.Format(Resources.Connected_As, hn.creds.UserName, hn.hostName); controlManage.SetStatusMesaage(str, 1); return(true); }
public void SetViewStyle(StandardPage.ViewStyle view) { if (currentViewStyle != view) { currentViewStyle = view; controlManage.SetViewStyle(view); } }
public void SetViewStyle(StandardPage.ViewStyle view) { Logger.Log("Manage.SetViewStyle", Logger.manageLogLevel); if (currentViewStyle != view) { currentViewStyle = view; if (controlVisible is StandardPage) { ((StandardPage)controlVisible).SetViewStyle(view); } } }