Example #1
0
        public void EditSelectedTimer()
        {
            if( listView.SelectedItems.Count > 0 )
            {
                WOL2Host h = (WOL2Host)listView.SelectedItems[0].Tag;

                if( h != null )
                {
                    DlgEditTimer dlg = new DlgEditTimer( h.GetTimer() );
                    dlg.Text = String.Format( MOE.Utility.GetStringFromRes("strEditTimerForHost"), h.GetName() );
                    dlg.ShowDialog( this );

                    // Mark the file as changed
                    ChangedHostsFile();
                }
            }
        }
Example #2
0
        /// <summary>
        /// Edit the timer for the currently active group
        /// </summary>
        public void EditCurrentGroupTimer()
        {
            if( m_CurrentGroup != null )
            {
                DlgEditTimer dlg = new DlgEditTimer( m_CurrentGroup.GetTimer() );
                String s = String.Format( MOE.Utility.GetStringFromRes("strEditTimerForGroup"), m_CurrentGroup.GetName() );
                dlg.Text = s;
                dlg.ShowDialog( this );

                // Mark the file as changed
                ChangedHostsFile();
            }
        }