/// <summary> /// 定时器调事件 /// </summary> public static void TimeCycle(object sender, EventArgs e) { weatherInfo = new WeatherInfo(); weatherInfo.GetLocationEvent(SetWeatherControl); // //Console.WriteLine("定时调用"); }
static void Main() { // 定义Application对象作为整个应用程序入口 Application app = new Application(); weatherInfo = new WeatherInfo();//开始获取天气信息 weatherInfo.GetLocationEvent(SetWeatherControl); InitialTary(); EmptySlots = new Queue <int>(); Themes = new List <Theme>(); Styles = new List <Style>(); LoadThemes(); //加载默认主题数据 LoadStyles(); //加载默认风格数据 LoadAllStickyNoteView(); //加载创建的标签,从注册表中读取,空则新建 //NoteManager noteManager = new NoteManager(); //AboutView aboutView = new AboutView(); app.Run(); if (REGISTRY.FirstRun) { REGISTRY.StartWithWindows = true; //*******************************注册表启动项*************************** } }