示例#1
0
文件: Login.cs 项目: ewin66/Arya
        private static void DoLaundry()
        {
            // Easter Egg - Time to do your laundry - once every 7 days
            DateTime now    = DateTime.Now;
            var      quotes = new[]
            {
                "It's our fundamental guiding principle: provide elegant product data solutions for our clients. Our expertise in data management, data quality, search and navigation drive online revenue and create a customer experience that is intuitive, efficient and rewarding.",
                "Some might call us Data Geeks. And we are. But our team of architects and analysts are also journalists, librarians, linguists, IT ninjas, usability experts, MRO aficionados and more. We love data and it shows in our work habits, culture and success with our clients.",
                "Nobody will tell you that your website is dysfunctional (they'll just shop somewhere else).",
                "Customers don't buy products when they think they have found the right item. They buy when they know they have.",
                "Fixing data problems can be a bit like plugging a hole in a leaky bucket; as soon as you cover one issue, another emerges to take its place."
            };
            DateTime     dtLastLaundry;
            const string lastLaundryDateRegistryKey = "LastLaundry";
            string       lastLaundryDate            = WindowsRegistry.GetFromRegistry(lastLaundryDateRegistryKey);

            try
            {
                dtLastLaundry = DateTime.Parse(lastLaundryDate);
            }
            catch
            {
                dtLastLaundry = now.Subtract(TimeSpan.FromDays(8));
            }
            if (now - dtLastLaundry > TimeSpan.FromDays(7))
            {
                var randomQuote = quotes[new Random(now.Millisecond).Next(quotes.Length)];
                var result      = MessageBox.Show(randomQuote, @"Arya quote");
                WindowsRegistry.SaveToRegistry(lastLaundryDateRegistryKey, now.ToString());
            }
        }
示例#2
0
        private void SelectProject()
        {
            var currentProject = (Project)ddlSelectProject.SelectedItem;

            AryaTools.Instance.InstanceData.CurrentProject = currentProject;
            AryaTools.Instance.AutoSave = chkAutoSave.Checked;

            Program.WriteToErrorFile(
                string.Format(
                    "UserID: {0},UserName: {1}, Project: {2}, Hostname: {3}",
                    AryaTools.Instance.InstanceData.CurrentUser.ID,
                    string.IsNullOrEmpty(AryaTools.Instance.InstanceData.CurrentUser.FullName)
                        ? string.Empty
                        : AryaTools.Instance.InstanceData.CurrentUser.FullName,
                    AryaTools.Instance.InstanceData.CurrentProject.ProjectName, Environment.MachineName), true);

            WindowsRegistry.SaveToRegistry(
                WindowsRegistry.RegistryKeyProject, AryaTools.Instance.InstanceData.CurrentProject.ProjectName);

            //AryaTools.Instance.selectedProject = true;

            DialogResult = DialogResult.OK;

            AryaTools.Instance.Forms.TreeForm.Show();
            Hide();
        }
示例#3
0
文件: FrmTree.cs 项目: ewin66/Arya
 private void loadToOneTabToolStripMenuItem_Click(object sender, EventArgs e)
 {
     WindowsRegistry.SaveToRegistry(RegistryKeyLoadMultiple, LoadToOneTab.ToString());
 }
示例#4
0
文件: FrmTree.cs 项目: ewin66/Arya
 private void includeChildrenToolStripMenuItem_Click(object sender, EventArgs e)
 {
     WindowsRegistry.SaveToRegistry(RegistryKeyIncludeChildren, IncludeChildren.ToString());
     //taxonomyTree.includeChildren = IncludeChildren;
 }