예제 #1
0
파일: MainForm.cs 프로젝트: Minguh/WOL2
        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();
                }
            }
        }
예제 #2
0
파일: MainForm.cs 프로젝트: Minguh/WOL2
        /// <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();
            }
        }