コード例 #1
0
        public void Save(OutlookSettings OutlookSettings)
        {
            XMLhelper XML = new XMLhelper(UserSettings);

            XML.XMLWriteFile(xmlOUTLOOKNodeNameLocation, ExportKey, OutlookSettings.Export.ToString(CultureInfo.CurrentCulture));
            XML.XMLWriteFile(xmlOUTLOOKNodeNameLocation, UnderscoreKey, OutlookSettings.Underscore.ToString(CultureInfo.CurrentCulture));
        }
コード例 #2
0
        public WamapSettings Load()
        {
            WamapSettings WamapSettings = new WamapSettings();
            XMLhelper     XML           = new XMLhelper(UserSettings);

            WamapSettings.Directory = XML.XMLReadFile(xmlWAMAPNodeNameLocation, DirectoryKey);
            if (WamapSettings.Directory == "")
            {
                WamapSettings.Directory = DefaultDirectory;
                XML.XMLWriteFile(xmlWAMAPNodeNameLocation, DirectoryKey, WamapSettings.Directory);
            }

            try
            {
                WamapSettings.Underscore = Convert.ToBoolean(XML.XMLReadFile(xmlWAMAPNodeNameLocation, UnderscoreKey).ToLower());
            }
            catch
            {
                WamapSettings.Underscore = true;
                XML.XMLWriteFile(xmlWAMAPNodeNameLocation, UnderscoreKey, WamapSettings.Underscore.ToString(CultureInfo.CurrentCulture));
            }

            try
            {
                WamapSettings.Export = Convert.ToBoolean(XML.XMLReadFile(xmlWAMAPNodeNameLocation, ExportKey).ToLower());
            }
            catch
            {
                WamapSettings.Export = false;
                XML.XMLWriteFile(xmlWAMAPNodeNameLocation, ExportKey, WamapSettings.Export.ToString(CultureInfo.CurrentCulture));
            }

            return(WamapSettings);
        }
コード例 #3
0
        public OutlookSettings Load()
        {
            OutlookSettings OutlookSettings = new OutlookSettings();
            XMLhelper       XML             = new XMLhelper(UserSettings);


            try
            {
                OutlookSettings.Underscore = Convert.ToBoolean(XML.XMLReadFile(xmlOUTLOOKNodeNameLocation, UnderscoreKey).ToLower());
            }
            catch
            {
                OutlookSettings.Underscore = true;
                XML.XMLWriteFile(xmlOUTLOOKNodeNameLocation, UnderscoreKey, OutlookSettings.Underscore.ToString(CultureInfo.CurrentCulture));
            }

            try
            {
                OutlookSettings.Export = Convert.ToBoolean(XML.XMLReadFile(xmlOUTLOOKNodeNameLocation, ExportKey).ToLower());
            }
            catch
            {
                OutlookSettings.Export = false;
                XML.XMLWriteFile(xmlOUTLOOKNodeNameLocation, ExportKey, OutlookSettings.Export.ToString(CultureInfo.CurrentCulture));
            }

            return(OutlookSettings);
        }
コード例 #4
0
        public void Save(WamapSettings WamapSettings)
        {
            XMLhelper XML = new XMLhelper(UserSettings);

            XML.XMLWriteFile(xmlWAMAPNodeNameLocation, DirectoryKey, WamapSettings.Directory);
            XML.XMLWriteFile(xmlWAMAPNodeNameLocation, ExportKey, WamapSettings.Export.ToString(CultureInfo.CurrentCulture));
            XML.XMLWriteFile(xmlWAMAPNodeNameLocation, UnderscoreKey, WamapSettings.Underscore.ToString(CultureInfo.CurrentCulture));
        }
コード例 #5
0
        public void Save(Quarter2MonthSettings Quarter2Month)
        {
            XMLhelper XML = new XMLhelper(UserSettings);

            XML.XMLWriteFile(xmlRootQuarter2MonthLocation, SummerMonthKey, Quarter2Month.SummerMonth.ToString(CultureInfo.CurrentCulture));
            XML.XMLWriteFile(xmlRootQuarter2MonthLocation, FallMonthKey, Quarter2Month.FallMonth.ToString(CultureInfo.CurrentCulture));
            XML.XMLWriteFile(xmlRootQuarter2MonthLocation, WinterMonthKey, Quarter2Month.WinterMonth.ToString(CultureInfo.CurrentCulture));
            XML.XMLWriteFile(xmlRootQuarter2MonthLocation, SpringMonthKey, Quarter2Month.SpringMonth.ToString(CultureInfo.CurrentCulture));
        }
コード例 #6
0
        public void Save(ClickerSettings ClickerSettings)
        {
            XMLhelper XML = new XMLhelper(UserSettings);

            XML.XMLWriteFile(xmlRootCLICKERLocation, DirectoryKey, ClickerSettings.Directory);
            XML.XMLWriteFile(xmlRootCLICKERLocation, ExportKey, ClickerSettings.Export.ToString(CultureInfo.CurrentCulture));
            XML.XMLWriteFile(xmlRootCLICKERLocation, UnderscoreKey, ClickerSettings.Underscore.ToString(CultureInfo.CurrentCulture));
            XML.XMLWriteFile(xmlRootCLICKERLocation, SelectedOutputkey, ClickerSettings.SelectedValue.ToString(CultureInfo.CurrentCulture));
        }
コード例 #7
0
        public UserSettings Load()
        {
            XMLhelper XML = new XMLhelper(UserSettings);
            Crypto    cry = new Crypto(UserSettings);

            UserSettings.CollegeAbbreviation = XML.XMLReadFile(xmlUserNodeNameLocation, CollegeAbbreviationKey);

            string StrEncoded = XML.XMLReadFile(xmlUserNodeNameLocation, EmployeeIDKey);

            UserSettings.EmployeeID = cry.Decrypt(StrEncoded);
            StrEncoded = XML.XMLReadFile(xmlUserNodeNameLocation, EmployeePINKey);
            UserSettings.EmployeePIN = cry.Decrypt(StrEncoded);

            UserSettings.Email = XML.XMLReadFile(xmlUserNodeNameLocation, EmailKey);

            try
            {
                UserSettings.OverWriteAll = Convert.ToBoolean(XML.XMLReadFile(xmlUserNodeNameLocation, OverWriteAllKey));
            }
            catch
            {
                UserSettings.OverWriteAll = false;
                XML.XMLWriteFile(xmlUserNodeNameLocation, OverWriteAllKey, UserSettings.OverWriteAll.ToString(CultureInfo.CurrentCulture));
            }

            return(UserSettings);
        }
コード例 #8
0
        public Quarter2MonthSettings Load()
        {
            Quarter2MonthSettings Quarter2Month = new Quarter2MonthSettings();
            XMLhelper             XML           = new XMLhelper(UserSettings);

            try
            {
                Quarter2Month.SummerMonth = Convert.ToInt32(XML.XMLReadFile(xmlRootQuarter2MonthLocation, SummerMonthKey), CultureInfo.CurrentCulture);
            }
            catch
            {
                Quarter2Month.SummerMonth = SummerMonthDefault;
                XML.XMLWriteFile(xmlRootQuarter2MonthLocation, SummerMonthKey, Quarter2Month.SummerMonth.ToString(CultureInfo.CurrentCulture));
            }

            try
            {
                Quarter2Month.FallMonth = Convert.ToInt32(XML.XMLReadFile(xmlRootQuarter2MonthLocation, FallMonthKey), CultureInfo.CurrentCulture);
            }
            catch
            {
                Quarter2Month.FallMonth = FallMonthDefault;
                XML.XMLWriteFile(xmlRootQuarter2MonthLocation, FallMonthKey, Quarter2Month.FallMonth.ToString(CultureInfo.CurrentCulture));
            }

            try
            {
                Quarter2Month.WinterMonth = Convert.ToInt32(XML.XMLReadFile(xmlRootQuarter2MonthLocation, WinterMonthKey), CultureInfo.CurrentCulture);
            }
            catch
            {
                Quarter2Month.WinterMonth = WinterMonthDefault;
                XML.XMLWriteFile(xmlRootQuarter2MonthLocation, WinterMonthKey, Quarter2Month.WinterMonth.ToString(CultureInfo.CurrentCulture));
            }

            try
            {
                Quarter2Month.SpringMonth = Convert.ToInt32(XML.XMLReadFile(xmlRootQuarter2MonthLocation, SpringMonthKey), CultureInfo.CurrentCulture);
            }
            catch
            {
                Quarter2Month.SpringMonth = SpringMonthDefault;
                XML.XMLWriteFile(xmlRootQuarter2MonthLocation, SpringMonthKey, Quarter2Month.SpringMonth.ToString(CultureInfo.CurrentCulture));
            }

            return(Quarter2Month);
        }
コード例 #9
0
        public void Save()
        {
            Crypto cry = new Crypto(UserSettings);

            XMLhelper XML = new XMLhelper(UserSettings);

            XML.XMLWriteFile(xmlUserNodeNameLocation, CollegeAbbreviationKey, UserSettings.CollegeAbbreviation);
            if (UserSettings.EmployeeID == "")
            {
                XML.XMLWriteFile(xmlUserNodeNameLocation, EmployeeIDKey, "");
            }
            else
            {
                XML.XMLWriteFile(xmlUserNodeNameLocation, EmployeeIDKey, cry.Encrypt(UserSettings.EmployeeID));
            }

            if (UserSettings.EmployeePIN == "")
            {
                XML.XMLWriteFile(xmlUserNodeNameLocation, EmployeePINKey, "");
            }
            else
            {
                XML.XMLWriteFile(xmlUserNodeNameLocation, EmployeePINKey, cry.Encrypt(UserSettings.EmployeePIN));
            }

            XML.XMLWriteFile(xmlUserNodeNameLocation, EmailKey, UserSettings.Email);
            XML.XMLWriteFile(xmlUserNodeNameLocation, OverWriteAllKey, UserSettings.OverWriteAll.ToString(CultureInfo.CurrentCulture));
        }
コード例 #10
0
        public ClickerSettings Load()
        {
            ClickerSettings ClickerSettings = new ClickerSettings();
            XMLhelper       XML             = new XMLhelper(UserSettings);

            ClickerSettings.Directory = XML.XMLReadFile(xmlRootCLICKERLocation, DirectoryKey);
            if (ClickerSettings.Directory == "")
            {
                ClickerSettings.Directory = DefaultDirectory;
                XML.XMLWriteFile(xmlRootCLICKERLocation, DirectoryKey, ClickerSettings.Directory);
            }

            try
            {
                ClickerSettings.Export = Convert.ToBoolean(XML.XMLReadFile(xmlRootCLICKERLocation, ExportKey).ToLower());
            }
            catch {
                ClickerSettings.Export = false;
                XML.XMLWriteFile(xmlRootCLICKERLocation, ExportKey, ClickerSettings.Export.ToString(CultureInfo.CurrentCulture));
            }

            try
            {
                ClickerSettings.Underscore = Convert.ToBoolean(XML.XMLReadFile(xmlRootCLICKERLocation, UnderscoreKey).ToLower());
            }
            catch {
                ClickerSettings.Underscore = true;
                XML.XMLWriteFile(xmlRootCLICKERLocation, UnderscoreKey, ClickerSettings.Underscore.ToString(CultureInfo.CurrentCulture));
            }

            try
            {
                ClickerSettings.SelectedValue = Convert.ToInt32(XML.XMLReadFile(xmlRootCLICKERLocation, SelectedOutputkey));
            }
            catch
            {
                ClickerSettings.SelectedValue = SelectedOutputDefault;
                XML.XMLWriteFile(xmlRootCLICKERLocation, SelectedOutputkey, ClickerSettings.SelectedValue.ToString(CultureInfo.CurrentCulture));
            }


            return(ClickerSettings);
        }
コード例 #11
0
        public void Save(WebAssignSettings WebAssignSettings)
        {
            string    Temp;
            XMLhelper XML = new XMLhelper(UserSettings);

            XML.XMLWriteFile(xmlWEBASSIGNNodeNameLocation, DirectoryKey, WebAssignSettings.Directory);
            XML.XMLWriteFile(xmlWEBASSIGNNodeNameLocation, ExportKey, WebAssignSettings.Export.ToString(CultureInfo.CurrentCulture));


            if (WebAssignSettings.UserPassword == WebAssignPassword.LastName)
            {
                Temp = "LAST_NAME";
            }
            else
            {
                Temp = "SID";
            }
            XML.XMLWriteFile(xmlWEBASSIGNNodeNameLocation, PasswordKey, Temp);


            if (WebAssignSettings.SEPARATOR == WebAssignSeperator.Tab)
            {
                Temp = "TAB";
            }
            else
            {
                Temp = "COMMA";
            }
            XML.XMLWriteFile(xmlWEBASSIGNNodeNameLocation, SEPARATORKey, Temp);


            if (WebAssignSettings.Username == WebAssignUserName.First_Name_Initial_plus_Last_Name)
            {
                Temp = "First_Name_Initial_plus_Last_Name";
            }
            else if (WebAssignSettings.Username == WebAssignUserName.First_Name_plus_Last_Name)
            {
                Temp = "First_Name_plus_Last_Name";
            }
            else
            {
                Temp = "First_Name_Initial_plus_Middle_Initial_plus_Last_Name";
            }

            XML.XMLWriteFile(xmlWEBASSIGNNodeNameLocation, UsernameKey, Temp);
            XML.XMLWriteFile(xmlWEBASSIGNNodeNameLocation, UnderscoreKey, WebAssignSettings.Underscore.ToString(CultureInfo.CurrentCulture));
            XML.XMLWriteFile(xmlWEBASSIGNNodeNameLocation, InstitutionKey, WebAssignSettings.Institution);
        }
コード例 #12
0
        public WebAssignSettings Load()
        {
            WebAssignSettings WebAssignSettings = new WebAssignSettings();
            string            Return;

            XMLhelper XML = new XMLhelper(UserSettings);

            WebAssignSettings.Directory = XML.XMLReadFile(xmlWEBASSIGNNodeNameLocation, DirectoryKey);
            if (WebAssignSettings.Directory == "")
            {
                WebAssignSettings.Directory = DefaultDirectory;
                XML.XMLWriteFile(xmlWEBASSIGNNodeNameLocation, DirectoryKey, WebAssignSettings.Directory);
            }

            try
            {
                WebAssignSettings.Export = Convert.ToBoolean(XML.XMLReadFile(xmlWEBASSIGNNodeNameLocation, ExportKey).ToLower());
            }
            catch
            {
                WebAssignSettings.Export = false;
                XML.XMLWriteFile(xmlWEBASSIGNNodeNameLocation, ExportKey, WebAssignSettings.Export.ToString(CultureInfo.CurrentCulture));
            }

            Return = XML.XMLReadFile(xmlWEBASSIGNNodeNameLocation, PasswordKey);
            if (Return == "")
            {
                Return = "LAST_NAME";
                XML.XMLWriteFile(xmlWEBASSIGNNodeNameLocation, PasswordKey, Return);
            }
            if (Return == "LAST_NAME")
            {
                WebAssignSettings.UserPassword = WebAssignPassword.LastName;
            }
            else
            {
                WebAssignSettings.UserPassword = WebAssignPassword.SID;
            }

            Return = XML.XMLReadFile(xmlWEBASSIGNNodeNameLocation, SEPARATORKey);
            if (Return == "")
            {
                Return = "TAB";
                XML.XMLWriteFile(xmlWEBASSIGNNodeNameLocation, SEPARATORKey, Return);
            }

            if (Return == "TAB")
            {
                WebAssignSettings.SEPARATOR = WebAssignSeperator.Tab;
            }
            else
            {
                WebAssignSettings.SEPARATOR = WebAssignSeperator.Comma;
            }

            try
            {
                WebAssignSettings.Underscore = Convert.ToBoolean(XML.XMLReadFile(xmlWEBASSIGNNodeNameLocation, UnderscoreKey).ToLower());
            }
            catch
            {
                WebAssignSettings.Underscore = true;
                XML.XMLWriteFile(xmlWEBASSIGNNodeNameLocation, UnderscoreKey, WebAssignSettings.Underscore.ToString(CultureInfo.CurrentCulture));
            }
            WebAssignSettings.Institution = XML.XMLReadFile(xmlWEBASSIGNNodeNameLocation, InstitutionKey);

            Return = XML.XMLReadFile(xmlWEBASSIGNNodeNameLocation, UsernameKey);
            if (Return == "")
            {
                Return = "First_Name_Initial_plus_Last_Name";
                XML.XMLWriteFile(xmlWEBASSIGNNodeNameLocation, UsernameKey, Return);
            }


            if (Return == "First_Name_Initial_plus_Last_Name")
            {
                WebAssignSettings.Username = WebAssignUserName.First_Name_Initial_plus_Last_Name;
            }
            else if (Return == "First_Name_plus_Last_Name")
            {
                WebAssignSettings.Username = WebAssignUserName.First_Name_plus_Last_Name;
            }
            else
            {
                WebAssignSettings.Username = WebAssignUserName.First_Name_Initial_plus_Middle_Initial_plus_Last_Name;
            }

            return(WebAssignSettings);
        }
コード例 #13
0
        public ExcelClassSettings Load()
        {
            ExcelClassSettings ExcelClassSettings = new ExcelClassSettings();

            XMLhelper XML = new XMLhelper(UserSettings);

            try
            {
                ExcelClassSettings.Export = Convert.ToBoolean(XML.XMLReadFile(xmlEXCELNodeNameLocation, ExportKey).ToLower());
            }
            catch
            {
                ExcelClassSettings.Export = false;
                XML.XMLWriteFile(xmlEXCELNodeNameLocation, ExportKey, ExcelClassSettings.Export.ToString(CultureInfo.CurrentCulture));
            }

            try
            {
                ExcelClassSettings.ExportWaitlist = Convert.ToBoolean(XML.XMLReadFile(xmlEXCELNodeNameLocation, ExportWaitListKey).ToLower());
            }
            catch
            {
                ExcelClassSettings.ExportWaitlist = false;
                XML.XMLWriteFile(xmlEXCELNodeNameLocation, ExportWaitListKey, ExcelClassSettings.ExportWaitlist.ToString(CultureInfo.CurrentCulture));
            }

            try
            {
                ExcelClassSettings.ExportMiddleInitial = Convert.ToBoolean(XML.XMLReadFile(xmlEXCELNodeNameLocation, ExportMiddleInitialKey).ToLower());
            }
            catch
            {
                ExcelClassSettings.ExportMiddleInitial = false;
                XML.XMLWriteFile(xmlEXCELNodeNameLocation, ExportMiddleInitialKey, ExcelClassSettings.ExportMiddleInitial.ToString(CultureInfo.CurrentCulture));
            }

            try
            {
                ExcelClassSettings.ExportSID = Convert.ToBoolean(XML.XMLReadFile(xmlEXCELNodeNameLocation, ExportSIDKey).ToLower());
            }
            catch
            {
                ExcelClassSettings.ExportSID = true;
                XML.XMLWriteFile(xmlEXCELNodeNameLocation, ExportSIDKey, ExcelClassSettings.ExportSID.ToString(CultureInfo.CurrentCulture));
            }

            try
            {
                ExcelClassSettings.ExportSIDLast4 = Convert.ToBoolean(XML.XMLReadFile(xmlEXCELNodeNameLocation, ExportSIDLast4Key).ToLower());
            }
            catch
            {
                ExcelClassSettings.ExportSIDLast4 = false;
                XML.XMLWriteFile(xmlEXCELNodeNameLocation, ExportSIDLast4Key, ExcelClassSettings.ExportSIDLast4.ToString(CultureInfo.CurrentCulture));
            }

            try
            {
                ExcelClassSettings.FirstStudent = Convert.ToInt32(XML.XMLReadFile(xmlEXCELNodeNameLocation, FirstStudentKey).ToLower());
            }
            catch
            {
                ExcelClassSettings.FirstStudent = FirstStudentDefault;
                XML.XMLWriteFile(xmlEXCELNodeNameLocation, FirstStudentKey, ExcelClassSettings.FirstStudent.ToString(CultureInfo.CurrentCulture));
            }

            try
            {
                ExcelClassSettings.SaveFileNameIncludesQuarter = Convert.ToBoolean(XML.XMLReadFile(xmlEXCELNodeNameLocation, TemplateCopyNameIncludesQuarterKey).ToLower());
            }
            catch
            {
                ExcelClassSettings.SaveFileNameIncludesQuarter = true;
                XML.XMLWriteFile(xmlEXCELNodeNameLocation, TemplateCopyNameIncludesQuarterKey, ExcelClassSettings.SaveFileNameIncludesQuarter.ToString(CultureInfo.CurrentCulture));
            }


            ExcelClassSettings.FirstNameColumnLetter = XML.XMLReadFile(xmlEXCELNodeNameLocation, FirstNameColumnLetterKey);
            if (ExcelClassSettings.FirstNameColumnLetter == "")
            {
                ExcelClassSettings.FirstNameColumnLetter = FirstNameColumnLetterDefault;
                XML.XMLWriteFile(xmlEXCELNodeNameLocation, FirstNameColumnLetterKey, ExcelClassSettings.FirstNameColumnLetter);
            }

            ExcelClassSettings.ItemCell = XML.XMLReadFile(xmlEXCELNodeNameLocation, ItemCellKey);
            if (ExcelClassSettings.ItemCell == "")
            {
                ExcelClassSettings.ItemCell = ItemCellDefault;
                XML.XMLWriteFile(xmlEXCELNodeNameLocation, ItemCellKey, ExcelClassSettings.ItemCell);
            }

            ExcelClassSettings.LastNameColumnLetter = XML.XMLReadFile(xmlEXCELNodeNameLocation, LastNameColumnLetterKey);
            if (ExcelClassSettings.LastNameColumnLetter == "")
            {
                ExcelClassSettings.LastNameColumnLetter = LastNameColumnLetterDefault;
                XML.XMLWriteFile(xmlEXCELNodeNameLocation, LastNameColumnLetterKey, ExcelClassSettings.LastNameColumnLetter);
            }

            #region Option ColumnLetterKey

            ExcelClassSettings.OptHead1ColumnLetter = XML.XMLReadFile(xmlEXCELNodeNameLocation, OptHead1ColumnLetterKey);
            if (ExcelClassSettings.OptHead1ColumnLetter == "")
            {
                ExcelClassSettings.OptHead1ColumnLetter = OptHead1ColumnLetterDefault;
                XML.XMLWriteFile(xmlEXCELNodeNameLocation, OptHead1ColumnLetterKey, ExcelClassSettings.OptHead1ColumnLetter);
            }

            ExcelClassSettings.OptHead2ColumnLetter = XML.XMLReadFile(xmlEXCELNodeNameLocation, OptHead2ColumnLetterKey);
            if (ExcelClassSettings.OptHead2ColumnLetter == "")
            {
                ExcelClassSettings.OptHead2ColumnLetter = OptHead2ColumnLetterDefault;
                XML.XMLWriteFile(xmlEXCELNodeNameLocation, OptHead2ColumnLetterKey, ExcelClassSettings.OptHead2ColumnLetter);
            }


            ExcelClassSettings.OptHead3ColumnLetter = XML.XMLReadFile(xmlEXCELNodeNameLocation, OptHead3ColumnLetterKey);
            if (ExcelClassSettings.OptHead3ColumnLetter == "")
            {
                ExcelClassSettings.OptHead3ColumnLetter = OptHead3ColumnLetterDefault;
                XML.XMLWriteFile(xmlEXCELNodeNameLocation, OptHead3ColumnLetterKey, ExcelClassSettings.OptHead3ColumnLetter);
            }
            #endregion

            #region Option Header Names
            ExcelClassSettings.HeaderNames.Header1 = XML.XMLReadFile(xmlEXCELNodeNameLocation, OptHead1NameDefault);
            if (ExcelClassSettings.HeaderNames.Header1 == "")
            {
                ExcelClassSettings.HeaderNames.Header1 = OptionHeaders.HeaderDefault;
                XML.XMLWriteFile(xmlEXCELNodeNameLocation, OptHead1NameDefault, ExcelClassSettings.HeaderNames.Header1);
            }

            ExcelClassSettings.HeaderNames.Header2 = XML.XMLReadFile(xmlEXCELNodeNameLocation, OptHead2NameDefault);
            if (ExcelClassSettings.HeaderNames.Header2 == "")
            {
                ExcelClassSettings.HeaderNames.Header2 = OptionHeaders.HeaderDefault;
                XML.XMLWriteFile(xmlEXCELNodeNameLocation, OptHead2NameDefault, ExcelClassSettings.HeaderNames.Header2);
            }

            ExcelClassSettings.HeaderNames.Header3 = XML.XMLReadFile(xmlEXCELNodeNameLocation, OptHead3NameDefault);
            if (ExcelClassSettings.HeaderNames.Header3 == "")
            {
                ExcelClassSettings.HeaderNames.Header3 = OptionHeaders.HeaderDefault;
                XML.XMLWriteFile(xmlEXCELNodeNameLocation, OptHead3NameDefault, ExcelClassSettings.HeaderNames.Header3);
            }
            ExcelClassSettings.HeaderNames.WaitListHeader = XML.XMLReadFile(xmlEXCELNodeNameLocation, OptHeadWaitlistNameDefault);
            if (ExcelClassSettings.HeaderNames.WaitListHeader == "")
            {
                ExcelClassSettings.HeaderNames.WaitListHeader = OptionHeaders.HeaderDefault;
                XML.XMLWriteFile(xmlEXCELNodeNameLocation, OptHeadWaitlistNameDefault, ExcelClassSettings.HeaderNames.WaitListHeader);
            }
            #endregion

            #region Export Option Values
            try
            {
                ExcelClassSettings.ExportoptHead1 = Convert.ToBoolean(XML.XMLReadFile(xmlEXCELNodeNameLocation, ExportoptHead1Key).ToLower());
            }
            catch
            {
                ExcelClassSettings.ExportoptHead1 = false;
                XML.XMLWriteFile(xmlEXCELNodeNameLocation, ExportoptHead1Key, ExcelClassSettings.ExportoptHead1.ToString(CultureInfo.CurrentCulture));
            }

            try
            {
                ExcelClassSettings.ExportoptHead2 = Convert.ToBoolean(XML.XMLReadFile(xmlEXCELNodeNameLocation, ExportoptHead2Key).ToLower());
            }
            catch
            {
                ExcelClassSettings.ExportoptHead2 = false;
                XML.XMLWriteFile(xmlEXCELNodeNameLocation, ExportoptHead2Key, ExcelClassSettings.ExportoptHead2.ToString(CultureInfo.CurrentCulture));
            }



            try
            {
                ExcelClassSettings.ExportoptHead3 = Convert.ToBoolean(XML.XMLReadFile(xmlEXCELNodeNameLocation, ExportoptHead3Key).ToLower());
            }
            catch
            {
                ExcelClassSettings.ExportoptHead3 = false;
                XML.XMLWriteFile(xmlEXCELNodeNameLocation, ExportoptHead3Key, ExcelClassSettings.ExportoptHead3.ToString(CultureInfo.CurrentCulture));
            }

            #endregion

            ExcelClassSettings.SIDColumnLetter = XML.XMLReadFile(xmlEXCELNodeNameLocation, SIDColumnLetterKey);
            if (ExcelClassSettings.SIDColumnLetter == "")
            {
                ExcelClassSettings.SIDColumnLetter = SIDColumnLetterDefault;
                XML.XMLWriteFile(xmlEXCELNodeNameLocation, SIDColumnLetterKey, ExcelClassSettings.SIDColumnLetter);
            }

            ExcelClassSettings.SIDLast4ColumnLetter = XML.XMLReadFile(xmlEXCELNodeNameLocation, SIDLast4ColumnLetterKey);
            if (ExcelClassSettings.SIDLast4ColumnLetter == "")
            {
                ExcelClassSettings.SIDLast4ColumnLetter = SIDLast4ColumnLetterDefault;
                XML.XMLWriteFile(xmlEXCELNodeNameLocation, SIDLast4ColumnLetterKey, ExcelClassSettings.SIDLast4ColumnLetter);
            }

            ExcelClassSettings.TemplateDirectory = XML.XMLReadFile(xmlEXCELNodeNameLocation, TemplateDirectoryKey);
            if (ExcelClassSettings.TemplateDirectory == "")
            {
                ExcelClassSettings.TemplateDirectory = UserSettings.MyDocuments;
                XML.XMLWriteFile(xmlEXCELNodeNameLocation, TemplateDirectoryKey, ExcelClassSettings.TemplateDirectory);
            }

            ExcelClassSettings.TemplateFileName = XML.XMLReadFile(xmlEXCELNodeNameLocation, TemplateNameKey);
            if (ExcelClassSettings.TemplateFileName == "")
            {
                ExcelClassSettings.TemplateFileName = TemplateFileNameDafault;
                XML.XMLWriteFile(xmlEXCELNodeNameLocation, TemplateNameKey, ExcelClassSettings.TemplateFileName);
            }

            ExcelClassSettings.SaveFileName = XML.XMLReadFile(xmlEXCELNodeNameLocation, SaveFileNameKey);
            if (ExcelClassSettings.SaveFileName == "")
            {
                ExcelClassSettings.SaveFileName = SaveAsFileNameDafault;
                XML.XMLWriteFile(xmlEXCELNodeNameLocation, SaveFileNameKey, ExcelClassSettings.SaveFileName);
            }

            ExcelClassSettings.SaveFileDirectory = XML.XMLReadFile(xmlEXCELNodeNameLocation, SaveFileDirectoryKey);
            if (ExcelClassSettings.SaveFileDirectory == "")
            {
                ExcelClassSettings.SaveFileDirectory = ExcelClassSettings.UserDesktop();
                XML.XMLWriteFile(xmlEXCELNodeNameLocation, SaveFileDirectoryKey, ExcelClassSettings.SaveFileDirectory);
            }

            return(ExcelClassSettings);
        }
コード例 #14
0
        public void Save(ExcelClassSettings ExcelClassSettings)
        {
            XMLhelper XML = new XMLhelper(UserSettings);

            XML.XMLWriteFile(xmlEXCELNodeNameLocation, ExportKey, ExcelClassSettings.Export.ToString(CultureInfo.CurrentCulture));
            XML.XMLWriteFile(xmlEXCELNodeNameLocation, ExportWaitListKey, ExcelClassSettings.ExportWaitlist.ToString(CultureInfo.CurrentCulture));
            XML.XMLWriteFile(xmlEXCELNodeNameLocation, ExportMiddleInitialKey, ExcelClassSettings.ExportMiddleInitial.ToString(CultureInfo.CurrentCulture));
            XML.XMLWriteFile(xmlEXCELNodeNameLocation, ExportSIDKey, ExcelClassSettings.ExportSID.ToString(CultureInfo.CurrentCulture));
            XML.XMLWriteFile(xmlEXCELNodeNameLocation, ExportSIDLast4Key, ExcelClassSettings.ExportSIDLast4.ToString(CultureInfo.CurrentCulture));
            XML.XMLWriteFile(xmlEXCELNodeNameLocation, FirstStudentKey, ExcelClassSettings.FirstStudent.ToString(CultureInfo.CurrentCulture));
            XML.XMLWriteFile(xmlEXCELNodeNameLocation, TemplateCopyNameIncludesQuarterKey, ExcelClassSettings.SaveFileNameIncludesQuarter.ToString(CultureInfo.CurrentCulture));
            XML.XMLWriteFile(xmlEXCELNodeNameLocation, ExportoptHead1Key, ExcelClassSettings.ExportoptHead1.ToString(CultureInfo.CurrentCulture));
            XML.XMLWriteFile(xmlEXCELNodeNameLocation, FirstNameColumnLetterKey, ExcelClassSettings.FirstNameColumnLetter);
            XML.XMLWriteFile(xmlEXCELNodeNameLocation, ItemCellKey, ExcelClassSettings.ItemCell);
            XML.XMLWriteFile(xmlEXCELNodeNameLocation, LastNameColumnLetterKey, ExcelClassSettings.LastNameColumnLetter);

            XML.XMLWriteFile(xmlEXCELNodeNameLocation, OptHead1ColumnLetterKey, ExcelClassSettings.OptHead1ColumnLetter);
            XML.XMLWriteFile(xmlEXCELNodeNameLocation, OptHead2ColumnLetterKey, ExcelClassSettings.OptHead2ColumnLetter);
            XML.XMLWriteFile(xmlEXCELNodeNameLocation, OptHead3ColumnLetterKey, ExcelClassSettings.OptHead3ColumnLetter);
            XML.XMLWriteFile(xmlEXCELNodeNameLocation, OptHeadWaitlistNameDefault, ExcelClassSettings.HeaderNames.WaitListHeader);

            XML.XMLWriteFile(xmlEXCELNodeNameLocation, OptHead1NameDefault, ExcelClassSettings.HeaderNames.Header1);
            XML.XMLWriteFile(xmlEXCELNodeNameLocation, OptHead2NameDefault, ExcelClassSettings.HeaderNames.Header2);
            XML.XMLWriteFile(xmlEXCELNodeNameLocation, OptHead3NameDefault, ExcelClassSettings.HeaderNames.Header3);

            XML.XMLWriteFile(xmlEXCELNodeNameLocation, SIDColumnLetterKey, ExcelClassSettings.SIDColumnLetter);
            XML.XMLWriteFile(xmlEXCELNodeNameLocation, SIDLast4ColumnLetterKey, ExcelClassSettings.SIDLast4ColumnLetter);
            XML.XMLWriteFile(xmlEXCELNodeNameLocation, TemplateDirectoryKey, ExcelClassSettings.TemplateDirectory);
            XML.XMLWriteFile(xmlEXCELNodeNameLocation, TemplateNameKey, ExcelClassSettings.TemplateFileName);
            XML.XMLWriteFile(xmlEXCELNodeNameLocation, SaveFileNameKey, ExcelClassSettings.SaveFileName);
        }
コード例 #15
0
        public ExcelRollSettings Load()
        {
            ExcelRollSettings ExcellRollSettings = new ExcelRollSettings();
            XMLhelper         XML = new XMLhelper(UserSettings);

            try
            {
                ExcellRollSettings.Export = Convert.ToBoolean(XML.XMLReadFile(xmlEXCELNodeNameLocation, ExportKey).ToLower());
            }
            catch
            {
                ExcellRollSettings.Export = false;
                XML.XMLWriteFile(xmlEXCELNodeNameLocation, ExportKey, ExcellRollSettings.Export.ToString(CultureInfo.CurrentCulture));
            }

            try
            {
                ExcellRollSettings.ExportWaitlist = Convert.ToBoolean(XML.XMLReadFile(xmlEXCELNodeNameLocation, ExportWaitListKey).ToLower());
            }
            catch
            {
                ExcellRollSettings.ExportWaitlist = false;
                XML.XMLWriteFile(xmlEXCELNodeNameLocation, ExportWaitListKey, ExcellRollSettings.ExportWaitlist.ToString(CultureInfo.CurrentCulture));
            }


            try
            {
                ExcellRollSettings.ExportLab = Convert.ToBoolean(XML.XMLReadFile(xmlEXCELNodeNameLocation, ExportLabKey).ToLower());
            }
            catch
            {
                ExcellRollSettings.ExportLab = false;
                XML.XMLWriteFile(xmlEXCELNodeNameLocation, ExportLabKey, ExcellRollSettings.ExportLab.ToString(CultureInfo.CurrentCulture));
            }

            try
            {
                ExcellRollSettings.ClassIncrement = Convert.ToInt32(XML.XMLReadFile(xmlEXCELNodeNameLocation, ClassIncrementKey));
            }
            catch
            {
                ExcellRollSettings.FirstClass = ClassIncrementDefault;
                XML.XMLWriteFile(xmlEXCELNodeNameLocation, ClassIncrementKey, ExcellRollSettings.ClassIncrement.ToString(CultureInfo.CurrentCulture));
            }

            try
            {
                ExcellRollSettings.FirstClass = Convert.ToInt32(XML.XMLReadFile(xmlEXCELNodeNameLocation, FirstClassKey));
            }
            catch
            {
                ExcellRollSettings.FirstClass = FirstClassDefault;
                XML.XMLWriteFile(xmlEXCELNodeNameLocation, FirstClassKey, ExcellRollSettings.FirstClass.ToString(CultureInfo.CurrentCulture));
            }

            ExcellRollSettings.ClassNameColumnLetter = XML.XMLReadFile(xmlEXCELNodeNameLocation, ClassNameColumnLetterKey);
            if (ExcellRollSettings.ClassNameColumnLetter == "")
            {
                ExcellRollSettings.ClassNameColumnLetter = ClassNameColumnLetterDefault;
                XML.XMLWriteFile(xmlEXCELNodeNameLocation, ClassNameColumnLetterKey, ExcellRollSettings.ClassNameColumnLetter);
            }

            ExcellRollSettings.FirstMondayDayCell = XML.XMLReadFile(xmlEXCELNodeNameLocation, FirstMondayDayCellKey);
            if (ExcellRollSettings.FirstMondayDayCell == "")
            {
                ExcellRollSettings.FirstMondayDayCell = FirstMondayDayCellDefault;
                XML.XMLWriteFile(xmlEXCELNodeNameLocation, FirstMondayDayCellKey, ExcellRollSettings.FirstMondayDayCell);
            }

            ExcellRollSettings.FirstNameColumnLetter = XML.XMLReadFile(xmlEXCELNodeNameLocation, FirstNameColumnLetterKey);
            if (ExcellRollSettings.FirstNameColumnLetter == "")
            {
                ExcellRollSettings.FirstNameColumnLetter = FirstNameColumnLetterDefault;
                XML.XMLWriteFile(xmlEXCELNodeNameLocation, FirstNameColumnLetterKey, ExcellRollSettings.FirstNameColumnLetter);
            }

            ExcellRollSettings.Header = XML.XMLReadFile(xmlEXCELNodeNameLocation, HeaderKey);
            if (ExcellRollSettings.Header == "")
            {
                ExcellRollSettings.Header = HeaderDefault;
                XML.XMLWriteFile(xmlEXCELNodeNameLocation, HeaderKey, ExcellRollSettings.Header);
            }

            //try
            //{
            //    ExcellRollSettings.Height = Convert.ToSingle(XML.XMLReadFile(xmlEXCELNodeNameLocation, HeightKey));
            //}
            //catch
            //{
            //    ExcellRollSettings.Height = HeightDefault;
            //    XML.XMLWriteFile(xmlEXCELNodeNameLocation, HeightKey, ExcellRollSettings.Height.ToString(CultureInfo.CurrentCulture));
            //}

            ExcellRollSettings.LastNameColumnLetter = XML.XMLReadFile(xmlEXCELNodeNameLocation, LastNameColumnLetterKey);
            if (ExcellRollSettings.LastNameColumnLetter == "")
            {
                ExcellRollSettings.LastNameColumnLetter = LastNameColumnLetterDefault;
                XML.XMLWriteFile(xmlEXCELNodeNameLocation, LastNameColumnLetterKey, ExcellRollSettings.LastNameColumnLetter);
            }

            ExcellRollSettings.MondayDateCell = XML.XMLReadFile(xmlEXCELNodeNameLocation, MondayDateCellKey);
            if (ExcellRollSettings.MondayDateCell == "")
            {
                ExcellRollSettings.MondayDateCell = MondayDateCellDefault;
                XML.XMLWriteFile(xmlEXCELNodeNameLocation, MondayDateCellKey, ExcellRollSettings.MondayDateCell);
            }

            return(ExcellRollSettings);
        }
コード例 #16
0
        public void Save(ExcelRollSettings ExcellRollSettings)
        {
            XMLhelper XML = new XMLhelper(UserSettings);

            XML.XMLWriteFile(xmlEXCELNodeNameLocation, ExportKey, ExcellRollSettings.Export.ToString(CultureInfo.CurrentCulture));
            XML.XMLWriteFile(xmlEXCELNodeNameLocation, ExportWaitListKey, ExcellRollSettings.ExportWaitlist.ToString(CultureInfo.CurrentCulture));
            XML.XMLWriteFile(xmlEXCELNodeNameLocation, ExportLabKey, ExcellRollSettings.ExportLab.ToString(CultureInfo.CurrentCulture));
            XML.XMLWriteFile(xmlEXCELNodeNameLocation, ClassIncrementKey, ExcellRollSettings.ClassIncrement.ToString(CultureInfo.CurrentCulture));
            XML.XMLWriteFile(xmlEXCELNodeNameLocation, ClassNameColumnLetterKey, ExcellRollSettings.ClassNameColumnLetter);
            XML.XMLWriteFile(xmlEXCELNodeNameLocation, FirstClassKey, ExcellRollSettings.FirstClass.ToString(CultureInfo.CurrentCulture));
            XML.XMLWriteFile(xmlEXCELNodeNameLocation, FirstMondayDayCellKey, ExcellRollSettings.FirstMondayDayCell);
            XML.XMLWriteFile(xmlEXCELNodeNameLocation, FirstNameColumnLetterKey, ExcellRollSettings.FirstNameColumnLetter);
            XML.XMLWriteFile(xmlEXCELNodeNameLocation, HeaderKey, ExcellRollSettings.Header);
            //XML.XMLWriteFile(xmlEXCELNodeNameLocation, HeightKey, ExcellRollSettings.Height.ToString(CultureInfo.CurrentCulture));
            XML.XMLWriteFile(xmlEXCELNodeNameLocation, LastNameColumnLetterKey, ExcellRollSettings.LastNameColumnLetter);
            XML.XMLWriteFile(xmlEXCELNodeNameLocation, MondayDateCellKey, ExcellRollSettings.MondayDateCell);
        }