/// <summary> /// Initializes a new instance of the <see cref="Win7"/> class. /// </summary> public Win7() { if (IsWindowsSeven) { windowsTaskbar = TaskbarManager.Instance; } }
public Windows7TaskbarItem(IntPtr windowHandle) { if (!IsPlatformSupported) throw new PlatformNotSupportedException("This class requires Windows 7 or higher"); _taskbarManager = TaskbarManager.Instance; _windowHandle = windowHandle; }
/// <summary> /// Initializes a new instance of the <see cref="Win7"/> class. /// </summary> public Win7() { if (this.IsWindowsSeven) { this.windowsTaskbar = TaskbarManager.Instance; this.windowsTaskbar.ApplicationId = "HandBrake"; } }
public Win7Integrator() { _taskbarsupport = TaskbarManager.IsPlatformSupported; if (_taskbarsupport) { _taskbar = TaskbarManager.Instance; } }
public static void Init(Form form) { if (TaskbarManager.IsPlatformSupported) { WindowsTaskbar = TaskbarManager.Instance; WindowsTaskbar.ApplicationId = TaskbarHelper.appId; WindowHandle = form.Handle; } }
public EntryAction(CLKsFATXLib.Structs.Queue[] mi) { InitializeComponent(); if (Environment.OSVersion.Version.Build >= 7600) { Windows7 = true; } if (Environment.OSVersion.Version.Build >= 6000) { Aero = true; } if (Windows7) { tm = TaskbarManager.Instance; } this.HandleCreated += new EventHandler(EntryAction_HandleCreated); this.FormClosing += new FormClosingEventHandler(EntryAction_FormClosing); MultiInject = mi; }
public PyTestMonForm(IEnumerable<SetupData> setupDataCollection, BrowserWriter browserWriter, TestFolderMonitor testFolderMonitor, string lastSetupName, TaskbarManager taskbarManager, TaskbarIcons taskbarIcons) { InitializeComponent(); Setups.Items.AddRange(setupDataCollection.ToArray()); browserWriter.Browser = Browser; _testFolderMonitor = testFolderMonitor; _taskbarManager = taskbarManager; _taskbarIcons = taskbarIcons; SetupData lastSetup = setupDataCollection.Where(x => x.Name == lastSetupName).SingleOrDefault(); Setups.SelectedItem = lastSetup; _testFolderMonitor.TestRunComplete += TestRunComplete; SetControlState(); }
public EntryAction(Entry[] Entries, Method method, string Path) { InitializeComponent(); if (Environment.OSVersion.Version.Build >= 7600) { Windows7 = true; } if (Environment.OSVersion.Version.Build >= 6000) { Aero = true; } if (Windows7) { tm = TaskbarManager.Instance; } this.HandleCreated += new EventHandler(EntryAction_HandleCreated); this.FormClosing += new FormClosingEventHandler(EntryAction_FormClosing); m = method; OutPath = Path; this.Entries = Entries; }
/// <summary> /// Called when [loaded]. /// </summary> /// <param name="sender">The sender.</param> /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param> private void OnLoaded(object sender, EventArgs args) { Application.Idle -= this.OnLoaded; this.tmrPageUpdate.Enabled = true; #if (!RIPRIPPERX) // TODO : Check if Windows 7 API dlls exists //if (File.Exists(Path.Combine(Application.StartupPath, "Microsoft.WindowsAPICodePack.dll")) && // File.Exists(Path.Combine(Application.StartupPath, "Microsoft.WindowsAPICodePack.Shell.dll"))) //{ if (Environment.OSVersion.Platform == PlatformID.Win32NT && Environment.OSVersion.Version.Major >= 6 && Environment.OSVersion.Version.Minor >= 1) { this.windowsTaskbar = TaskbarManager.Instance; // } } #endif this.IdleRipper(); try { // Reading Saved Jobs XmlSerializer serializer = new XmlSerializer(typeof(List<JobInfo>)); TextReader tr = new StreamReader(Path.Combine(Application.StartupPath, "jobs.xml")); this.jobsList = (List<JobInfo>)serializer.Deserialize(tr); tr.Close(); try { this.bCurPause = bool.Parse(SettingsHelper.LoadSetting("CurrentlyPauseThreads")); } catch (Exception) { this.bCurPause = false; } if (this.bCurPause) { this.pauseCurrentThreads.Text = "(Re)Start Download(s)"; this.pauseCurrentThreads.Image = Languages.english.play; } File.Delete(Path.Combine(Application.StartupPath, "jobs.xml")); } catch (Exception) { this.jobsList = new List<JobInfo>(); } if (this.jobsList.Count != 0) { this.StatusLabelInfo.Text = this._ResourceManager.GetString("gbParse2"); this.StatusLabelInfo.ForeColor = Color.Green; for (int i = 0; i < this.jobsList.Count; i++) { this.StatusLabelInfo.Text = string.Format("{0}{1}/{2}", this._ResourceManager.GetString("gbParse2"), i, this.jobsList.Count); this.StatusLabelInfo.ForeColor = Color.Green; ListViewItem ijobJob = new ListViewItem(this.jobsList[i].TopicTitle, 0); ijobJob.SubItems.Add(this.jobsList[i].PostTitle); ijobJob.SubItems.Add(this.jobsList[i].ImageCount.ToString()); this.listViewJobList.Items.AddRange(new[] { ijobJob }); } this.bWorking = true; this.StatusLabelInfo.Text = string.Empty; } AutoUpdater.CleanupAfterUpdate("RiPRipper"); // Extract Urls from Text file for Ripping CacheController.Instance().UserSettings.TxtFolder = string.IsNullOrEmpty(CacheController.Instance().UserSettings.TxtFolder) ? "ExtractUrls.txt" : Path.Combine(CacheController.Instance().UserSettings.TxtFolder, "ExtractUrls.txt"); if (File.Exists(CacheController.Instance().UserSettings.TxtFolder)) { this.GetTxtUrls(CacheController.Instance().UserSettings.TxtFolder); } ///////////////// }
private void FormAdvanced_Load(object sender, EventArgs e) { if (TaskbarManager.IsPlatformSupported) { tm = TaskbarManager.Instance; } }
private void Window_ContentRendered(object sender, EventArgs e) { this.Try(() => { // NOTE! When we depoy with ClickOnce, we will be assigned an AppID! // do NOT attempt to set one manually, because it will break and cause a LOT // of confusion! // TaskbarManager.Instance.ApplicationId = "GVNotifier.1"; windowsTaskbar = TaskbarManager.Instance; Debug.WriteLine("AppUserModelID: " + windowsTaskbar.ApplicationId); }); try { ResetJumpList(); if (chkAutoLogin.IsChecked == true && txtPassword.Password != string.Empty) { btnLogin_Click(null, null); } } catch (Exception ex) { Debug.WriteLine("Content rendering: " + ex); } }
private void Window_ContentRendered(object sender, EventArgs e) { this.Try(() => { // As part of ClickOnce deployment, an AppuserModelID is assigned to this process. // When debugging or starting the process directly, the AUMID will not be set. // Setting the AUMID twice in the ClickOnce context will cause an error. windowsTaskbar = TaskbarManager.Instance; Trace.WriteLine("AppUserModelID: " + windowsTaskbar.ApplicationId); }); try { ResetJumpList(); if (chkAutoLogin.IsChecked == true && txtPassword.Password != string.Empty) { btnLogin_Click(null, null); } } catch (Exception ex) { Trace.WriteLine("Content rendering: " + ex); } }
public TaskbarManager(Microsoft.WindowsAPICodePack.Taskbar.TaskbarManager manager) { _manager = manager; }
/// <summary> /// Creates the recently used ports jumplist /// </summary> private void CreateJumpList() { taskBarManager = TaskbarManager.Instance; if (TaskbarManager.IsPlatformSupported) { string currentDir = new FileInfo(System.Reflection.Assembly.GetExecutingAssembly().Location).DirectoryName; JumpList list = JumpList.CreateJumpList(); // Separate by service hosts the recent ports. Port.GetUsedPorts().GroupBy( p => p.ServiceHost).ToList().ForEach(group => { JumpListCustomCategory userActionsCategory = new JumpListCustomCategory(group.Key); group.OrderByDescending(p => p.UsedTimes).ToList().ForEach(port => { JumpListLink userActionLink = new JumpListLink(Assembly.GetEntryAssembly().Location, string.Format("{0} @ {1}", port.Number.ToString(), port.Host)) { Arguments = port.Id.ToString(), IconReference = new IconReference(currentDir + "\\Resources\\tunnel-jump.ico,0") }; userActionsCategory.AddJumpListItems(userActionLink); }); list.AddCustomCategories(userActionsCategory); }); list.Refresh(); } }
/// <summary> /// MainViewWindow constructor. /// </summary> public MainViewWindow() { InitializeComponent(); // Checks if the system supports the TaskbarManager extensions (only Windows 7) so we can also show progress in the taskbar icon. if (TaskbarManager.IsPlatformSupported) taskbarManager = TaskbarManager.Instance; // Assign and create the DataProvider and default network to the global pageViewModel that acts as the DataContext in our MainView. pageViewModel = new PageViewModel(new DataProvider(), InitializeDefaultNeuralNetwork()); pageViewModel.MaxDegreeOfParallelism = Environment.ProcessorCount; //-1 MainView.DataContext = pageViewModel; pageViewModel.DataProvider.RaiseDataLoadedEvent += new EventHandler<DataProviderEventArgs>(HandleDataLoadedEvent); pageViewModel.DataProvider.RaiseDataProgressEvent += new EventHandler<DataProviderEventArgs>(HandleDataProgressEvent); pageViewModel.RequestClose += this.OnViewModelRequestClose; pageViewModel.PageChange += this.OnViewModelPageChange; }
public EntryAction(string[] FilePaths,Drive Drive, Method method) { InitializeComponent(); if (Environment.OSVersion.Version.Build >= 7600) { Windows7 = true; } if (Environment.OSVersion.Version.Build >= 6000) { Aero = true; } if (Windows7) { tm = TaskbarManager.Instance; } this.HandleCreated += new EventHandler(EntryAction_HandleCreated); this.FormClosing += new FormClosingEventHandler(EntryAction_FormClosing); m = method; this.Paths = FilePaths; xDrive = Drive; }
public MainWindow(AppViewModel viewModel, IPluginRepository pluginRepository, IAccountSettingsProvider accountSettingsProvider, IColumnsSettingsProvider columnsSettingsProvider, IApplicationSettingsProvider applicationSettingsProvider, IEventAggregator eventAggregator) { InitializeComponent(); _pluginRepository = pluginRepository; _accountSettings = accountSettingsProvider; _columnsSettings = columnsSettingsProvider; _applicationSettingsProvider = applicationSettingsProvider; _eventAggregator = eventAggregator; var mainViewModel = viewModel.Model; var resourceViewModel = viewModel.Resources; txtUpdate.SetHeight((Double) FindResource("DefaultCompositionBoxHeight")); var c = (CompositionTextBox) txtUpdate.FindName("txtUpdateBox"); if (c != null) c.IsInlineReply = false; Model = mainViewModel; ResourcesViewModel = resourceViewModel; mainViewModel.View = this; DataContext = mainViewModel; GlobalWindows.MainWindow = this; try { if (TaskbarManager.IsPlatformSupported) TaskbarManager = TaskbarManager.Instance; } catch (Exception ex) { CompositionManager.Get<IExceptionReporter>().ReportHandledException(ex); } if (resourceViewModel.Views == null) return; //Import the XAML foreach (var r in resourceViewModel.Views) { Resources.MergedDictionaries.Add(r); } var ibShowSetup = new InputBinding(ShowSetup, new KeyGesture(Key.S, ModifierKeys.Control)); var ibShowScriptingConsole = new InputBinding(ShowScriptConsoleCommand, new KeyGesture(Key.S, ModifierKeys.Alt)); InputBindings.Add(ibShowSetup); InputBindings.Add(ibShowScriptingConsole); var cbShowSetup = new CommandBinding(ShowSetup); cbShowSetup.Executed += CbShowSetupExecuted; CommandBindings.Add(cbShowSetup); var scriptConsole = new CommandBinding(ShowScriptConsoleCommand); scriptConsole.Executed += ScriptConsoleVisible; CommandBindings.Add(scriptConsole); if (!DesignerProperties.GetIsInDesignMode(this)) { MahTweets.Configuration.WindowSettings.SetSave(this, true); } }
/// <summary> /// Called when [loaded]. /// </summary> /// <param name="sender">The sender.</param> /// <param name="args">The <see cref="System.EventArgs"/> instance containing the event data.</param> private void OnLoaded(object sender, EventArgs args) { Application.Idle -= this.OnLoaded; this.tmrPageUpdate.Enabled = true; #if (!PGRIPPERX) if (Environment.OSVersion.Platform == PlatformID.Win32NT && Environment.OSVersion.Version.Major >= 6 && Environment.OSVersion.Version.Minor >= 1) { this.windowsTaskbar = TaskbarManager.Instance; } #endif this.IdleRipper(); try { // Reading Saved Jobs XmlSerializer serializer = new XmlSerializer(typeof(List<JobInfo>)); TextReader tr = new StreamReader(Path.Combine(Application.StartupPath, "jobs.xml")); jobsList = (List<JobInfo>)serializer.Deserialize(tr); tr.Close(); if (CacheController.Instance().UserSettings.CurrentlyPauseThreads) { pauseCurrentThreads.Text = "(Re)Start Download(s)"; pauseCurrentThreads.Image = Languages.english.play; } File.Delete(Path.Combine(Application.StartupPath, "jobs.xml")); } catch (Exception) { jobsList = new List<JobInfo>(); } if (jobsList.Count != 0) { StatusLabelInfo.Text = this._ResourceManager.GetString("gbParse2"); StatusLabelInfo.ForeColor = Color.Green; for (int i = 0; i < jobsList.Count; i++) { this.StatusLabelInfo.Text = string.Format("{0}{1}/{2}", this._ResourceManager.GetString("gbParse2"), i, this.jobsList.Count); StatusLabelInfo.ForeColor = Color.Green; ListViewItem ijobJob = new ListViewItem { Text = jobsList[i].TopicTitle }; ijobJob.SubItems.Add(jobsList[i].PostTitle); ijobJob.SubItems.Add(jobsList[i].ImageCount.ToString()); listViewJobList.Items.AddRange(new[] { ijobJob }); } this.working = true; StatusLabelInfo.Text = string.Empty; } AutoUpdater.CleanupAfterUpdate("PG-Ripper"); // Extract Urls from Text file for Ripping if (File.Exists("ExtractUrls.txt")) { this.GetTxtUrls("ExtractUrls.txt"); } }