/// <summary> /// Get the SAS program that this task should generate /// based on the options specified. /// </summary> /// <returns>a valid SAS program to run</returns> public override string GetSasCode() { SasServer s = new SasServer(Consumer.AssignedServer); string enc = s.GetSasSystemOptionValue("ENCODING"); SPList.ServerCodePage = SASEncodingToWindowsCodepage(enc); return(settings.GetSasProgram()); }
// Clear the form of all info, and populate the tree with // libraries and catalogs for the current server private void NavigateToServer() { Cursor c = Cursor.Current; Cursor.Current = Cursors.WaitCursor; tvLibsCats.Nodes.Clear(); lvMembers.Items.Clear(); TreeNode sn = tvLibsCats.Nodes.Add(currentServer); sn.ImageIndex = (int)CatImages.Server; sn.SelectedImageIndex = (int)CatImages.Server; sn.Tag = "SERVER"; try { SasServer s = new SasServer(currentServer); foreach (SasLibrary lib in s.GetSasLibraries()) { if (lib.IsAssigned) { TreeNode tn = new TreeNode(lib.Libref); tn.ImageIndex = (int)CatImages.Library; tn.SelectedImageIndex = (int)CatImages.Library; tn.Tag = "LIBRARY"; sn.Nodes.Add(tn); // add catalogs for this library PopulateCatalogs(tn); } } TreeNode tnf = new TreeNode(Translate.LabelUserDefinedFormats); tnf.ImageIndex = (int)CatImages.Folder; tnf.SelectedImageIndex = (int)CatImages.Folder; tnf.Tag = "FMTSEARCH"; sn.Nodes.Add(tnf); FmtSearch = s.GetSasSystemOptionValue("FMTSEARCH"); PopulateUserFormats(tnf); // open to the Library list sn.Expand(); } catch { } Cursor.Current = c; UpdateToolbar(); }
/// <summary> /// Get the SAS program that this task should generate /// based on the options specified. /// </summary> /// <returns>a valid SAS program to run</returns> public override string GetSasCode() { SasServer s = new SasServer(Consumer.AssignedServer); string enc = s.GetSasSystemOptionValue("ENCODING"); SPList.ServerCodePage = SASEncodingToWindowsCodepage(enc); return settings.GetSasProgram(); }