Example #1
0
        /// <summary>
        /// Froms the data to view. Get the NetworkCard attribute and display it on form
        /// </summary>
        private void FromDataToView()
        {
            txtCardType.Text    = NetworkCard.CardType.ToString();
            txtDescription.Text = NetworkCard.Description;
            txtName.Text        = NetworkCard.Name;
            txtMAC.Text         = NetworkCard.MacAddress;
            txtDHCP.Text        = NetworkCard.Dhcp.ToString();
            txtIP.Text          = NetworkCard.IpAddress;
            txtGateway.Text     = NetworkCard.GatewayAddress;
            txtSubnetMask.Text  = NetworkCard.SubnetMask;
            txtDns1.Text        = NetworkCard.Dns;
            txtDns2.Text        = NetworkCard.Dns2;
            txtStatus.Text      = NetworkCard.Status;
            switch (NetworkCard.CardType)
            {
            case WindowsNetworkCardType.ETHERNET:
                pictureBox.Image = UseCaseApplication.GetImage("type_ethernet_300x400");
                break;

            case WindowsNetworkCardType.WIRELESS:
                pictureBox.Image = UseCaseApplication.GetImage("type_wifi_300x400");
                break;

            case WindowsNetworkCardType.BLUETOOTH:
                pictureBox.Image = UseCaseApplication.GetImage("type_bluetooth_300x400");
                break;

            case WindowsNetworkCardType.VIRTUAL:
                pictureBox.Image = UseCaseApplication.GetImage("type_virtual_300x400");
                break;
            }
        }
Example #2
0
        /// <summary>
        /// Handles the Load event of the FormProfile control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void FormProfile_Load(object sender, EventArgs e)
        {
            // add
            this.Activated += new System.EventHandler(this.ArgonDockContent_Activated);
            String[] imageNameList = ViewModel.ImageNames;

            ContextMenuStrip menuStrip = this.contextMenuStrip;

            menuStrip.Items.Clear();

            ToolStripMenuItem menuItem;
            int counter = 0;

            // fill imageList in formProfiles
            foreach (String item in imageNameList)
            {
                menuItem        = new ToolStripMenuItem();
                menuItem.Image  = UseCaseApplication.GetImage(item);
                menuItem.Tag    = item;
                menuItem.Text   = "Profile image " + counter;
                menuItem.Click += new System.EventHandler(this.toolStripMenuItem_Click);

                menuStrip.Items.Add(menuItem);
                counter++;
            }
        }
Example #3
0
        private void FormProfiles_Load(object sender, EventArgs e)
        {
            this.Activated += new System.EventHandler(this.ArgonDockContent_Activated);
            String[] imageNameList = ViewModel.ImageNames;

            ImageList imageList = ViewModel.ProfilesView.imageList48x48;

            // fill imageList in formProfiles
            foreach (String item in imageNameList)
            {
                imageList.Images.Add(item, UseCaseApplication.GetImage(item));
            }


            //SimpleDropSink sink1 = (SimpleDropSink)listView.DropSink;
            //sink1.CanDropBetween = true;
        }
Example #4
0
        /// <summary>
        /// Views the data on form.
        /// </summary>
        public override void ViewDataOnForm()
        {
            NetworkProfile profile = Profile;

            RefreshNetworkAdapter();

            txtName.Text = profile.Name;
            TabText      = "Profile: " + profile.Name;

            // load the image profile
            pictureBox.Image = UseCaseApplication.GetImage(profile.ImageName);

            ipControl.DisplayConfiguration(profile.NetworkCardInfo);
            dnsConfiguration.DisplayConfiguration(profile.NetworkCardInfo);

            winsControl.DisplayConfiguration(WinsConfiguration.ValueOf(profile));

            proxyPanel.Configuration = profile.ProxyConfig;
            serviceListView.Items    = profile.ServiceList;
            applicationsListView.SetItems(profile.ExecList);
            driveMapListView.SetItems(profile.DriveMapList);
            lblSelectedPrinter.Text = profile.DefaultPrinter;

            cbPrinterList.Items.Clear();
            int indexPrinter = 0;
            int i1           = 0;

            cbPrinterList.Items.Add("");
            foreach (String item in PrinterSettings.InstalledPrinters)
            {
                i1++;
                cbPrinterList.Items.Add(item);

                if (item.ToLower().Equals(profile.DefaultPrinter.ToLower()))
                {
                    indexPrinter = i1;
                }
            }
            cbPrinterList.SelectedIndex = indexPrinter;

            // disabled nic
            networkCardListView.SelectedItems = profile.DisabledNetworkCards;
        }
Example #5
0
 /// <summary>
 /// Handles the Load event of the FormMain control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
 private void FormMain_Load(object sender, EventArgs e)
 {
     UseCaseApplication.Load(this);
 }
Example #6
0
 /// <summary>
 /// Handles the Click event of the rbtnHelpUpdate control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
 private void rbtnHelpUpdate_Click(object sender, EventArgs e)
 {
     UseCaseApplication.VerifyUpdate();
 }