コード例 #1
0
        private void SystemInfoToolstripMenuItem_Click(object sender, RoutedEventArgs e)
        {
            double sysInfoWindowWidth      = Width;
            double sysInfoWindowHeight     = Height;
            double sysInfoWindowTop        = 0;
            double sysInfoWindowLeft       = 0;
            WindowStartupLocation location = WindowStartupLocation.CenterScreen;

            if (settings.SaveWindowPosition && settings.SysInfoWindowHeight != 0 && settings.SysInfoWindowWidth != 0)
            {
                location            = WindowStartupLocation.Manual;
                sysInfoWindowLeft   = settings.SysInfoWindowLeft;
                sysInfoWindowTop    = settings.SysInfoWindowTop;
                sysInfoWindowHeight = settings.SysInfoWindowHeight;
                sysInfoWindowWidth  = settings.SysInfoWindowWidth;
            }

            siWnd = new SystemInfoWindow(cpu.systemInfo, MEMCFG, AsusWmi?.sensors)
            {
                Width  = sysInfoWindowWidth,
                Height = sysInfoWindowHeight,
                WindowStartupLocation = location,
                Top  = sysInfoWindowTop,
                Left = sysInfoWindowLeft
            };

            siWnd.Show();
        }
コード例 #2
0
        private void SystemInfoToolstripMenuItem_Click(object sender, RoutedEventArgs e)
        {
            SystemInfoWindow siWnd = new SystemInfoWindow(cpu.systemInfo, MEMCFG, AsusWmi?.sensors)
            {
                Owner = this
            };

            siWnd.Width  = this.Width;
            siWnd.Height = this.Height;
            siWnd.Show();
        }
コード例 #3
0
        //设置参数
        private void btSetParas_Click(object sender, RoutedEventArgs e)
        {
            SystemInfoWindow formss = new SystemInfoWindow();

            formss.ShowDialog();
        }