static void Main(string[] args) { // Windows Vista or later if (Environment.OSVersion.Version.Major >= 6) { SetProcessDPIAware(); } Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); // Check if the start up directory writable GlobalSetting.IsStartUpDirWritable = GlobalSetting.CheckStartUpDirWritable(); // Enable Portable mode as default if possible GlobalSetting.IsPortableMode = GlobalSetting.IsStartUpDirWritable; string topcmd = args[0].ToLower().Trim(); if (topcmd == "igupdate")// check for update { Core.CheckForUpdate(); } else if (topcmd == "igautoupdate")// auto check for update { Core.AutoUpdate(); } else if (topcmd == "firstlaunch") { Application.Run(new frmFirstLaunch()); } }
static void Main(string[] argv) { args = argv; Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); string topcmd = args[0].ToLower().Trim(); if (topcmd == "igupdate")//kiem tra phien ban { Core.CheckForUpdate(); } else if (topcmd == "igupload") { Core.Upload(args[1], args[2]); } else if (topcmd == "igautoupdate")//tu dong kiem tra phien ban { Core.AutoUpdate(); } else if (topcmd == "igpacktheme")//dong goi theme thanh *.igtheme { //cmd: igcmd.exe igpacktheme "srcDir" "desFile" Core.PackTheme(args[1], args[2]); } else if (topcmd == "iginstalltheme")//cai dat theme { Core.InstallTheme(args[1]); } }
static void Main(string[] args) { // Windows Vista or later if (Environment.OSVersion.Version.Major >= 6) { SetProcessDPIAware(); } Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); string topcmd = args[0].ToLower().Trim(); if (topcmd == "igupdate")// check for update { Core.CheckForUpdate(); } else if (topcmd == "igautoupdate")// auto check for update { Core.AutoUpdate(); } else if (topcmd == "igpacktheme")// pack theme *.igtheme { //cmd: igcmd.exe igpacktheme "srcDir" "desFile" Core.PackTheme(args[1], args[2]); } else if (topcmd == "iginstalltheme")//install theme { Core.InstallTheme(args[1]); } }
static int Main(string[] args) { string topcmd = args[0].ToLower().Trim(); // Windows Vista or later if (Environment.OSVersion.Version.Major >= 6) { SetProcessDPIAware(); } Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); // Check if the start up directory writable GlobalSetting.IsStartUpDirWritable = GlobalSetting.CheckStartUpDirWritable(); //Set desktop wallpaper #region setwallpaper <string imgPath> [int style] if (topcmd == "setwallpaper") { //Get image's path string imgPath = args[1]; var style = DesktopWallapaper.Style.Current; if (args.Length > 2) { //Get style Enum.TryParse(args[2], out style); } //Apply changes and return exit code return((int)DesktopWallapaper.Set(imgPath, style)); } #endregion // check for update else if (topcmd == "igupdate") { Core.CheckForUpdate(); } // auto check for update else if (topcmd == "igautoupdate") { Core.AutoUpdate(); } // run first launch configs else if (topcmd == "firstlaunch") { Application.Run(new frmFirstLaunch()); } return(0); }
private static int Main(string[] args) { // Issue #360: IG periodically searching for dismounted device // This _must_ be executed first! SetErrorMode(ErrorModes.SEM_FAILCRITICALERRORS); var topcmd = args[0].ToLower().Trim(); // Windows Vista or later if (Environment.OSVersion.Version.Major >= 6) { SetProcessDPIAware(); } Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); // Load user configs Configs.Load(); // Set desktop wallpaper #region setwallpaper <string imgPath> [int style] if (topcmd == "setwallpaper") { // Get image's path var imgPath = args[1]; var style = DesktopWallapaper.Style.Current; if (args.Length > 2) { // Get style Enum.TryParse(args[2], out style); } // Apply changes and return exit code return((int)DesktopWallapaper.Set(imgPath, style)); } #endregion // check for update else if (topcmd == "igupdate") { return(Core.CheckForUpdate() ? 1 : 0); } // auto check for update else if (topcmd == "igautoupdate") { return(Core.AutoUpdate() ? 1 : 0); } // run first launch configs else if (topcmd == "firstlaunch") { Application.Run(new frmFirstLaunch()); } return(0); }
static void Main(string[] argv) { args = argv; Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); string topcmd = args[0].ToLower().Trim(); if (topcmd == "igsocial") { Core.Social(); } else if (topcmd == "igupdate")//kiem tra phien ban { Core.CheckForUpdate(); } else if (topcmd == "igupload") { Core.Upload(args[1], args[2]); } else if (topcmd == "igautoupdate")//tu dong kiem tra phien ban { Core.AutoUpdate(); } else if (topcmd == "igpacktheme")//dong goi theme thanh *.igtheme { //cmd: igcmd.exe igpacktheme "srcDir" "desFile" Core.PackTheme(args[1], args[2]); } else if (topcmd == "iginstalltheme")//cai dat theme { Core.InstallTheme(args[1]); } else if (topcmd == "igfollow")//đăng ký theo dõi thông tin ImageGlass { Core.Follow(); } else if (topcmd == "ignewlang")//tạo mới 1 gói ngôn ngữ { Core.NewLanguage(); } else if (topcmd == "igeditlang")//chỉnh sửa gói ngôn ngữ { //cmd: igcmd.exe igeditlang "srcFile" Core.EditLanguage(args[1]); } }
static void Main(string[] args) { // Windows Vista or later if (Environment.OSVersion.Version.Major >= 6) { SetProcessDPIAware(); } Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); // Check if the start up directory writable GlobalSetting.IsStartUpDirWritable = GlobalSetting.CheckStartUpDirWritable(); // Enable Portable mode as default if possible GlobalSetting.IsPortableMode = GlobalSetting.IsStartUpDirWritable; string topcmd = args[0].ToLower().Trim(); if (topcmd == "igupdate")// check for update { Core.CheckForUpdate(); } else if (topcmd == "igautoupdate")// auto check for update { Core.AutoUpdate(); } else if (topcmd == "igpacktheme")// pack theme *.igtheme { //cmd: igcmd.exe igpacktheme "srcDir" "desFile" Core.PackTheme(args[1], args[2]); } else if (topcmd == "iginstalltheme")//install theme { Core.InstallTheme(args[1]); } }
static void Main(string[] args) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); string topcmd = args[0].ToLower().Trim(); if (topcmd == "igupdate")// check for update { Core.CheckForUpdate(); } else if (topcmd == "igautoupdate")// auto check for update { Core.AutoUpdate(); } else if (topcmd == "igpacktheme")// pack theme *.igtheme { //cmd: igcmd.exe igpacktheme "srcDir" "desFile" Core.PackTheme(args[1], args[2]); } else if (topcmd == "iginstalltheme")//install theme { Core.InstallTheme(args[1]); } }