Beispiel #1
0
 public ListCustomers(TaskbarItemInfo taskbarCustomerInfo)
 {
     InitializeComponent();
     this.taskbarCustomerInfo = taskbarCustomerInfo;
     controller = new ControllerCustomer();
     Dispatcher.BeginInvoke(new Action(() => load()), DispatcherPriority.ContextIdle, null);
 }
        public void TestTaskbarItemInfo()
        {
            var wnd  = Window();
            var item = new TaskbarItemInfo();

            wnd.TaskbarItemInfo(item).TaskbarItemInfo.Should().Be(item);
        }
Beispiel #3
0
        public AnimatedGifWindow()
        {
            Image       image  = new Image();
            BitmapImage image2 = null;
            string      path   = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "background.gif");

            if (File.Exists(path))
            {
                image2 = new BitmapImage();
                image2.BeginInit();
                image2.StreamSource = File.OpenRead(path);
                image2.EndInit();
                ImageBehavior.SetAnimatedSource(image, image2);
                base.Content = image;
                base.Width   = image2.Width;
                base.Height  = image2.Height;
            }
            base.AllowsTransparency    = true;
            base.WindowStyle           = WindowStyle.None;
            base.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            base.ShowInTaskbar         = true;
            base.Topmost = true;
            TaskbarItemInfo info1 = new TaskbarItemInfo();

            info1.set_ProgressState(2);
            base.set_TaskbarItemInfo(info1);
            base.Title      = "Installing...";
            base.Background = new SolidColorBrush(Color.FromArgb(0, 0, 0, 0));
        }
Beispiel #4
0
        public AppModel(TaskbarIcon notifyIcon, TaskbarItemInfo taskbarItemInfo)
        {
            m_isAddServerUrlValid = true;
            m_updateManager       = new AutoUpdater();
            m_notifyIcon          = notifyIcon;
            Enum.TryParse(Settings.Default.ViewMode, true, out m_viewMode);
            m_taskbarItemInfo = taskbarItemInfo;
            m_servers         = new ObservableCollection <ServerViewModel>();
            m_settings        = PersistedUserSettings.Open <UserSettings>() ?? new UserSettings {
                Servers = new List <SavedJenkinsServers>()
            };
            m_timer          = new DispatcherTimer(TimeSpan.FromSeconds(c_projectUpdateInterval), DispatcherPriority.Background, (sender, args) => Update(), Dispatcher.CurrentDispatcher);
            Status           = new StatusViewModel();
            m_subscribedJobs = new ObservableCollection <JobViewModel>();

            if (ApplicationDeployment.IsNetworkDeployed)
            {
                m_updateManager.CheckForUpdate();
                m_updateManager.PropertyChanged += UpdateManager_PropertyChanged;
                m_updateTimer = new DispatcherTimer(TimeSpan.FromHours(4), DispatcherPriority.Background, CheckForUpdate, Dispatcher.CurrentDispatcher);
            }
            AutoStartOnStartup = IsAutoStartRegistered;

            Initialize();
        }
    private static void _OnTaskbarItemInfoChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
    {
        if (DesignerProperties.GetIsInDesignMode(d))
        {
            return;
        }
        Window          window           = (Window)d;
        TaskbarItemInfo taskbarItemInfo  = (TaskbarItemInfo)e.OldValue;
        TaskbarItemInfo taskbarItemInfo2 = (TaskbarItemInfo)e.NewValue;

        if (taskbarItemInfo == taskbarItemInfo2)
        {
            return;
        }
        if (!Utility.IsOSWindows7OrNewer)
        {
            return;
        }
        if (taskbarItemInfo != null && taskbarItemInfo._window != null)
        {
            taskbarItemInfo._DetachWindow();
        }
        if (taskbarItemInfo2 != null)
        {
            taskbarItemInfo2._SetWindow(window);
        }
    }
Beispiel #6
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public SetupWindow()
        {
            // Window properties.
            Title                 = CmisSync.Properties_Resources.AddARemoteFolder;
            Width                 = 640;
            Height                = 440;
            ResizeMode            = ResizeMode.NoResize;
            Background            = new SolidColorBrush(Colors.WhiteSmoke);
            Icon                  = UIHelpers.GetImageSource("app", "ico");
            WindowStartupLocation = WindowStartupLocation.CenterScreen;
            Content               = ContentCanvas;
            Closing              += Close;

            // Taskbar
            TaskbarItemInfo = new TaskbarItemInfo()
            {
                Description = Properties_Resources.ApplicationName
            };

            if (useXAML)
            {
                Padding = new Thickness(0);
                LoadSetup();
            }
            else
            {
                CreateSetup();
            }
        }
 // private TaskbarItemInfo myTaskbarItemInfo;
 public Progress_Dialog(ExtractionParams param, TaskbarItemInfo taskbarItemInfo)
 {
     this.myParams = param;
     // this.myTaskbarItemInfo = taskbarItemInfo;
     InitializeComponent();
     this.TaskbarItemInfo = taskbarItemInfo;
 }
Beispiel #8
0
        static public void Init(TaskbarItemInfo _taskbarInfo)
        {
            taskbarInfo = _taskbarInfo;
            ready       = true;

            TitleChange(string.Format("{0} {1}X {2}", defaultTitle, UpdateManager.CurrentVersion, GameConfigurationManager.GameConfiguration.Name));
        }
Beispiel #9
0
        public MainWindow()
        {
            InitializeComponent();

            textBoxStartTextChangedMethodRunner = new MethodRunner <TimeSpan>(UpdateKeyFrameSuggestions, TimeSpan.FromMilliseconds(1500));

            TaskbarItemInfo = new TaskbarItemInfo();
            Height         -= 30;
            gridSourceControls.Visibility      = Visibility.Collapsed;
            mediaElementInput.PositionChanged += MediaElementInput_PositionChanged;

            comboBoxEncoder.Items.Add("H.264 (x264)");
            comboBoxEncoder.Items.Add("H.265 (x265)");
            comboBoxEncoder.SelectedIndex = 0;
            comboBoxFramerate.Items.Add("Same as source");
            comboBoxFramerate.SelectedIndex = 0;
            foreach (var item in FFmpegEngine.PRESETS)
            {
                comboBoxPreset.Items.Add(item);
            }
            comboBoxPreset.SelectedIndex = 3;
            foreach (var item in QUALITY)
            {
                comboBoxQuality.Items.Add(item);
            }
            comboBoxQuality.SelectedIndex = 2;
            comboBoxResolution.Items.Add("Same as source");
            comboBoxResolution.SelectedIndex = 0;
        }
Beispiel #10
0
        internal void SetTaskbarProgress(float percent)
        {
            TaskbarItemInfo tbi = this.TaskbarItemInfo;

            tbi.ProgressState = TaskbarItemProgressState.Normal;
            tbi.ProgressValue = percent;
        }
Beispiel #11
0
        public WindowExplorer()
        {
            this.Language = System.Windows.Markup.XmlLanguage.GetLanguage(System.Threading.Thread.CurrentThread.CurrentCulture.IetfLanguageTag);
            InitializeComponent();

            try
            {
                object taskbarList = Activator.CreateInstance(Type.GetTypeFromCLSID(new Guid("56FDF344-FD6D-11d0-958A-006097C9A090")));
                taskbarList = null;

                TaskbarItemInfo taskbar = new TaskbarItemInfo();
                BindingOperations.SetBinding(taskbar, TaskbarItemInfo.ProgressStateProperty, new Binding("ProgressState"));
                BindingOperations.SetBinding(taskbar, TaskbarItemInfo.ProgressValueProperty, new Binding("ProgressValue"));
                this.TaskbarItemInfo = taskbar;
            }
            catch
            {
                // This is to replace the Xaml code below that implments TaskbarInfoItem, and instead do it through code, so that it can catch a little known error.
                //    System.OutOfMemoryException: Retrieving the COM class factory for component with CLSID {56FDF344-FD6D-11D0-958A-006097C9A090} failed
                //    due to the following error: 8007000e Not enough storage is available to complete this operation. (Exception from HRESULT: 0x8007000E (E_OUTOFMEMORY)).
                // The cause of this error is unknown, but there have been 4 reported cases of this issue during the life of SEToolbox so far.
                // In this case, the progress bar has been coded to gracefully degrade if this issue occurs.

                //<Window.TaskbarItemInfo>
                //<TaskbarItemInfo ProgressState="{Binding ProgressState}" ProgressValue="{Binding ProgressValue}" />
                //</Window.TaskbarItemInfo>
            }
        }
 public RunModelSystemPage(SingleWindowGUI xtmf)
 {
     this.XTMF            = xtmf;
     this.ProgressReports = this.XTMF.XTMF.Configuration.ProgressReports;
     InitializeComponent();
     this.ProgressReports.ListChanged  += new ListChangedEventHandler(ProgressReports_ListChanged);
     this.ProgressReports.BeforeRemove += new EventHandler <ListChangedEventArgs>(ProgressReports_BeforeRemove);
     this.SubProgressBars.ListChanged  += new ListChangedEventHandler(SubProgressBars_ListChanged);
     this.SubProgressBars.BeforeRemove += new EventHandler <ListChangedEventArgs>(SubProgressBars_BeforeRemove);
     this.Timer            = new DispatcherTimer();
     this.Timer.Interval   = TimeSpan.FromMilliseconds(1000 / 30);
     this.Timer.Tick      += new EventHandler(Timer_Tick);
     this.Loaded          += new RoutedEventHandler(RunModelSystemPage_Loaded);
     this.Unloaded        += new RoutedEventHandler(RunModelSystemPage_Unloaded);
     this.ProjectDirectory = System.IO.Path.GetFullPath(this.XTMF.XTMF.Configuration.ProjectDirectory);
     if (Environment.OSVersion.Platform == PlatformID.Win32NT)
     {
         var major = Environment.OSVersion.Version.Major;
         if (major > 6 || (major >= 6 && Environment.OSVersion.Version.Minor >= 1))
         {
             Windows7OrAbove         = true;
             this.TaskbarInformation = this.XTMF.TaskbarItemInfo = new TaskbarItemInfo();
         }
     }
 }
        public ShellWindow()
        {
            InitializeComponent();
            viewModel = new Lazy <ShellViewModel>(() => ViewHelper.GetViewModel <ShellViewModel>(this));

            try
            {
                var taskbarItemInfo = new TaskbarItemInfo();
                taskbarItemInfo.ThumbButtonInfos.Add(new ThumbButtonInfo()
                {
                    ImageSource = Application.Current.Resources["PlayButtonImage"] as DrawingImage
                });
                taskbarItemInfo.ThumbButtonInfos.Add(new ThumbButtonInfo()
                {
                    ImageSource = Application.Current.Resources["PauseButtonImage"] as DrawingImage
                });
                taskbarItemInfo.ThumbButtonInfos.Add(new ThumbButtonInfo()
                {
                    ImageSource = Application.Current.Resources["ResumeButtonImage"] as DrawingImage
                });
                taskbarItemInfo.ThumbButtonInfos.Add(new ThumbButtonInfo()
                {
                    ImageSource = Application.Current.Resources["StopButtonImage"] as DrawingImage
                });
                TaskbarItemInfo = taskbarItemInfo;
            }
            catch (NotImplementedException ex)
            {
                Logger.Error("ShellWindow.ShellWindow(): {0}", ex);
            }

            Closing += ShellWindow_Closing;
        }
Beispiel #14
0
        private void MouseWindow_Loaded(object sender, RoutedEventArgs e)
        {
            try
            {
                TaskbarItemInfo = new TaskbarItemInfo();
            }
            catch (Exception ex)
            {
                StaticCode.Logger?.Here().Error(ex.Message);
            }

            _vm                          = new MouseWindowViewModel();
            DataContext                  = _vm;
            _vm.MouseStateChanged       += _vm_MouseStateChanged;
            _vm.AltTabVisibilityChanged += _vm_AltTabVisibilityChanged;
            _vm.RequestActivate         += _vm_RequestActivate;
            _vm.RequestMinimise         += _vm_RequestMinimise;
            //_vm.HookKeyEnabledChanged += _vm_HookKeyEnabledChanged;

            if (_vm.SettingsVm.Settings.HideFromAltTab)
            {
                _vm_AltTabVisibilityChanged(this, false);
            }

            if (_vm.SettingsVm.Settings.StartAtLaunch)
            {
                _vm.Start();
            }
            else if (_vm.SettingsVm.Settings.MinimiseOnStop)
            {
                WindowState = WindowState.Minimized;
            }
        }
 public MainWindow()
 {
     InitializeComponent();
     bytesLoadListener = progressListener;
     test.onProgress  += bytesLoadListener;
     TaskbarItemInfo   = new TaskbarItemInfo();
 }
Beispiel #16
0
        private async void Speak(object sender, System.Windows.RoutedEventArgs e)
        {
            TaskbarItemInfo taskbarItemInfo = new TaskbarItemInfo();

            taskbarItemInfo.ProgressValue = .5;
            taskbarItemInfo.ProgressState = TaskbarItemProgressState.Paused;

            var args = new[] { "RgQuote", "F" }; // string[]

            var rh = new RobinhoodClient();

            await authenticate(rh);

            while (1 < 2)
            {
                var quotes = await rh.DownloadQuote(args);

                //Console.WriteLine(DateTime.Now);
                foreach (var q in quotes)
                {
                    if (q != null)
                    {
                        textToSpeech.Text = q.LastTradePrice.ToString();
                    }
                }
            }
        }
Beispiel #17
0
        public AWindow(IWindow owner)
            : base(owner, Core.settings)
        {
            TabItem from_me = new TabItem();

            from_me.BeginInit();
            from_me.EndInit();
            this.Background = from_me.Background;
            ProgressBar from_color = new ProgressBar();

            default_progress_color = from_color.Foreground;

            // Taskbar progress setup
            TaskbarItemInfo = new TaskbarItemInfo();
            //            var uriSource = new Uri(System.IO.Path.Combine(Core.ExecutablePath, "masgau.ico"), UriKind.Relative);


            System.Drawing.Icon ico = Properties.Resources.MASGAUIcon;

            this.Icon = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(
                ico.ToBitmap().GetHbitmap(),
                IntPtr.Zero,
                Int32Rect.Empty,
                BitmapSizeOptions.FromEmptyOptions());

            if (owner != null)
            {
                this.Owner = owner as System.Windows.Window;
                this.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterOwner;
            }
            else
            {
                this.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;
            }
        }
Beispiel #18
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Win7"/> class.
 /// </summary>
 public Win7()
 {
     if (WindowsTaskbar == null)
     {
         WindowsTaskbar = new TaskbarItemInfo();
     }
 }
Beispiel #19
0
        public TaskBarManager(TaskbarItemInfo taskbarItemInfo)
        {
            _taskbarItemInfo = taskbarItemInfo ?? throw new ArgumentNullException(nameof(taskbarItemInfo));

            _taskbarItemInfo.ProgressState = _currentState;
            _taskbarItemInfo.ProgressValue = _currentProgress;
        }
        public MainWindow()
        {
            InitializeComponent();
            var status = new StatusWM
            {
                Status = "",
                Media  = null,
                Check  = false
            };

            DataContext = status;

            if (Settings.Default.token == "")
            {
                AuthStart();
            }

            TaskbarItemInfo     = new TaskbarItemInfo();
            StatusArea.KeyDown += StatusAreaOnKeyDown;

            ContextMenuGen();

            _tokens = Tokens.Create(Twitter.CK, Twitter.CS,
                                    Settings.Default.token,
                                    Settings.Default.secret
                                    );
        }
        static public void Init(TaskbarItemInfo _taskbarInfo)
        {
            taskbarInfo = _taskbarInfo;
            ready = true;

            TitleChange(
	            $"{defaultTitle} {UpdateManager.CurrentVersion}X {GameConfigurationManager.GameConfiguration.Name}");
        }
        void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            TaskbarItemInfo taskBarItemInfo = new TaskbarItemInfo();

            taskBarItemInfo.ProgressState = TaskbarItemProgressState.Normal;
            this.TaskbarItemInfo          = taskBarItemInfo;
            taskBarItemInfo.ProgressValue = 0.5d;
        }
Beispiel #23
0
 public static void SetTaskbarItemInfo(Window window, TaskbarItemInfo itemInfo)
 {
     Debug.Assert(window.TaskbarItemInfo == null, "SetTaskbarItemInfo.Assert");
     if (IsOSWindows7OrNewer && UserIsLoggedIn())
     {
         window.TaskbarItemInfo = itemInfo;
     }
 }
Beispiel #24
0
 public FrameAnalyserDialog(FrameCaptureCollection frames, SampleCondition condition, AnalysisParameters parameters)
 {
     TaskbarItemInfo = new TaskbarItemInfo();
     _condition      = condition;
     _parameters     = parameters;
     _frames         = frames;
     InitializeComponent();
 }
Beispiel #25
0
 static TaskbarMainWindow()
 {
     if (Application.Current.MainWindow.TaskbarItemInfo == null)
     {
         Application.Current.MainWindow.TaskbarItemInfo = new TaskbarItemInfo();
     }
     _taskbar = Application.Current.MainWindow.TaskbarItemInfo;
 }
 public static void Initialize(Window wnd)
 {
     if (!_initialized)
     {
         _taskbar = wnd.TaskbarItemInfo = new TaskbarItemInfo();
         _taskbar.ProgressState = TaskbarItemProgressState.None;
         _initialized           = true;
     }
 }
Beispiel #27
0
        public MainWindow()
        {
            InitializeComponent();

            DataContext = new MainViewModel(new Messenger.Messenger());
            TaskbarItemInfo taskbarItem = new TaskbarItemInfo();

            taskbarItem.Overlay = new BitmapImage(new Uri("Images/Icon.ico", UriKind.RelativeOrAbsolute));
        }
Beispiel #28
0
        public MainWindow()
        {
            InitializeComponent();

            TaskbarItemInfo = new TaskbarItemInfo();
            TaskbarItemInfo.ProgressState = new TaskbarItemProgressState();

            RenderOptions.ProcessRenderMode = System.Windows.Interop.RenderMode.SoftwareOnly;
        }
 public MainWindow()
 {
     InitializeComponent();
     progressListener      = progressProcesser;
     speedTest.onProgress += progressListener;
     successListener       = successProcesser;
     speedTest.onSuccess  += successListener;
     TaskbarItemInfo       = new TaskbarItemInfo();
 }
Beispiel #30
0
 public StatusBarViewModel(ICremaAppHost cremaAppHost)
 {
     this.cremaAppHost                = cremaAppHost;
     this.cremaAppHost.Loaded        += CremaAppHost_Loaded;
     this.cremaAppHost.Unloaded      += CremaAppHost_Unloaded;
     this.taskItems                   = new ReadOnlyObservableCollection <BackgroundTaskItemViewModel>(this.taskItemList);
     this.taskbarItemInfo             = new TaskbarItemInfo();
     this.taskbarItemInfo.Description = "Crema Desc";
 }