public UpdateViewModel(MainService main, TrayService tray) { this.main = main; this.tray = tray; savePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Update", "update.zip"); upexePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Update", "ProjectEyeUp.exe"); string[] versionArray = Assembly.GetExecutingAssembly().GetName().Version.ToString().Split('.'); version = versionArray[0] + "." + versionArray[1] + "." + versionArray[2]; #if DEBUG version = "1.0.3"; #endif githubUrl = "https://api.github.com/repos/planshit/projecteye/releases/latest"; outPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory); openurlCommand = new Command(new Action <object>(openurlCommand_action)); updateCommand = new Command(new Action <object>(updateCommand_action)); installCommand = new Command(new Action <object>(installCommand_action)); githubRelease = new GithubRelease(githubUrl, version); githubRelease.RequestCompleteEvent += Updater_RequestCompleteEvent; githubRelease.RequestErrorEvent += Updater_RequestErrorEvent; githubRelease.GetRequest(); PlayProcess = true; }
/// <summary> /// Initializes ManagedShell with a custom configuration. /// </summary> /// <param name="config">A ShellConfig struct containing desired initialization parameters.</param> public ShellManager(ShellConfig config) { if (config.EnableTrayService) { TrayService = new TrayService(); ExplorerTrayService = new ExplorerTrayService(); NotificationArea = new NotificationArea(config.PinnedNotifyIcons, TrayService, ExplorerTrayService); } if (config.EnableTasksService) { TasksService = new TasksService(config.TaskIconSize); Tasks = new Tasks(TasksService); } FullScreenHelper = new FullScreenHelper(); ExplorerHelper = new ExplorerHelper(NotificationArea); AppBarManager = new AppBarManager(ExplorerHelper); if (config.EnableTrayService && config.AutoStartTrayService) { NotificationArea.Initialize(); } if (config.EnableTasksService && config.AutoStartTasksService) { Tasks.Initialize(); } }
public TraysController(TrayService trayService) { _trayService = trayService; }