Beispiel #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (Address1 != null ? StringComparer.CurrentCulture.GetHashCode(Address1) : 0);
         hashCode = (hashCode * 397) ^ (Address2 != null ? StringComparer.CurrentCulture.GetHashCode(Address2) : 0);
         hashCode = (hashCode * 397) ^ (Address3 != null ? StringComparer.CurrentCulture.GetHashCode(Address3) : 0);
         hashCode = (hashCode * 397) ^ AutoBackup.GetHashCode();
         hashCode = (hashCode * 397) ^ AutoPrintLabels.GetHashCode();
         hashCode = (hashCode * 397) ^ (BackupFilePath != null ? StringComparer.CurrentCulture.GetHashCode(BackupFilePath) : 0);
         hashCode = (hashCode * 397) ^ CentreQuarterlyCheckDate.GetHashCode();
         hashCode = (hashCode * 397) ^ Created.GetHashCode();
         hashCode = (hashCode * 397) ^ IsGV212CheckEnabled.GetHashCode();
         hashCode = (hashCode * 397) ^ SendMonthlyReport.GetHashCode();
         hashCode = (hashCode * 397) ^ IsStatusReportCheckEnabled.GetHashCode();
         hashCode = (hashCode * 397) ^ (MainEmailAddress != null ? StringComparer.CurrentCulture.GetHashCode(MainEmailAddress) : 0);
         hashCode = (hashCode * 397) ^ MonthlyGV212Date.GetHashCode();
         hashCode = (hashCode * 397) ^ (Office != null ? StringComparer.CurrentCulture.GetHashCode(Office) : 0);
         hashCode = (hashCode * 397) ^ (PhoneNumber != null ? StringComparer.CurrentCulture.GetHashCode(PhoneNumber) : 0);
         hashCode = (hashCode * 397) ^ (PostCode != null ? StringComparer.CurrentCulture.GetHashCode(PostCode) : 0);
         hashCode = (hashCode * 397) ^ (SecondaryEmailAddress != null ? StringComparer.CurrentCulture.GetHashCode(SecondaryEmailAddress) : 0);
         hashCode = (hashCode * 397) ^ (Town != null ? StringComparer.CurrentCulture.GetHashCode(Town) : 0);
         hashCode = (hashCode * 397) ^ Uploaded.GetHashCode();
         hashCode = (hashCode * 397) ^ UserId;
         hashCode = (hashCode * 397) ^ (WorkshopName != null ? StringComparer.CurrentCulture.GetHashCode(WorkshopName) : 0);
         return(hashCode);
     }
 }
        public void FileSystemWatcherManagerTest()
        {
            var pwd  = Directory.GetCurrentDirectory();
            var dest = pwd + @"\test";

            if (Directory.Exists(dest))
            {
                Directory.Delete(dest, true);
            }
            Directory.CreateDirectory(dest);
            string[] exts = { "hoge", "fuga", "txt" };
            fswm = new FileSystemWatcherManager(pwd, dest, exts);


            var timeStr = AutoBackup.GetTimeString();
            var input   = "hogefuga" + timeStr;

            System.IO.StreamWriter sw = new System.IO.StreamWriter(
                pwd + @"\test.txt",
                false,
                System.Text.Encoding.GetEncoding("shift_jis"));
            //TextBox1.Textの内容を書き込む
            sw.Write(input);
            //閉じる
            sw.Close();
            Console.WriteLine(pwd);
            System.Threading.Thread.Sleep(6000);
            var          fileName = Directory.GetFiles(pwd + @"\test")[0];
            StreamReader sr       = new StreamReader(fileName,
                                                     System.Text.Encoding.GetEncoding("shift_jis"));
            var output = sr.ReadToEnd();

            sr.Close();

            Assert.AreEqual(input, output);
        }
        private void btnAutoBackup_Click(object sender, EventArgs e)
        {
            AutoBackup autoBackUpSettings = new AutoBackup();

            autoBackUpSettings.ShowDialog();
        }
Beispiel #4
0
    static void Init()
    {
        AutoBackup window = (AutoBackup)EditorWindow.GetWindow(typeof(AutoBackup));

        window.Show();
    }