Ejemplo n.º 1
0
Archivo: Login.cs Proyecto: 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());
            }
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 3
0
 private void loadToOneTabToolStripMenuItem_Click(object sender, EventArgs e)
 {
     WindowsRegistry.SaveToRegistry(RegistryKeyLoadMultiple, LoadToOneTab.ToString());
 }
Ejemplo n.º 4
0
 private void includeChildrenToolStripMenuItem_Click(object sender, EventArgs e)
 {
     WindowsRegistry.SaveToRegistry(RegistryKeyIncludeChildren, IncludeChildren.ToString());
     //taxonomyTree.includeChildren = IncludeChildren;
 }