Exemplo n.º 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);
                            }
                        }
                    }
                }
            }
        }
Exemplo n.º 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());
         }
     }
 }
Exemplo n.º 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);
             }
         }
     }
 }
Exemplo n.º 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);
             }
         }
     }
 }
Exemplo n.º 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);
             //}
         }
     }
 }
Exemplo n.º 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);
             }
         }
     }
 }
Exemplo n.º 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);
                        }
                    }
                }
            }
        }
Exemplo n.º 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);
                            }
                        }
                    }
                }
            }
        }
Exemplo n.º 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);
                        }
                    }
                }
            }
        }
Exemplo n.º 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);
                        }
                    }
                }
            }
        }