Beispiel #1
0
        public CustomPage()
        {
            InitializeComponent();
            _CustomPage = this;
            UpdateText();

            imgSmallText.Tag = new Image
            {
                Source = new BitmapImage(new Uri("../../../Assets/SmallTextHelp.jpg", UriKind.Relative))
            };
            imgLargeText.Tag = new Image
            {
                Source = new BitmapImage(new Uri("../../../Assets/LargeTextHelp.jpg", UriKind.Relative))
            };
            imgText1.Tag = new Image
            {
                Source = new BitmapImage(new Uri("../../../Assets/Text1Help.jpg", UriKind.Relative))
            };
            imgText2.Tag = new Image
            {
                Source = new BitmapImage(new Uri("../../../Assets/Text2Help.jpg", UriKind.Relative))
            };
            imgClientID.Tag = new Image
            {
                Source = new BitmapImage(new Uri("../../../Assets/ClientIDHelp.jpg", UriKind.Relative))
            };
            imgSmallKey.Tag = new Image
            {
                Source = new BitmapImage(new Uri("../../../Assets/SmallAndLargeKeyHelp.jpg", UriKind.Relative))
            };
            imgLargeKey.Tag = new Image
            {
                Source = new BitmapImage(new Uri("../../../Assets/SmallAndLargeKeyHelp.jpg", UriKind.Relative))
            };

            _haveDoneAutoStart = !(App.Config.AutoStart == App.Text.Custom && !App.StartedWithJumpListLogic);
        }
Beispiel #2
0
        public CustomPage()
        {
            InitializeComponent();
            _CustomPage = this;
            UpdateText();

            if (File.Exists(FileLocations.ProfilesFileLocalLocation))
            {
                using (var reader = File.OpenText(FileLocations.ProfilesFileLocalLocation))
                {
                    Profiles = (Dictionary <string, CustomProfile>)App.JsonSerializer.Deserialize(reader,
                                                                                                  typeof(Dictionary <string, CustomProfile>));
                }
            }
            else
            {
                Profiles = new Dictionary <string, CustomProfile>
                {
                    { App.Text.Custom, new CustomProfile {
                          Name = App.Text.Custom
                      } }
                };
                using (var writer = new StreamWriter(FileLocations.ProfilesFileLocalLocation))
                {
                    App.JsonSerializer.Serialize(writer, Profiles);
                }
            }

            MainWindow.MakeJumpList();
            for (var i = 0; i < Profiles.Count; i++)
            {
                MakeMenuButton(Profiles.ElementAt(i).Key);
            }
            tbProfiles.ItemsSource = ProfileButtons;

            imgSmallText.Tag = new Image
            {
                Source = new BitmapImage(new Uri("../../Assets/SmallTextHelp.jpg", UriKind.Relative))
            };
            imgLargeText.Tag = new Image
            {
                Source = new BitmapImage(new Uri("../../Assets/LargeTextHelp.jpg", UriKind.Relative))
            };
            imgText1.Tag = new Image
            {
                Source = new BitmapImage(new Uri("../../Assets/Text1Help.jpg", UriKind.Relative))
            };
            imgText2.Tag = new Image
            {
                Source = new BitmapImage(new Uri("../../Assets/Text2Help.jpg", UriKind.Relative))
            };
            imgClientID.Tag = new Image
            {
                Source = new BitmapImage(new Uri("../../Assets/ClientIDHelp.jpg", UriKind.Relative))
            };
            imgSmallKey.Tag = new Image
            {
                Source = new BitmapImage(new Uri("../../Assets/SmallAndLargeKeyHelp.jpg", UriKind.Relative))
            };
            imgLargeKey.Tag = new Image
            {
                Source = new BitmapImage(new Uri("../../Assets/SmallAndLargeKeyHelp.jpg", UriKind.Relative))
            };
        }