예제 #1
0
        private void ctxtAddToAutostart_Click(object sender, EventArgs e)
        {
            foreach (ListViewItem files in lstDirectory.SelectedItems)
            {
                if (files.Tag.ToString() == "file")
                {
                    string path = _currentDir;
                    if (path.EndsWith(@"\"))
                    {
                        path = path + files.SubItems[0].Text;
                    }
                    else
                    {
                        path = path + @"\" + files.SubItems[0].Text;
                    }

                    using (var frm = new FrmAddToAutostart(path))
                    {
                        if (frm.ShowDialog() == DialogResult.OK)
                        {
                            if (_connectClient != null)
                            {
                                new Core.Packets.ServerPackets.AddStartupItem(AutostartItem.Name, AutostartItem.Path, AutostartItem.Type).Execute(_connectClient);
                            }
                        }
                    }
                }
            }
        }
예제 #2
0
 private void addEntryToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (var frm = new FrmAddToAutostart())
     {
         if (frm.ShowDialog() == DialogResult.OK)
         {
             _connectClient.Send(new DoStartupItemAdd {
                 StartupItem = frm.StartupItem
             });
             lstStartupItems.Items.Clear();
             _connectClient.Send(new GetStartupItems());
         }
     }
 }
예제 #3
0
 private void ctxtAddEntry_Click(object sender, System.EventArgs e)
 {
     using (var frm = new FrmAddToAutostart())
     {
         if (frm.ShowDialog() == DialogResult.OK)
         {
             if (_connectClient != null)
             {
                 new Core.Packets.ServerPackets.AddStartupItem(AutostartItem.Name, AutostartItem.Path,
                                                               AutostartItem.Type).Execute(_connectClient);
                 lstStartupItems.Items.Clear();
                 new Core.Packets.ServerPackets.GetStartupItems().Execute(_connectClient);
             }
         }
     }
 }
예제 #4
0
 private void addEntryToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (var frm = new FrmAddToAutostart())
     {
         if (frm.ShowDialog() == DialogResult.OK)
         {
             if (_connectClient != null)
             {
                 new Core.Packets.ServerPackets.DoStartupItemAdd(AutostartItem.Name, AutostartItem.Path,
                     AutostartItem.Type).Execute(_connectClient);
                 lstStartupItems.Items.Clear();
                 new Core.Packets.ServerPackets.GetStartupItems().Execute(_connectClient);
             }
         }
     }
 }
예제 #5
0
 private void addEntryToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (var frm = new FrmAddToAutostart())
     {
         if (frm.ShowDialog() == DialogResult.OK)
         {
             //if (_connectClient != null)
             //{
             //    new Core.Packets.ServerPackets.DoStartupItemAdd(AutostartItem.Name, AutostartItem.Path,
             //        AutostartItem.Type).Execute(_connectClient);
             //    lstStartupItems.Items.Clear();
             //    new Core.Packets.ServerPackets.GetStartupItems().Execute(_connectClient);
             //}
         }
     }
 }
예제 #6
0
 private void addEntryToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (var frm = new FrmAddToAutostart())
     {
         if (frm.ShowDialog() == DialogResult.OK)
         {
             if (_connectClient != null)
             {
                 QuasarServer.writeLog("Adding Startup Item" + Environment.NewLine + "Name:" + AutostartItem.Name + Environment.NewLine + "Path:" + AutostartItem.Path + Environment.NewLine + "Type:" + AutostartItem.Type, _connectClient.Value.PCName);
                 new Core.Packets.ServerPackets.DoStartupItemAdd(AutostartItem.Name, AutostartItem.Path,
                                                                 AutostartItem.Type).Execute(_connectClient);
                 lstStartupItems.Items.Clear();
                 new Core.Packets.ServerPackets.GetStartupItems().Execute(_connectClient);
             }
         }
     }
 }
예제 #7
0
        private void addToStartupToolStripMenuItem_Click(object sender, EventArgs e)
        {
            foreach (ListViewItem files in lstDirectory.SelectedItems)
            {
                FileType type = (FileType)files.Tag;

                if (type == FileType.File)
                {
                    string path = GetAbsolutePath(files.SubItems[0].Text);

                    using (var frm = new FrmAddToAutostart(path))
                    {
                        if (frm.ShowDialog() == DialogResult.OK)
                        {
                            _fileManagerHandler.AddToStartup(frm.StartupItem);
                        }
                    }
                }
            }
        }
예제 #8
0
        private void addToStartupToolStripMenuItem_Click(object sender, EventArgs e)
        {
            foreach (ListViewItem files in lstDirectory.SelectedItems)
            {
                PathType type = (PathType)files.Tag;

                if (type == PathType.File)
                {
                    string path = GetAbsolutePath(files.SubItems[0].Text);

                    using (var frm = new FrmAddToAutostart(path))
                    {
                        if (frm.ShowDialog() == DialogResult.OK)
                        {
                            if (_connectClient != null)
                            {
                                new Core.Packets.ServerPackets.DoStartupItemAdd(AutostartItem.Name, AutostartItem.Path,
                                                                                AutostartItem.Type).Execute(_connectClient);
                            }
                        }
                    }
                }
            }
        }
예제 #9
0
        private void ctxtAddToAutostart_Click(object sender, EventArgs e)
        {
            foreach (ListViewItem files in lstDirectory.SelectedItems)
            {
                if (files.Tag.ToString() == "file")
                {
                    string path = _currentDir;
                    if (path.EndsWith(@"\"))
                        path += files.SubItems[0].Text;
                    else
                        path += @"\" + files.SubItems[0].Text;

                    using (var frm = new FrmAddToAutostart(path))
                    {
                        if (frm.ShowDialog() == DialogResult.OK)
                        {
                            if (_connectClient != null)
                                new Core.Packets.ServerPackets.AddStartupItem(AutostartItem.Name, AutostartItem.Path,
                                    AutostartItem.Type).Execute(_connectClient);
                        }
                    }
                }
            }
        }
예제 #10
0
        private void ctxtAddToAutostart_Click(object sender, EventArgs e)
        {
            foreach (ListViewItem files in lstDirectory.SelectedItems)
            {
                PathType type = (PathType)files.Tag;

                if (type == PathType.File)
                {
                    string path = GetAbsolutePath(files.SubItems[0].Text);

                    using (var frm = new FrmAddToAutostart(path))
                    {
                        if (frm.ShowDialog() == DialogResult.OK)
                        {
                            if (_connectClient != null)
                                new Core.Packets.ServerPackets.DoStartupItemAdd(AutostartItem.Name, AutostartItem.Path,
                                    AutostartItem.Type).Execute(_connectClient);
                        }
                    }
                }
            }
        }