コード例 #1
0
        public MainWindow()
        {
            // Get command line arguments
            commandLineArgs = CommandLineParser.GetCommandLineArgs();

            // Load localization
            LocalizationController.LoadLocalization();

            // Load appearance
            AppearanceController.LoadAppearance();
            InitializeComponent();
            DataContext = this;

            // Set a filter for ListView Apps and sort them
            CollectionView view = (CollectionView)CollectionViewSource.GetDefaultView(lvApps.ItemsSource);

            view.SortDescriptions.Add(new SortDescription("Name", ListSortDirection.Ascending));
            view.Filter = SearchFilter;

            // Init notify icon
            InitNotifyIcon();

            if (commandLineArgs.Autostart && Properties.Settings.Default.Application_StartApplicationMinimized)
            {
                HideWindowToTray();
            }
        }
コード例 #2
0
 protected override void OnActivated()
 {
     base.OnActivated();
     appearanceController = Frame.GetController <AppearanceController>();
     if (appearanceController != null)
     {
         appearanceController.CustomApplyAppearance += appearanceController_CustomApplyAppearance;
     }
 }
コード例 #3
0
 protected override void OnActivated()
 {
     base.OnActivated();
     // Perform various tasks depending on the target View.
     appearanceController = Frame.GetController<AppearanceController>();
     if (appearanceController != null)
     {
         appearanceController.CustomApplyAppearance += appearanceController_CustomApplyAppearance;
     }
 }
コード例 #4
0
        protected override void OnActivated()
        {
            base.OnActivated();

            appearanceController = Frame.GetController <AppearanceController>();
            if (appearanceController != null)
            {
                appearanceController.CustomApplyAppearance += new EventHandler <ApplyAppearanceEventArgs>(appearanceController_CustomApplyAppearance);
            }
        }
コード例 #5
0
        protected override void OnDeactivated()
        {
            AppearanceController appearanceController = Frame.GetController <AppearanceController>();

            if (appearanceController != null)
            {
                appearanceController.CollectAppearanceRules -= AppearanceController_CollectAppearanceRules;
            }
            base.OnDeactivated();
        }
コード例 #6
0
        protected override void OnActivated()
        {
            base.OnActivated();
            // Perform various tasks depending on the target View.
            appearanceController = Frame.GetController <AppearanceController>();

            if (appearanceController != null)
            {
                appearanceController.CustomApplyAppearance += appearanceController_CustomApplyAppearance;
            }
        }
コード例 #7
0
        protected override void OnActivated()
        {
            base.OnActivated();

            AppearanceController appearanceController = Frame.GetController <AppearanceController>();

            if (appearanceController != null && ObjectSpace.GetType() != typeof(NonPersistentObjectSpace))
            {
                appearanceController.ResetRulesCache();
                appearanceController.CollectAppearanceRules += AppearanceController_CollectAppearanceRules;
                appearanceController.Refresh();
            }
        }
コード例 #8
0
        public void SetUp()
        {
            XPObjectSpaceProvider objectSpaceProvider =
                new XPObjectSpaceProvider(new MemoryDataStoreProvider());
            TestApplication application = new TestApplication();
            ModuleBase      testModule  = new ModuleBase();

            testModule.AdditionalExportedTypes.Add(typeof(MyPerson));
            application.Modules.Add(testModule);
            application.Modules.Add(new ConditionalAppearanceModule());
            application.Setup("TestApplication", objectSpaceProvider);
            IObjectSpace objectSpace = objectSpaceProvider.CreateObjectSpace();

            person     = objectSpace.CreateObject <MyPerson>();
            target     = new FakeAppearanceTarget();
            controller = new AppearanceController();
            detailView = application.CreateDetailView(objectSpace, person);
            controller.SetView(detailView);
        }
コード例 #9
0
 private void Awake()
 {
     //_dragHandler = FindObjectOfType<DragHandler>();
     _appearance = camera.GetComponent <AppearanceController>();
 }