Пример #1
0
        private void Init()
        {
            try
            {
                UpdateAndwhoData();

                screenRect = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea;

                //程序启动后,窗体在屏幕右侧中部
                this.Left = screenRect.Right - this.Width;
                this.Top  = (screenRect.Bottom - this.Height) / 2;

                navigationForm = new NavigationForm();
                calendarForm   = new CalendarForm();

                PhysicalMemoryTimer_Tick(null, null);
                System.Windows.Forms.Timer PhysicalMemoryTimer = new System.Windows.Forms.Timer();
                PhysicalMemoryTimer.Tick    += new EventHandler(PhysicalMemoryTimer_Tick);
                PhysicalMemoryTimer.Interval = 3000;//时间
                PhysicalMemoryTimer.Enabled  = true;


                System.Windows.Forms.Timer StopRectTimer = new System.Windows.Forms.Timer();
                StopRectTimer.Tick    += new EventHandler(StopRectTimer_Tick);
                StopRectTimer.Interval = 1000;//时间
                StopRectTimer.Enabled  = true;

                CheckNewVersion();
            }
            catch
            {
            }
        }
Пример #2
0
 //重新加载导航数据
 private void ReloadNavigation()
 {
     try
     {
         navigationForm = new NavigationForm();
     }
     catch (Exception)
     {
     }
 }
Пример #3
0
 private void ReloadNavigation()
 {
     try
     {
         form_Navigation = new NavigationForm();
     }
     catch (Exception ex)
     {
         log.WriteLog(ex.ToString());
     }
 }
Пример #4
0
        private void AdapterForm_Load(object sender, EventArgs e)
        {
            try
            {
                rectangle_Screen = SystemInformation.WorkingArea;
                //rectangle_Screen = Screen.GetWorkingArea(this);

                //程序启动后,窗体在屏幕右侧中部
                this.Left = SystemInformation.PrimaryMonitorMaximizedWindowSize.Width;
                this.Top  = (SystemInformation.PrimaryMonitorMaximizedWindowSize.Height - this.Height) / 2;

                form_Navigation       = new NavigationForm();
                form_Calendar         = new CalendarForm();
                form_Navigation.Owner = this;
                form_Calendar.Owner   = this;

                PhysicalMemoryTimer_Tick(null, null);
                System.Windows.Forms.Timer PhysicalMemoryTimer = new System.Windows.Forms.Timer();
                PhysicalMemoryTimer.Tick    += new EventHandler(PhysicalMemoryTimer_Tick);
                PhysicalMemoryTimer.Interval = 3000;
                PhysicalMemoryTimer.Enabled  = true;


                System.Windows.Forms.Timer StopRectTimer = new System.Windows.Forms.Timer();
                StopRectTimer.Tick    += new EventHandler(StopRectTimer_Tick);
                StopRectTimer.Interval = 1000;
                StopRectTimer.Enabled  = true;

                this.RegisterAppBar(false);

                updateTimer          = new System.Windows.Forms.Timer();
                updateTimer.Tick    += new EventHandler(CheckNewVersion_Tick);
                updateTimer.Interval = 10 * 1000;
                updateTimer.Enabled  = true;
            }
            catch
            {
            }
        }
Пример #5
0
 private void ReloadNavigation()
 {
     try
     {
         form_Navigation = new NavigationForm();
     }
     catch (Exception ex)
     {
         log.WriteLog(ex.ToString());
     }
 }
Пример #6
0
        private void AdapterForm_Load(object sender, EventArgs e)
        {
            try
            {
                rectangle_Screen = SystemInformation.WorkingArea;
                //rectangle_Screen = Screen.GetWorkingArea(this);

                //程序启动后,窗体在屏幕右侧中部
                this.Left = SystemInformation.PrimaryMonitorMaximizedWindowSize.Width;
                this.Top = (SystemInformation.PrimaryMonitorMaximizedWindowSize.Height - this.Height) / 2;

                form_Navigation = new NavigationForm();
                form_Calendar = new CalendarForm();
                form_Navigation.Owner = this;
                form_Calendar.Owner = this;

                PhysicalMemoryTimer_Tick(null, null);
                System.Windows.Forms.Timer PhysicalMemoryTimer = new System.Windows.Forms.Timer();
                PhysicalMemoryTimer.Tick += new EventHandler(PhysicalMemoryTimer_Tick);
                PhysicalMemoryTimer.Interval = 3000;
                PhysicalMemoryTimer.Enabled = true;

                System.Windows.Forms.Timer StopRectTimer = new System.Windows.Forms.Timer();
                StopRectTimer.Tick += new EventHandler(StopRectTimer_Tick);
                StopRectTimer.Interval = 1000;
                StopRectTimer.Enabled = true;

                this.RegisterAppBar(false);

                updateTimer = new System.Windows.Forms.Timer();
                updateTimer.Tick += new EventHandler(CheckNewVersion_Tick);
                updateTimer.Interval = 10 * 1000;
                updateTimer.Enabled = true;
            }
            catch
            {
            }
        }
Пример #7
0
 //重新加载导航数据
 private void ReloadNavigation()
 {
     try
     {
         navigationForm = new NavigationForm();
     }
     catch (Exception)
     {
     }
 }
Пример #8
0
        private void Init()
        {
            try
            {
                UpdateAndwhoData();

                screenRect = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea;

                //程序启动后,窗体在屏幕右侧中部
                this.Left = screenRect.Right-this.Width;
                this.Top = (screenRect.Bottom - this.Height) / 2;

                navigationForm = new NavigationForm();
                calendarForm = new CalendarForm();

                PhysicalMemoryTimer_Tick(null, null);
                System.Windows.Forms.Timer PhysicalMemoryTimer = new System.Windows.Forms.Timer();
                PhysicalMemoryTimer.Tick += new EventHandler(PhysicalMemoryTimer_Tick);
                PhysicalMemoryTimer.Interval = 3000;//时间
                PhysicalMemoryTimer.Enabled = true;

                System.Windows.Forms.Timer StopRectTimer = new System.Windows.Forms.Timer();
                StopRectTimer.Tick += new EventHandler(StopRectTimer_Tick);
                StopRectTimer.Interval = 1000;//时间
                StopRectTimer.Enabled = true;

                CheckNewVersion();
            }
            catch
            {
            }
        }