当前位置: 首页>>代码示例>>C#>>正文


C# Calendar.Show方法代码示例

本文整理汇总了C#中Calendar.Show方法的典型用法代码示例。如果您正苦于以下问题:C# Calendar.Show方法的具体用法?C# Calendar.Show怎么用?C# Calendar.Show使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Calendar的用法示例。


在下文中一共展示了Calendar.Show方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: frmMain_Load

        private void frmMain_Load(object sender, EventArgs e)
        {
            Connect();
            Download();

            //this.WindowState = FormWindowState.Minimized;
            ////this.Hide();
            //fIntro.Show();

            #region Chế độ hiển thị khi khởi động chương trình

            try
            {
                XmlDocument doc = new XmlDocument();
                doc.Load(Application.StartupPath + "/Config.xml");

                XmlElement ele = doc.DocumentElement;
                XmlNodeList TaskList = ele.GetElementsByTagName("DS_Config");

                notifyIcon.Visible = false;

                for (int i = 0; i < TaskList.Count; i++)
                {
                    strLanguage = Decryption(TaskList[i].ChildNodes[2].InnerText);
                    strTheme = Decryption(TaskList[i].ChildNodes[3].InnerText);
                    if (Decryption(TaskList[i].ChildNodes[0].InnerText) == "True" && Decryption(TaskList[i].ChildNodes[1].InnerText) == "Mini")
                    {
                        this.WindowState = FormWindowState.Minimized;
                        this.ShowInTaskbar = false;
                        notifyIcon.Visible = true;
                    }
                    else
                    {
                        notifyIcon.Visible = false;
                    }

                    if (Decryption(TaskList[i].ChildNodes[5].InnerText) == "Yes")
                    {
                        frmTaskOfTheDay totd = new frmTaskOfTheDay();
                        totd.Show();
                    }
                }
            }
            catch
            {
                //if (File.Exists(Application.StartupPath + "/Config.xml"))
                //{
                //    File.Delete("Config.xml.bk");
                //    File.Copy(Application.StartupPath + "/Config.xml", "Config.xml.bk");
                //    File.Delete(Application.StartupPath + "/Config.xml");
                //}

                //XmlTextWriter writer = new XmlTextWriter(Application.StartupPath + "/Config.xml", Encoding.UTF8);
                //writer.Formatting = Formatting.Indented;
                ////Create XML
                //writer.WriteStartDocument();
                ////Create Root
                //writer.WriteStartElement("Config");
                //writer.WriteEndElement();
                //writer.WriteEndDocument();
                //writer.Flush();
                //writer.Close();

                if (File.Exists(Application.StartupPath + "/Config.xml"))
                {
                    File.Delete(Application.StartupPath + "/Config.xml");
                }

                using (FileStream fileStream = File.Create(Application.StartupPath + "/Config.xml"))
                {
                    myAssembly.GetManifestResourceStream("Reminiscent.Resources.XML.Config.xml").CopyTo(fileStream);
                }

                MessageBox.Show("Your config database have been corrupted! \n\n It have been backup and created a new one.", "Warring", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            #endregion

            timerMain.Start();

            classShowSticky.Load();

            #region Language

            if (!Directory.Exists(Application.StartupPath + "/Language"))
            {
                Directory.CreateDirectory(Application.StartupPath + "/Language");
            }
            if (!File.Exists(Application.StartupPath + "/Language/Language-English.xml"))
            {
                using (FileStream fileStream = File.Create(Application.StartupPath + "/Language/Language-English.xml"))
                {
                    myAssembly.GetManifestResourceStream("Reminiscent.Resources.XML.Language-English.xml").CopyTo(fileStream);
                }
            }
            if (!File.Exists(Application.StartupPath + "/Language/Language-Vietnamese.xml"))
            {
                using (FileStream fileStream = File.Create(Application.StartupPath + "/Language/Language-Vietnamese.xml"))
                {
                    myAssembly.GetManifestResourceStream("Reminiscent.Resources.XML.Language-Vietnamese.xml").CopyTo(fileStream);
                }
//.........这里部分代码省略.........
开发者ID:minhnguyen31093,项目名称:Reminiscent,代码行数:101,代码来源:Main.cs


注:本文中的Calendar.Show方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。