Inheritance: RaumfeldNET.Base.Base
示例#1
0
        protected void MainWindow_LoadedSink(object sender, RoutedEventArgs e)
        {
            RaumfeldNET.UPNP.NetworkConnectInfo networkConnectionInfo;
            networkConnectionInfo.subNetIndex = 0;

            String subnetIndex = this.getArgValue("-subnetindex");

            if (!String.IsNullOrWhiteSpace(subnetIndex))
            {
                int result;
                if (int.TryParse(subnetIndex, out result))
                {
                    networkConnectionInfo.subNetIndex = Convert.ToInt16(subnetIndex);
                }
            }

            rfController = new RaumfeldNET.Controller(networkConnectionInfo);

            if (App.mArgs != null && App.mArgs.Contains("-logwarning"))
            {
                rfController.logWriter.setLogLevel(RaumfeldNET.Log.LogType.Warning);
            }
            if (App.mArgs != null && App.mArgs.Contains("-logall"))
            {
                rfController.logWriter.setLogLevel(RaumfeldNET.Log.LogType.Info);
            }

            rfController.mediaServerFound         += rfController_mediaServerFoundSink;
            rfController.mediaServerRemoved       += rfController_mediaServerRemovedSink;
            rfController.allRenderersLinked       += rfController_allRenderersLinkedSink;
            rfController.zonesRetrieved           += rfController_zonesRetrievedSink;
            rfController.zoneTrackListReady       += rfController_zoneTrackListReadySink;
            rfController.zoneTrackChanged         += rfController_zoneTrackChangedSink;
            rfController.zoneTrackPositionChanged += rfController_zoneTrackPositionChangedSink;

            this.initAppUpdater();
            this.initZoneTrackListControl();
            this.initContentBrowserListControl();
            this.initContentBrowserListSearch();
            this.initScopeHandler();
            this.initVolumeControls();
            this.initVolumeControlsRotary();
            this.initPlaylistManagement();
            this.initContentBrowserContextMenu();
            this.initPlaylistManagementContextMenu();

            this.switchVisualContent(VisualContent.Loading);
            this.setZoneDataOnUpdate(true);
            this.setZoneTrackListOnUpdate(true);

            rfController.init();

            VersionInfo.Content             = "Version " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
            ComponentDispatcher.ThreadIdle += ComponentDispatcher_ThreadIdleSink;
        }
示例#2
0
 void Form1_FormClosed(object sender, FormClosedEventArgs e)
 {
     rfController = null;
 }
示例#3
0
 public Form1()
 {
     InitializeComponent();
     this.FormClosed += Form1_FormClosed;
     rfController     = new Controller();
 }
示例#4
0
        protected void MainWindow_LoadedSink(object sender, RoutedEventArgs e)
        {
            RaumfeldNET.UPNP.NetworkConnectInfo networkConnectionInfo;
            networkConnectionInfo.subNetIndex = 0;

            String subnetIndex = this.getArgValue("-subnetindex");
            if (!String.IsNullOrWhiteSpace(subnetIndex))
            {
                int result;
                if (int.TryParse(subnetIndex, out result))
                    networkConnectionInfo.subNetIndex = Convert.ToInt16(subnetIndex);
            }

            rfController = new RaumfeldNET.Controller(networkConnectionInfo);

            if (App.mArgs != null && App.mArgs.Contains("-logwarning"))
                rfController.logWriter.setLogLevel(RaumfeldNET.Log.LogType.Warning);
            if (App.mArgs != null && App.mArgs.Contains("-logall"))
                rfController.logWriter.setLogLevel(RaumfeldNET.Log.LogType.Info);

            rfController.mediaServerFound += rfController_mediaServerFoundSink;
            rfController.mediaServerRemoved += rfController_mediaServerRemovedSink;
            rfController.allRenderersLinked += rfController_allRenderersLinkedSink;
            rfController.zonesRetrieved += rfController_zonesRetrievedSink;
            rfController.zoneTrackListReady += rfController_zoneTrackListReadySink;
            rfController.zoneTrackChanged += rfController_zoneTrackChangedSink;
            rfController.zoneTrackPositionChanged += rfController_zoneTrackPositionChangedSink;

            this.initAppUpdater();
            this.initZoneTrackListControl();
            this.initContentBrowserListControl();
            this.initContentBrowserListSearch();
            this.initScopeHandler();
            this.initVolumeControls();
            this.initVolumeControlsRotary();
            this.initPlaylistManagement();
            this.initContentBrowserContextMenu();
            this.initPlaylistManagementContextMenu();

            this.switchVisualContent(VisualContent.Loading);
            this.setZoneDataOnUpdate(true);
            this.setZoneTrackListOnUpdate(true);

            rfController.init();

            VersionInfo.Content = "Version " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
            ComponentDispatcher.ThreadIdle += ComponentDispatcher_ThreadIdleSink;
        }
示例#5
0
 void Form1_FormClosed(object sender, FormClosedEventArgs e)
 {
     rfController = null;
 }
示例#6
0
 public Form1()
 {
     InitializeComponent();
     this.FormClosed += Form1_FormClosed;
     rfController = new Controller();
 }