예제 #1
0
        private void remoteConnect_Click(object sender, RoutedEventArgs e)
        {
            string       argument = null;
            InstanceList inslist  = this.clientR.Children[0] as InstanceList;

            if (inslist != null)
            {
                if (inslist.instancesLV.SelectedItem != null)
                {
                    CEc2Instance inst = inslist.instancesLV.SelectedItem as CEc2Instance;
                    if (inst != null)
                    {
                        if (string.IsNullOrEmpty(inst.publicDns) == false)
                        {
                            argument = "/v:" + inst.publicDns;
                        }
                    }
                }
            }

            System.Diagnostics.ProcessStartInfo procStartInfo;
            if (string.IsNullOrEmpty(argument) == true)
            {
                procStartInfo = new System.Diagnostics.ProcessStartInfo("mstsc.exe ");
            }
            else
            {
                procStartInfo = new System.Diagnostics.ProcessStartInfo("mstsc.exe ", argument);
            }

            System.Diagnostics.Process process = new System.Diagnostics.Process();
            process.StartInfo = procStartInfo;
            process.Start();
        }
예제 #2
0
 public void startStatusUpdate()
 {
     if (_monitor == null)
     {
         InstanceList ins = this.clientR.Children[0] as InstanceList;
         if (ins != null)
         {
             instances = ins.instances;
             if (instances != null)
             {
                 _monitor = new Thread(instanceMonitor);
                 _monitor.Start();
             }
         }
     }
 }
예제 #3
0
        private void showInstances()
        {
            stopStatusUpdate();

            this.clientR.Children.Clear();

            InstanceList instList    = new InstanceList();
            UserControl  userControl = instList as UserControl;

            if (userControl != null)
            {
                userControl.VerticalAlignment   = VerticalAlignment.Stretch;
                userControl.HorizontalAlignment = HorizontalAlignment.Stretch;
                instList.dashboard = this;
                this.clientR.Children.Insert(this.clientR.Children.Count, userControl);
            }
        }
예제 #4
0
 private void deploy_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         InstanceList inslist = this.clientR.Children[0] as InstanceList;
         if (inslist != null)
         {
             if (inslist.instancesLV.SelectedItem != null)
             {
                 CEc2Instance inst = inslist.instancesLV.SelectedItem as CEc2Instance;
                 if (inst != null)
                 {
                     AppDeployment pw = new AppDeployment(this);
                     pw.instance = inst;
                     pw.Show();
                 }
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
예제 #5
0
        private void showInstances()
        {
            stopStatusUpdate();

            this.clientR.Children.Clear();

            InstanceList instList = new InstanceList();
            UserControl userControl = instList as UserControl;

            if (userControl != null)
            {
                userControl.VerticalAlignment = VerticalAlignment.Stretch;
                userControl.HorizontalAlignment = HorizontalAlignment.Stretch;
                instList.dashboard = this;
                this.clientR.Children.Insert(this.clientR.Children.Count, userControl);
            }
        }