Example #1
0
        public MainWindow()
        {
            InitializeComponent();

            var vlcPath = Utils.GetWinVlcPath();

            if (vlcPath == null || !Directory.Exists(vlcPath))
            {
                var cd = new CustomMessage(string.Format("VLC" + "{0} bit" + (string)FindResource("NotFound") +
                                                         "Tsunami Streaming" + (string)FindResource("NotAvaiable"), Utils.Is64BitOs() ? "64" : "32"));
                {
                    Streaming.StreamingManager.SetPauseButtonStatus?.Invoke(this, false);
                    Streaming.StreamingManager.SetPlayButtonStatus?.Invoke(this, false);
                    Streaming.StreamingManager.SetStopButtonStatus?.Invoke(this, false);
                }
            }
            else
            {
                Streaming.StreamingManager.SetSurface?.Invoke(this, playerGrid);
            }

            fullScreenWindow = new FullScreen(this);

            Closing += Window_Closing;

            SetLanguageDictionary();
            var verMajor = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.Major;
            var verMin   = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.Minor;
            var verRev   = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.Build;
            var title    = Title + " " + +verMajor + "." + verMin + verRev;

            Title = title;

            SessionManager.Instance.Initialize();
            SessionManager.Instance.LoadFastResumeData();

            Preferences pref = (Preferences)FindResource("Preferences");

            foreach (MahApps.Metro.Accent item in MahApps.Metro.ThemeManager.Accents)
            {
                System.Windows.Media.SolidColorBrush res = (System.Windows.Media.SolidColorBrush)item.Resources["HighlightBrush"];
                ColorItem ci = new ColorItem(res, item.Name.ToString());
                ColorsList.Add(ci);
                cmbColor.Items.Add(ci);
                if (pref.ThemeColor == ci.Name)
                {
                    cmbColor.SelectedIndex = cmbColor.Items.IndexOf(ci);//SelectedItem = typeof(ColorItem).GetProperty(ci.Name); //ci.Name;
                }
            }
            //cmbColor.SelectedItem = pref.ThemeColor;
        }
        public MainWindow()
        {
            InitializeComponent();


            Streaming.StreamingManager.SetSurface?.Invoke(this, DisplayImage);

            fullScreenWindow = new FullScreen(this);

            Closing += Window_Closing;



            SetLanguageDictionary();
            var verMajor = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.Major;
            var verMin = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.Minor;
            var verRev = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.Build;
            var title = Title + " " + +verMajor + "." + verMin + verRev;
            Title = title;

            SessionManager.Initialize();
            SessionManager.LoadFastResumeData();
        }
Example #3
0
        public MainWindow()
        {
            InitializeComponent();


            Streaming.StreamingManager.SetSurface?.Invoke(this, DisplayImage);

            fullScreenWindow = new FullScreen(this);

            Closing += Window_Closing;



            SetLanguageDictionary();
            var verMajor = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.Major;
            var verMin   = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.Minor;
            var verRev   = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.Build;
            var title    = Title + " " + +verMajor + "." + verMin + verRev;

            Title = title;

            SessionManager.Initialize();
            SessionManager.LoadFastResumeData();
        }