コード例 #1
0
 private void btDelete_Click(object sender, EventArgs e)
 {
     if (listBoxMain.SelectedIndex != -1)
     {
         if (MessageBox.Show("Are you sure you want to delete this DelayStartup App", "Are You Sure", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
         {
             LinkMaster myDel = new LinkMaster();
             myDel.DeleteLink((LinkType)listBoxMain.SelectedItem);
         }
     }
     ListBoxMainRefresh();
 }
コード例 #2
0
 private void btDelete_Click(object sender, EventArgs e)
 {
     if (listBoxMain.SelectedIndex != -1)
     {
         if (MessageBox.Show("Are you sure you want to delete this DelayStartup App", "Are You Sure", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
         {
             LinkMaster myDel = new LinkMaster();
             myDel.DeleteLink((LinkType)listBoxMain.SelectedItem);
         }
     }
     ListBoxMainRefresh();
 }
コード例 #3
0
        private void ListBoxMainRefresh()
        {
            listBoxMain.Items.Clear();
            LinkMaster      myLink      = new LinkMaster();
            List <LinkType> listofLinks = new List <LinkType>();

            listofLinks = myLink.LoadLinksFromStartup();
            foreach (LinkType element in listofLinks)
            {
                listBoxMain.Items.Add(element);
            }
        }
コード例 #4
0
        private void btCreateStartUp_Click(object sender, EventArgs e)
        {
            if (appReady == true)
            {
                LinkMaster myLink         = new LinkMaster();
                string     lnkStartupPath = myLink.CreatLink(appName, appDelayTime, appLocationName);

                ////message Box
                //if (MessageBox.Show("The DelayTimer has been added, Would you like run the App", "Do you want to test Delaytimer", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
                //{
                //    //if click yes Run app
                //    Process.Start(lnkStartupPath);
                //}
                ////close app
                this.Close();
            }
            else
            {
                //do nothing
            }
        }
コード例 #5
0
        private void btCreateStartUp_Click(object sender, EventArgs e)
        {
            if (appReady == true)
            {

                LinkMaster myLink = new LinkMaster();
                string lnkStartupPath = myLink.CreatLink(appName, appDelayTime, appLocationName);

                ////message Box
                //if (MessageBox.Show("The DelayTimer has been added, Would you like run the App", "Do you want to test Delaytimer", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
                //{
                //    //if click yes Run app
                //    Process.Start(lnkStartupPath);
                //}
                ////close app
                this.Close();
            }
            else
            {
                //do nothing
            }
        }
コード例 #6
0
 private void ListBoxMainRefresh()
 {
     listBoxMain.Items.Clear();
     LinkMaster myLink = new LinkMaster();
     List<LinkType> listofLinks = new List<LinkType>();
     listofLinks = myLink.LoadLinksFromStartup();
     foreach (LinkType element in listofLinks)
     {
         listBoxMain.Items.Add(element);
     }
 }
コード例 #7
0
 private void btOpenStartupPath_Click(object sender, EventArgs e)
 {
     LinkMaster myLink = new LinkMaster();
     Process.Start(myLink.GetStartupPath());
 }
コード例 #8
0
        private void btOpenStartupPath_Click(object sender, EventArgs e)
        {
            LinkMaster myLink = new LinkMaster();

            Process.Start(myLink.GetStartupPath());
        }