예제 #1
0
        public MainWindow()
        {
            InitializeComponent();
            ConfigurationWindow = new ConfigurationWindow();
            ConfigurationWindow.Show();

            //var capture = new Capture
            //{
            //    Screen = new Screen()
            //};
            ////Screenshot.SetBinding(Screenshot.Source, "");
            //Screenshot.Source = capture.Screen.GetBitmap()?.ToImageSource();
            //TestScreenRefresh();
            //Screenshot.Stretch = Stretch.Uniform;
            //var blah = true;

            //BackgroundImage = capture.Screen.GetBitmap().ToBitmapImage();
            //BackgroundImage.Freeze();
            //Screenshot.Source = capture.Screen.GetBitmap().ToBitmapImage();
            //Screenshot.Stretch = Stretch.Uniform;
            //Tests.Clicking.ClickZombidleWindowTest();
            //Capture.TestCaptureZombidle();
            //screenshot.Source = Capturing.CaptureSubImageTest().Result?.ToBitmap().ToImageSource();

            //Capturing.DuplicateZombidleWindow();


            //capture.Screen.OnScreenshotChanged += Screen_OnScreenshotChanged;

            ////for (var i = 1; i <= 1000; i++)
            ////{
            //Screenshot.Source = capture.Screen.GetBitmap()?.ToImageSource();
            //}
        }
예제 #2
0
 private void OpenExisting(string path)
 {
     _window = new ConfigurationWindow(new string[] {});
     _window.DisableBackupAndChorusStuffForTests();
     _window.Show();
     _window.OpenProject(path);
 }
예제 #3
0
		private void CreateNewAndGotoBackupControl(string directoryPath)
		{
			_window = new ConfigurationWindow(new string[] { });
			_window.Show();
			_window.CreateAndOpenProject(directoryPath);
			GoToBackupTab();
		   // return new ComboBoxTester("_languageCombo", _window);
		}
예제 #4
0
 public void OpenConfiguration()
 {
     if (_configurationWindow == null)
     {
         _configurationWindow = new ConfigurationWindow();
     }
     _configurationWindow.Show();
 }
예제 #5
0
//
//        private ComboBoxTester GoToTabAndGetLanguageCombo()
//        {
//            GoToBackupTab();
//            ComboBoxTester t = new ComboBoxTester("_languageCombo", _window);
//            return t;
//        }

        private void OpenExisting(string path)
        {
            _window = new ConfigurationWindow(new string[] { });
            _window.Show();
            _window = new ConfigurationWindow(new string[] { });
            _window.Show();
            _window.OpenProject(path);
        }
예제 #6
0
 private void CreateNewAndGotoBackupControl(string directoryPath)
 {
     _window = new ConfigurationWindow(new string[] { });
     _window.Show();
     _window.CreateAndOpenProject(directoryPath, "th", "Thai");
     GoToBackupTab();
     // return new ComboBoxTester("_languageCombo", _window);
 }
예제 #7
0
 public void Setup()
 {
     ErrorReport.IsOkToInteractWithUser = false;
     Palaso.UI.WindowsForms.Keyboarding.KeyboardController.Initialize();
     _window = new ConfigurationWindow(new string[] {});
     _window.DisableBackupAndChorusStuffForTests();
     _window.Show();
 }
예제 #8
0
 private ComboBoxTester CreateNewAndGetLanguageCombo(string path)
 {
     _window = new ConfigurationWindow(new string[] {});
     _window.DisableBackupAndChorusStuffForTests();
     _window.Show();
     _window.CreateAndOpenProject(path, "th", "Thai");
     GoToUILanguageTab();
     return(new ComboBoxTester("_languageCombo", _window));
 }
예제 #9
0
		public override void Setup()
		{
			ErrorReport.IsOkToInteractWithUser = false;
			base.Setup();
			_window = new ConfigurationWindow(new string[] {});
			_window.Show();
			_mainWindowTester = new FormTester(_window.Name, _window);

			_projectFolder = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
		}
예제 #10
0
        public void Execute(object parameter)
        {
            ConfigurationViewModel viewModel = new ConfigurationViewModel(new ShortcutService("Neptuo", "Productivity", "DevTools"));

            ConfigurationWindow window = new ConfigurationWindow();

            window.ViewModel = viewModel;

            window.Show();
        }
예제 #11
0
        public ConfigurationMenu()
        {
            Header  = "Configuration";
            Command = ReactiveCommand.Create(() =>
            {
                var configView = new ConfigurationWindow();
                configView.Show();

                var programListWindow = new ProgramListWindow();
                programListWindow.Show();
            });
        }
예제 #12
0
        public override void Setup()
        {
            Palaso.Reporting.ErrorReport.IsOkToInteractWithUser = false;
            ErrorReport.IsOkToInteractWithUser = false;
            base.Setup();
            Palaso.UI.WindowsForms.Keyboarding.KeyboardController.Initialize();
            _window = new ConfigurationWindow(new string[] {});
            _window.DisableBackupAndChorusStuffForTests();
            _window.Show();
            _mainWindowTester = new FormTester(_window.Name, _window);

            _projectFolder = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
        }
        public void OpenConfiguration()
        {
            if (configurationWindow == null)
            {
                isMainWindowViewModelReloadRequired = true;

                configurationWindow = new ConfigurationWindow(configurationFactory.Create(), this, errorLog, String.IsNullOrEmpty(Settings.Default.SourceDirectoryPath));
                configurationWindow.ShowInTaskbar = !runHotKey.IsSet;
                configurationWindow.ResizeMode    = !runHotKey.IsSet ? ResizeMode.CanMinimize : ResizeMode.NoResize;
                configurationWindow.Closed       += OnConfigurationWindowClosed;
            }
            configurationWindow.Show();
            configurationWindow.Activate();
        }
        public void OpenConfiguration()
        {
            if (_configurationWindow == null)
            {
                _configurationWindow = new ConfigurationWindow();
            }
            if (!_configurationWindow.IsVisible)
            {
                _configurationWindow.Show();
            }

            if (_configurationWindow.WindowState == WindowState.Minimized)
            {
                _configurationWindow.WindowState = WindowState.Normal;
            }
        }
예제 #15
0
        public void OpenProject_OpenedWithDirNameWhichDoesNotMatchProjectName_Opens()
        {
            using (var projectDir = new ProjectDirectorySetupForTesting(""))
            {
                Palaso.UI.WindowsForms.Keyboarding.KeyboardController.Initialize();
                using (var window = new ConfigurationWindow(new string[] { }))
                {
                    Assert.AreNotEqual(
                        Path.GetFileNameWithoutExtension(projectDir.PathToLiftFile),
                        Path.GetFileName(projectDir.PathToDirectory));

                    window.DisableBackupAndChorusStuffForTests();
                    window.Show();
                    Assert.IsTrue(window.OpenProject(projectDir.PathToDirectory));
                }
                Palaso.UI.WindowsForms.Keyboarding.KeyboardController.Shutdown();
            }
        }
예제 #16
0
        public void OpenConfiguration()
        {
            if (AppSettings.EnableDiscordRPC == true)
            {
                if (client.IsDisposed == true)
                {
                    client = new DiscordRpcClient("581567509959016456");
                    client.Initialize();
                }
                client.SetPresence(new RichPresence()
                {
                    State   = "Profile: " + Settings.Name,
                    Details = "Syncing lighting effects",
                    Assets  = new Assets()
                    {
                        LargeImageKey  = "large_image",
                        LargeImageText = "JackNet RGB Sync",
                        SmallImageKey  = "small_image",
                        SmallImageText = "by Fanman03"
                    }
                });
            }
            if (_configurationWindow == null)
            {
                _configurationWindow = new ConfigurationWindow();
            }
            if (!_configurationWindow.IsVisible)
            {
                _configurationWindow.Show();
            }

            if (_configurationWindow.WindowState == WindowState.Minimized)
            {
                _configurationWindow.WindowState = WindowState.Normal;
            }
        }
 public void Setup()
 {
     ErrorReport.IsOkToInteractWithUser = false;
     _window = new ConfigurationWindow(new string[] {});
     _window.Show();
 }
        void OnEnable2()
        {
            Log.Info("OnEnable2");

            m_window.Show();
        }
		private ComboBoxTester CreateNewAndGetLanguageCombo(string path)
		{
			_window = new ConfigurationWindow(new string[] {});
			_window.Show();
			_window.CreateAndOpenProject(path);
			GoToUILanguageTab();
			return new ComboBoxTester("_languageCombo", _window);
		}
		public void Setup()
		{
			ErrorReport.IsOkToInteractWithUser = false;
			_window = new ConfigurationWindow(new string[] {});
			_window.Show();
		}
예제 #21
0
//
//        private ComboBoxTester GoToTabAndGetLanguageCombo()
//        {
//            GoToBackupTab();
//            ComboBoxTester t = new ComboBoxTester("_languageCombo", _window);
//            return t;
//        }

		private void OpenExisting(string path)
		{
			_window = new ConfigurationWindow(new string[] { });
			_window.Show();
			_window = new ConfigurationWindow(new string[] { });
			_window.Show();
			_window.OpenProject(path);
		}
예제 #22
0
        public void OpenConfiguration()
        {
            if (AppSettings.EnableDiscordRPC == true)
            {
                Logger.Info("Discord RPC enabled.");
                if (client.IsDisposed == true)
                {
                    Logger.Info("Discord RPC client disposed, initializing new one.");
                    client = new DiscordRpcClient("581567509959016456");
                    client.Initialize();
                }
                Logger.Info("Setting Discord presensce.");
                client.SetPresence(new RichPresence()
                {
                    State   = "Profile: " + Settings.Name,
                    Details = "Syncing lighting effects",
                    Assets  = new Assets()
                    {
                        LargeImageKey  = "large_image",
                        LargeImageText = "JackNet RGB Sync",
                        SmallImageKey  = "small_image",
                        SmallImageText = "by Fanman03"
                    }
                });
            }
            if (_configurationWindow == null)
            {
                _configurationWindow = new ConfigurationWindow();
            }
            if (!_configurationWindow.IsVisible)
            {
                _configurationWindow.Show();
            }

            if (_configurationWindow.WindowState == WindowState.Minimized)
            {
                _configurationWindow.WindowState = WindowState.Normal;
            }

            try
            {
                // Set system security protocol to the best of our capabilities
                ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
                using (WebClient w = new WebClient())
                {
                    Logger.Info("Checking for update...");
                    var         json           = w.DownloadString(ApplicationManager.Instance.AppSettings.versionURL);
                    ProgVersion versionFromApi = JsonConvert.DeserializeObject <ProgVersion>(json);
                    int         versionMajor   = Version.Major;
                    int         versionMinor   = Version.Minor;
                    int         versionBuild   = Version.Build;

                    if (versionFromApi.major > versionMajor)
                    {
                        GetUpdateWindow getUpdateWindow = new GetUpdateWindow();
                        getUpdateWindow.Show();
                        Logger.Info("Update available. (major)");
                    }
                    else if (versionFromApi.minor > versionMinor)
                    {
                        GetUpdateWindow getUpdateWindow = new GetUpdateWindow();
                        getUpdateWindow.Show();
                        Logger.Info("Update available. (minor)");
                    }
                    else if (versionFromApi.build > versionBuild)
                    {
                        GetUpdateWindow getUpdateWindow = new GetUpdateWindow();
                        Logger.Info("Update available. (build)");
                        getUpdateWindow.Show();
                    }
                    else
                    {
                        Logger.Info("No update available.");
                    }
                }
            } catch (Exception ex)
            {
                Logger.Error("Unable to check for updates. Download failed with exception: " + ex);
            }
        }