private void ContentControl_Load(object sender, EventArgs e) { _channelView = new ChannelView <TChannel, TTrack>(); _eventView = new EventView <Event>(); // check network status UpdateNetworkStatus(NetworkInterface.GetIsNetworkAvailable()); Task.Factory.StartNew(BindEvents); // local properties RefreshPlaylistButton.Image = P.Resources.icon_repeat; ViewEventsSplitButton.Image = P.Resources.icon_calendar; ViewPlaylistsSplitButton.Image = P.Resources.icon_web; SortPlaylistSplitButton.Image = P.Resources.icon_sort; PlayerTypeSplitButton.Image = P.Resources.icon_sound.ToBitmap(); OptionsButton.Image = P.Resources.icon_options; ExceptionStatusMessage.Image = P.Resources.icon_warning; MainNotifyIcon.Icon = P.Resources.DIIconOld; // SWITCH DYNAMICALLY BASED ON CHANNEL LISTENING TO MainNotifyIcon.ContextMenuStrip = ChannelsContextMenu; MainNotifyIcon.Text = P.Resources.ApplicationTitle; RefreshCounterLabel.Text = P.Resources.PlaylistRefreshText; _refreshCounter.Stop(); ViewPlaylistsSplitButton.DropDown = PlaylistsContextMenu; SortPlaylistSplitButton.DropDown = SortContextMenu; PlayerTypeSplitButton.DropDown = PlayersContextMenu; PlayerTypeSplitButton.Text = Components.Utilities.SplitName(Settings.Default.PlayerType); FeedbackButton.ToolTipText = P.Resources.SupportPageUrl; // memory counter //System.Windows.Forms.Timer t = new System.Windows.Forms.Timer(); //t.Interval = 1000; //t.Start(); //t.Tick += (s, ea) => //{ // MemoryStatus.Text = string.Format("{0} {1}", ((long)Process.GetCurrentProcess(). / 1024).ToString(), "KB"); //}; // end }
private void DIAdmin_Load(object sender, EventArgs e) { refreshCounter1.Stop(); bindEnums(); bindControls(); trackBarValue.Text = transparencyTrackBar.Value.ToString(CultureInfo.InvariantCulture); Settings.Default.SettingChanging += Default_SettingChanging; Settings.Default.SettingsSaving += Default_SettingsSaving; //int[] colorInts = new int[colors.Length]; // for (int i = 0; i < colors.Length; i++) // { // colorInts[i] = Math.Abs(colors[i].ToArgb()); // } // this.channelColorPicker.Color = Settings.Default.ChannelBackground; // this.alternatingChannelColorPicker.Color = Settings.Default.AlternatingChannelBackground; // this.selectedChannelColorPicker.Color = Settings.Default.SelectedChannelBackground; }